docker run -d -p 4700:4700 -v agentx-data:/data \ ghcr.io/agentx-ai/agentx-selfhost # or build from the repo's Dockerfiledocker logs <container> # the API key is printed here
Every path downloads a prebuilt release - no Node, Go, or Bun needed. The startup log prints
the line you’ll need next:
AgentX self-host engine listening on http://localhost:4700Default project API key: agtx_local_...
2
Connect the dashboard
--dev opens http://localhost:4700 in your browser. The first visit shows a connect
screen - paste the Default project API key from the startup log and you’re in. The key
is stored in that browser only; the sidebar’s Disconnect button forgets it.
3
Trace your agent
Point the SDK at the engine with the same key:
export AGENTX_API_BASE_URL=http://localhost:4700/api/v1export AGENTX_API_KEY=agtx_local_... # from the startup log
Then wrap your agent - a decorator for the simple case, a context manager for full control:
from agentx import AgentXclient = AgentX.from_env()@client.tracer.trace("my-agent")def answer(query: str) -> str: # your agent logic - args become the input, the return value the output return run_my_agent(query)answer("How do I reset my password?")client.tracer.flush(timeout=10) # send queued traces before a short script exits
from agentx import AgentXclient = AgentX.from_env()query = "How do I reset my password?"with client.tracer.trace("my-agent", input={"query": query}, model="gpt-4o-mini") as span: answer = run_my_agent(query) span.output = answerclient.tracer.flush(timeout=10)
Using LangChain, OpenAI Agents, CrewAI, or another framework? A one-line integration captures
the full execution tree automatically - see Framework Integrations.
4
See it in Observe
Open Observe → Live Traces. Your trace appears within seconds - click it for the full
detail: input/output, latency, tokens, estimated cost, and (for multi-step agents) the
Execution Timeline and Graph views of every step.
A traced LangGraph run: graph nodes, LLM calls, and tool calls as one tree.
Provider keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY)
unlock the LLM-judge features - evaluation scoring, online evaluators,
semantic patterns. Set them as environment variables on the engine or later
from the dashboard’s Platform Settings. Tracing itself needs none.