Skip to main content
An agent answers from its instructions and from its knowledge: documents it searches before answering, and notes about specific contacts. Your systems can keep both up to date. The endpoints need a key with Manage knowledge bases, and work on one agent: /agents/{agent}/... with the agent id (AGI-XXXXX).

Documents

Add a document

POST /agents/{agent}/knowledge, either as JSON with Markdown content:
or by uploading a PDF (up to 10 MB) as multipart/form-data; its text becomes the content, and its title is used when you send none:
The agent uses the document at once. The response describes it:

Stay within your plan

Your plan sets how many characters of documents each agent can hold. GET /agents/{agent}/knowledge/usage tells you where you stand:
A document that would exceed the limit is refused.

Read, update, delete

Keep documents focused: one topic per document, clear headings, short paragraphs. The agent finds the right passage more easily than in one huge document.

Contact knowledge

Contact knowledge is what the agent should know about one contact: how to address them, their status, a preference. The agent uses it from the next message of this contact. POST /agents/{agent}/contact-knowledge
GET /agents/{agent}/contact-knowledge?contact=237699999999 lists what the agent knows about a contact; PATCH and DELETE /agents/{agent}/contact-knowledge/{id} change or remove an entry.
Only store what the agent needs to serve the contact, and respect your privacy obligations: contact knowledge is personal data.