Knowledge
#Uploading a document
Knowledge documents (txt, csv, md, pdf — up to 25 MB) are workspace-wide reference material, separate from the per-run files a run processes:
curl -X POST "https://api.agentflowbind.com/v1/knowledge" \
-H "Authorization: Bearer afb_live_xxxxxxxxxxxx" \
-H "Content-Type: text/plain" -H "X-Filename: vat-handling-policy.txt" \
--data-binary @vat-handling-policy.txt{ "id": "c1a9e40b-...", "name": "vat-handling-policy.txt", "mime": "text/plain", "sizeBytes": 4096, "chunkCount": 0, "status": "indexing", "createdAt": "2026-03-14T09:00:00.000Z" }Indexing (text extraction, chunking, embedding) runs asynchronously as a background job. Poll GET /v1/knowledge until status flips to ready:
curl "https://api.agentflowbind.com/v1/knowledge" -H "Authorization: Bearer afb_live_xxxxxxxxxxxx"{ "docs": [ { "id": "c1a9e40b-...", "name": "vat-handling-policy.txt", "chunkCount": 12, "status": "ready", "...": "..." } ] }status is one of indexing (just uploaded, no chunks yet), ready (at least one chunk indexed), or failed (no chunks after a couple of minutes — most likely an extraction problem).
#Searching directly
curl -X POST "https://api.agentflowbind.com/v1/knowledge/search" \
-H "Authorization: Bearer afb_live_xxxxxxxxxxxx" -H "Content-Type: application/json" \
-d '{ "query": "reverse charge VAT for EU suppliers", "limit": 5 }'{ "results": [ { "docId": "c1a9e40b-...", "docName": "vat-handling-policy.txt", "text": "...", "score": 0.83 } ] }limit defaults to 5 and is capped at 20.
#How an agent uses it
Every document preset's Assemble phase adds an optional search_knowledge step whenever the workspace has at least one ready document — the agent pulls in relevant passages (e.g. a VAT policy, a supplier reference list) before extracting fields, and can cite what it found in its reasoning. This happens automatically; there's nothing to opt into on a per-run basis beyond having documents indexed.
#Removing a document
curl -X DELETE "https://api.agentflowbind.com/v1/knowledge/c1a9e40b-..." -H "Authorization: Bearer afb_live_xxxxxxxxxxxx"204 on success (and its indexed chunks are removed along with it); 404 for an unknown id.