Connect an agent to a knowledge base
Records which knowledge base an agent works out of, on agents.metadata.brain_knowledge_base_id. Idempotent: connecting an already-connected agent re-points it and refreshes connected_at. This is a default for clients that read it, NOT a permission — every content route already accepts knowledge_base_id and resolves it company-scoped, so this grants and withholds nothing. The AGENT is scoped to the calling tenant_user, not to the company: a brain is shared by the company (brain_knowledge_bases has no tenant column) but an agents row is not, so an agent belonging to another tenant_user answers 404 resource_not_found — the same answer /v1/employees gives for it.
Authorizations
Workspace API key. Create one via the dashboard or POST /v1/auth/keys.
Body
Response
The connection. 200 rather than 201: the binding is a property of the agent.