curl away.
1
Create a key
In the console, Configuration → API keys → Create key. Give it the scopes
landings:write, knowledge:write, knowledge:read and chat:write, and copy the secret; it is shown once. Write never implies read: knowledge:read is what polling sources and the retrieval probe below need.2
Confirm the key works
3
Create an agent
An agent is the brain the conversation answers from.
4
Teach it something
Add a fact. Ingestion is asynchronous: this answers Poll
202 with the source pending.GET $WDY/knowledge/sources until the source is ready.5
Ask it something
The generative turn spends one message credit and returns the answer plus any components it chose to render.Continue the conversation by passing the
conversationId back. For a token-by-token stream, send Accept: text/event-stream.