Authenticate with
Authorization: Bearer flowyte_sk_…. All paths below are relative to https://builder.flowyte.com/api/v1.What you’ll use
| Action | Endpoint | Scope |
|---|---|---|
| Add a source | POST /agents/{agentId}/knowledge/sources | knowledge:write |
| Poll ingest status | GET /agents/{agentId}/knowledge/sources/{id} | knowledge:read |
| Preview retrieval | POST /agents/{agentId}/knowledge/preview | knowledge:read |
| Review gaps | GET /agents/{agentId}/knowledge-gaps | analytics:read |
| Curate a gap | PATCH /agents/{agentId}/knowledge-gaps/{gapId} | analytics:write |
Add a source
A source has a The source is created with
kind (url, file, text, or faq) and a label. Use url to crawl a
page, text to paste content inline, or file with a file_id from an upload.status: "pending". Capture data.id as SOURCE_ID.Poll until indexed
Ingestion is asynchronous — the source moves
pending → indexed. Poll the source every
few seconds until data.status is indexed. Don’t rely on it before then.Preview retrieval
Before you trust it, ask what the agent would retrieve for a real question.
preview returns
the matching chunks and a topScore — a low score or empty chunks means the answer isn’t
covered yet.Review knowledge gaps
Once callers start talking to the agent, the questions it couldn’t answer surface as
knowledge gaps — deduped and, above a small volume floor, ranked by how often and how
recently they hit. This is the loop that makes the agent better over time.The response’s
dataState is collecting until enough calls land, then ready. When
ranked is true, each gap carries a gapId, rankScore, and classification.