Made in 10Docs
GuidesAPI
Characters

Knowledge base

Give characters what they should know with documents made from files, web pages or pasted text, attached to characters in order.

A character answers from what it knows: its own knowledge field, and your organization's documents attached to it. A document is made from a file, a web address or pasted text, kept as text, tagged, and shared by as many characters as you like.

Coming soonIn the dashboard

The dashboard's Knowledge base page is coming soon. Today, add documents through the API, or ask your AI assistant through our MCP server (add_knowledge, list_knowledge, attach_knowledge).

Add a document

Add a document takes one of three things:

FromSendNotes
A filemultipart/form-data: file, and title, tags as fields (tags comma-separated or repeated).txt, .md, .pdf, .docx, at most 10 MB
A web pageJSON { "url", "title"?, "tags"? }https only
Pasted textJSON { "text", "title"?, "tags"? }ready at once
curl https://talk.madein10.com/v1/documents \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/help/opening-hours", "tags": ["faq", "hours"] }'

Only the text is kept, never the file. The answer (201) is the document with its text.

Document
{
  "id": "doc_1Qm6Tx3KcW8vRp5ZbN2h",
  "title": "Opening hours",
  "source": "url",
  "file_name": null,
  "url": "https://example.com/help/opening-hours",
  "format": "html",
  "size_bytes": 48211,
  "char_count": 5120,
  "status": "ready",
  "error": null,
  "tags": ["faq", "hours"],
  "character_ids": [],
  "fetched_unix": 1793300000,
  "created_unix": 1793300000,
  "updated_unix": 1793300000,
  "text": "…"
}

Files

  • .txt and .md in UTF-8 (or UTF-16 with its byte-order mark).
  • .pdf: its text, page by page. Scanned pages have no text.
  • .docx: the body's paragraphs and tables, without headers, footers or comments. Save a .doc as .docx first.
  • Another kind is 400 unsupported_file; over 10 MB is 413 file_too_large.
  • The title is the file's name without its extension, unless you send title.

Web pages

  • https only, and only public addresses: the same rules as webhooks (400 invalid_url, unsafe_url).
  • Redirects are followed, at most 5, each new address checked again. A #fragment is dropped. 10 MB and 20 seconds at most.
  • A web page becomes readable text: headings, paragraphs, lists and tables as lines. Scripts and styles are dropped, and nothing on the page is run. A link to a PDF, a .docx or a text file is read as that.
  • The page's <title> becomes the title, unless you send title.
  • A link is fetched once. Fetch it again when the page changes: new text replaces the old. If that fetch fails, the answer is 422 fetch_failed with the reason and the old text stays. Only a link document can be fetched again (409 not_a_link).

Pasted text

Ready at once. Its title is its first line unless you send title, and you can change its text later with Change a document.

Status

statusWhat it means
processingA file or a link is being read. The create waits up to 8 seconds, so almost every answer is already ready or failed; a slower one answers processing, and Get a document shows it finish.
readyIts text is in, and it can be attached.
failedKept, with error saying why in words you can show: a scanned or password-protected PDF, a damaged file, a page that answered 404 or is built only by scripts, text over 500,000 characters. It has no text and can't be attached.

A document that isn't ready can't be attached or fetched again (409 document_not_ready).

Attach documents to a character

Set a character's documents with the whole ordered list; [] detaches them all.

PUT /v1/characters/{id}/documents
{ "ids": ["doc_1Qm6Tx3KcW8vRp5ZbN2h", "doc_…"] }

On a call, the documents' text comes after the character's own knowledge, in this order, each under its title. A call already running keeps what it started with.

The budget

A character's own knowledge and its documents' text together are at most 120,000 characters (about 20,000 words), all of it read at the start of every call. Anything that would pass it is refused with 409 knowledge_too_large, naming the total: attaching, editing the character's knowledge, editing a pasted document, or fetching a link again. char_count on each document is what counts.

Coming soonSearch over larger collections

Searching passages of a larger collection while the person is still talking is planned. Until then, keep each character's knowledge within the budget.

Find and tidy documents

List documents answers them newest first, without their text:

  • q: part of the title (any case) or the whole id.
  • tag=faq,hours: documents with all of these tags.
  • status: processing, ready or failed.

Delete a document detaches it from every character first.

Limits

Documents per organization200 (409 asset_limit)
Documents per character50
Text per document500,000 characters (a longer one is failed)
A character's knowledge and documents together120,000 characters
Tags20 per document, 40 characters each, kept lower-case
File size10 MB

On this page