Before you begin
Before you start, make sure you have:- Tracing SDK: Installed with tracing:
- Agent credentials: The agent’s own API key in
ATLAN_API_KEYand its workspace inATLAN_WORKSPACE_ID, from an approved secret store. See Send and verify traces.
1
Initialize client at startup
Call
init once when the process starts:2
Identify visitor per request
At the start of each request, identify the visitor with a stable ID from where the request came from, such as a Slack user ID, a ticket requester’s ID, or a calling agent’s handle, not only an email:
identify is idempotent on (identity_source, external_id): calling it on every request refreshes the existing visitor instead of creating a duplicate.3
Carry visitor through run
Wrap the call into your agent, whether LangGraph, CrewAI, the OpenAI Agents SDK, Google ADK, the Claude Agent SDK, or a plain loop, in attribute propagation. It stamps the visitor ID on every span inside, including third-party instrumentation, without changing how the framework runs:
4
Verify visitor on session
Open the agent’s profile, select Sessions, and find the session the run reported. Confirm it shows the visitor’s name or email that you sent in
traits.5
Pre-seed known visitors (optional)
If you already have an export of known users, such as ticket requesters or chat members, identify them up front instead of waiting for each one’s next request:Pre-seeding resolves each known user’s directory match the first time their ID comes through. It does not relink anything already reported: sessions are create-only, so a session created before you called
identify keeps the visitor snapshot it was created with, usually none. There is no bulk relink for past sessions or traces.Troubleshooting
If the agent’s sessions do not appear at all, its runs were probably sent with a personal API key. See Traces appear under person instead of agent.Next steps
- How agent sessions work: Read a session and its turns.
See also
- How trace attribution works: How identity, sessions, and visitors attach to a trace.
- Public API: Session and visitor operations.