Chat with the Agent over project, org, or Open Library knowledge
Multi-turn conversational endpoint. Supports both synchronous JSON
responses and server-sent event (SSE) streaming via stream: true.
search_scope picks the corpus: project (project_id required),
org (the org’s own documents), or open_library (the shared Open
Library corpus — requires the api.open_library feature and cannot be
combined with chat_type). When omitted, the scope is derived from
project_id presence. Scope is per-request: multi-turn Open Library
conversations re-send it with each request.
chat_type picks the agent: general/project (org or project
knowledge) or safety (the shared safety corpus — requires the
Safety Assistant to be enabled for the organization via Agent
Allocation, otherwise 403 AGENT_NOT_ENABLED). When omitted, the
agent is inferred from the message among the agents enabled for the
organization.
Authentication
Pyramid API key (prefix with “Bearer ”)
Request
Which corpus the query searches. Exclusive — one request searches one corpus.
project— the given project’s document chunks (project_idrequired).org— the organization’s own org-level documents (project_idmust be omitted).open_library— the shared Open Library corpus of Hong Kong government engineering documents (project_idmust be omitted). Requires theapi.open_libraryfeature to be enabled for your organization. When omitted, the scope is derived for backward compatibility:projectwhenproject_idis present,orgotherwise.
Response
Chat response (JSON when stream=false, SSE when stream=true)
Server-generated per-request UUID. Also sent as X-Request-Id response header. Include in support tickets.
Present only on list endpoints. Top-level (not nested inside data).