Skip to content

Contexts

Contexts are structured knowledge bundles that Chao reasons over. A Context can contain documents, live connector snapshots, prior chain outputs, web pages, or notes. Users curate Contexts. Agents consume them. Chao synthesizes them into grounded responses.

Status: Planned (Phase 1, Milestone M1.2)

Endpoints

MethodPathDescriptionAuthRate Limit
POST/contextsCreate a ContextJWT + Entitlement30/min
GET/contextsList user ContextsJWT60/min
GET/contexts/:idGet a Context + sourcesJWT60/min
PATCH/contexts/:idUpdate name/visibilityJWT30/min
DELETE/contexts/:idDelete a ContextJWT30/min
POST/contexts/:id/sourcesAdd a source (upload, URL, connector)JWT30/min
DELETE/contexts/:id/sources/:sourceIdRemove a sourceJWT30/min
POST/contexts/:id/refreshTrigger manual refreshJWT10/min
POST/contexts/:id/search?q=Semantic search within ContextJWT60/min

Context Source Types

TypeDescriptionRefresh
documentPDF, Markdown, CSV, HTML fileManual re-upload
connector_snapshotCurrent Notion page, GitHub issues listConfigurable interval
chain_outputOutput of a chain executionOn chain completion
webLive fetch of a URLOn-demand or scheduled
noteFree-text written directlyManual

Create Context

Request

FieldTypeRequiredDescription
namestringYesContext name
visibilitystringNoOne of: private, workspace, org. Default: private

Add Source

Request

FieldTypeRequiredDescription
typestringYesOne of: document, connector_snapshot, web, note
contentstringConditionalRequired for note type
urlstringConditionalRequired for web type
connectorIdstringConditionalRequired for connector_snapshot type
refreshIntervalMinutesnumberNoAuto-refresh interval (connector/web sources)

Request

ParamTypeRequiredDescription
qstringYesSearch query
topKnumberNoMax results (default: 5)

Response

json
{
  "data": [
    {
      "content": "The product spec mentions...",
      "sourceId": "src-123",
      "sourceType": "document",
      "relevanceScore": 0.92
    }
  ]
}

Built with purpose.