1. Create an agent
An agent gets its tools from the roles in its profile. Every new workspace comes with anAdministrator role that grants all tools (tool:*). Grab its ID:
identityis who it acts for, and it never changes. See Identities.roleIdsis where every tool comes from. See Roles.modelslists the models it may use, in order, as exact IDs or wildcards. See Models.systemPromptis the instructions it always carries. See Profiles.
profile inline creates a profile just for this agent. Create profiles
separately when several agents should share one.
2. Start a thread
Start a thread by sending the agent its first user prompt as a text content block:turnId and a status. The turn runs in the
background.
3. Stream the result
Connect to the thread’s event stream to watch the agent reply:GET /v1/threads/{threadId}/events,
which you can read back any time. See Threads.
What’s next
How it fits together
Every noun, and what owns what.
Build a real agent
Roles, profiles, and identity, in the order they matter.
Narrow the permissions
Cut an agent down to the tools it should have.
Connect a service
Give an agent credentials without showing the model a secret.