Get a key
Matrices is in early access, so there’s no self-serve sign-up yet. Once your workspace exists, its owner creates API keys in the console under Workspace → API keys. Keys belong to the workspace: one reaches every agent in it, unless the owner scoped it to a single agent. This walkthrough creates things, so use a key that isn’t scoped to an agent. You’ll also need curl and jq. Export the key:1. Pick a role
An agent gets its tools from the roles in its profile. Every workspace starts with anAdministrator role that allows every tool (tool:*). Grab its ID:
GET /v1/roles, or create one that allows everything:
2. Create a profile
A profile is the configuration agents run on:modelslists the models it may use, in order: exact IDs, aliases likematrices/auto, or wildcards. See Models.instructionsis what the agent carries into every turn. See Profiles.roleIdsis where every tool comes from. See Roles.
hooks gives the profile the default approval hooks, so risky
calls like sending email wait for a person. See Hooks.
3. Create the agent
identity is who the agent acts for, and it never changes. See
Identities. Several agents can share one profile. You can
also send the configuration inline as profile instead of profileId, which
creates a profile just for this agent.
4. 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.
5. 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.