Build Your OmniagentKnowledge

FAQs

Add curated Q&A pairs so your agent gives consistent answers to important questions

Curated FAQs are manually defined question-and-answer pairs for high-stakes or policy-critical topics — pricing, compliance, eligibility, return policies, or anything where you need the agent to give a specific, controlled answer rather than generating one.

How it works

FAQs are organized into FAQ collections. Each collection contains Q&A pairs. When a user asks a question that matches one of your FAQs, the agent responds with the answer you defined rather than generating one.

When a question touches your FAQs, the agent answers from the approved answers or from facts in its instructions, and can combine the two. If neither covers the question, it says the approved answers don't cover that point.

Create an FAQ collection

You can create a collection and populate it with Q&A pairs in a single call:

curl -X POST https://napster-api.napster.com/public/faqs \
  -H "X-Api-Key: $NAPSTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Return Policy",
    "faqs": [
      {
        "question": "What is your return policy?",
        "answer": "You can return any item within 30 days of purchase for a full refund. Items must be in original condition with tags attached."
      },
      {
        "question": "How long do refunds take?",
        "answer": "Refunds are processed within 5-7 business days after we receive the returned item."
      }
    ]
  }'

Response:

{
  "id": "faq_abc123",
  "name": "Return Policy",
  "created": 1710000000,
  "items": [
    {
      "id": "faq_item_001",
      "question": "What is your return policy?",
      "answer": "You can return any item within 30 days of purchase for a full refund. Items must be in original condition with tags attached.",
      "createdAt": 1710000000,
      "updatedAt": null
    },
    {
      "id": "faq_item_002",
      "question": "How long do refunds take?",
      "answer": "Refunds are processed within 5-7 business days after we receive the returned item.",
      "createdAt": 1710000000,
      "updatedAt": null
    }
  ]
}

The faqs array is optional — you can create an empty collection and add pairs later.

Each collection can hold up to 50 Q&A pairs. Creating a collection or adding pairs past that limit returns 400 FaqLimitExceeded.

Attaching FAQs to an agent

After creating a collection, attach it to your Omniagent by passing the collection ID in the faqCollections array when creating the agent:

curl -X POST https://napster-api.napster.com/public/agents \
  -H "X-Api-Key: $NAPSTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "companionId": "comp_abc123",
    "name": "Support Agent",
    "voiceId": "alloy",
    "faqCollections": ["faq_abc123"],
    "providerSettings": {}
  }'

An agent can have one FAQ collection attached. Passing more than one ID in faqCollections returns a 400 validation error — to cover more topics, add the Q&A pairs to the same collection. The same limit applies when you override faqCollections on a channel config or pass it on a connection. See Limits.

Other operations

Use the API reference for managing collections and Q&A pairs after creation:

On this page