Before you begin
Before you start, make sure you have:- Bearer credential and shell variables: The
ATLAN_GATEWAY_URLandATLAN_TOKENvariables you set in Connect to Registry: Prepare your shell are the same ones used here. No new credential setup is needed. - Workspace ID: Any agent you register belongs to exactly one workspace. Use the workspace list you ran in Connect to Registry: List your workspaces and pick the ID where you want this agent to live.
Prepare your shell
This lesson introduces one new variable. Export your workspace ID so the examples below can use it directly:Create your agent record
The registration is two calls: one write and one read back. The write creates the record; the read back confirms it is stored exactly as you sent it.1
Choose your agent fields
An agent registration is valid with exactly two fields: a machine name and
a workspace. Every other field is optional, but two of them are worth
setting now.
display_name is what appears in the product UI: the label a person sees
when they look up the agent. instructions become the system prompt when
the agent runs, so a clear, specific brief here makes the agent more
predictable.- CLI
- JavaScript
The CLI reads your agent definition from a local file. Create
agent.yaml in your working directory with these fields:name must be a stable machine identifier: lowercase, no spaces. You
use it in scripts and references, not as a display label. The workspace
comes from the --workspace flag in the next step, not the file.2
Register your agent
Send the definition to the Registry. The Registry creates the record and
returns its stable The CLI shows the plan before writing and asks for confirmation. Review
the fields, then approve. The output includes the new agent’s ID.Copy the
id. This ID is how every future call (sessions,
traces, updates) refers to this agent. The name is not unique across
workspaces; the ID is.- CLI
- JavaScript
id from the output. You need it in the next step and in every
lesson that follows.3
Read your agent back
A successful response means the Registry accepted the request. Reading
back by ID confirms the record is stored, readable, and matches what you
sent: a check worth making before you build on top of it.Confirm the response shows the name, workspace, and instructions you
provided. If the read returns an error, see
Errors and retries before
continuing.
- CLI
- JavaScript
4
Export your agent ID
Every call in the next lesson references this ID. The agent name is not
guaranteed unique, so always use the ID rather than looking the agent up by
name. Export it now so it is ready without a lookup later: