Every span in LumiqTrace has aDocumentation Index
Fetch the complete documentation index at: https://docs.lumiqtrace.com/llms.txt
Use this file to discover all available pages before exploring further.
span_kind field that describes the type of operation it represents. The span kind controls how the span is rendered in the flame graph, which icon it gets in the trace detail view, and how it is counted in agent analytics. Understanding span kinds is essential for building multi-agent systems that look correct in the dashboard.
Complete span kind reference
llm
A direct call to a language model API. This is the most common span kind. Set automatically by all provider wrappers (
wrapOpenAI, wrapAnthropic, wrapGoogle, etc.).agent
The execution scope of a single agent. Created by
withAgent() in TypeScript, with_agent() in Python, and the ADK/LangChain integrations automatically. Contains all child spans produced during the agent’s run.tool
A single tool or function invocation by an agent. Created by
agent.traceTool() or automatically by the LangChain and ADK integrations when a tool is called.planning
A planning step created by
agent.logPlan(). Records the steps the agent intends to take before executing them. Useful for debugging agent reasoning.handoff
An agent-to-agent delegation. Created by
agent.delegateTo() or automatically by multi-agent frameworks. Links to the target agent span in the trace tree.retriever
A document retrieval operation (vector search, keyword search, hybrid). Set on manual spans in RAG pipelines via
startSpan({ span_kind: "retriever" }) or automatically by the LangChain retriever handler.guardrail
A guardrail check execution. Set automatically when the SDK’s guardrail client makes a check request. Shows pre/post phase, action taken (allowed/blocked/redacted), and latency.
general
A generic custom operation that doesn’t fit another category. The default for manually created spans that don’t specify a
span_kind.Flame graph rendering
Each span kind is rendered differently in the trace flame graph:| Span kind | Color (dark theme) | Icon | Indentation |
|---|---|---|---|
llm | Cyan (#00d4ff) | CPU chip | Based on nesting depth |
agent | Purple | Bot | Creates a group header |
tool | Amber | Wrench | Child of agent span |
planning | Slate | List | Child of agent span |
handoff | Blue | Arrow | Child of agent span |
retriever | Green | Search | Child of LLM or general span |
guardrail | Orange | Shield | Before/after LLM span |
general | Gray | Circle | Based on nesting depth |
Setting span kind manually
When creating a manual span withstartSpan(), set the span_kind explicitly:
- TypeScript
- Python
How span kinds appear in the agent registry
The Agents section of the dashboard uses span kinds to build its agent registry:- Spans with
span_kind: "agent"appear as agent nodes - Their
parent_span_idis used to build the coordinator-specialist hierarchy toolspans are aggregated under their parent agent to build the tool inventoryhandoffspans are used to draw delegation arrows between agents
agentRole: "coordinator" on orchestrators and agentRole: "specialist" on sub-agents.

SpanKind in the event schema
Thespan_kind field is part of the LumiqEvent schema sent to the ingest endpoint. When building a custom integration (not using an SDK wrapper), include it explicitly:
"llm", "agent", "tool", "planning", "handoff", "retriever", "guardrail", "general".