Skip to main content
This schema is the authoritative contract for metadata that coding agents attach to LangSmith runs. It defines which fields are required on every run, which fields are expected when the runtime can supply them, and which fields apply only to specific run types. Coding agent integrations use this schema to ensure their traces are consistently structured, queryable, and compatible with LangSmith’s observability and filtering features.

Supported integrations

The following integrations implement this schema:
Integrationls_integration value
Claude Codeclaude-code
OpenAI Codexopenai-codex
Deep Agentsdeepagents-code
Cursorcursor
Pipi
Opencodeopencode
GitHub Copilotcopilot

Global identity block

Every run type must include the following identity fields in its metadata:
FieldDescription
ls_agent_kindHigh-level kind of agent, for example "coding-agent".
ls_integrationIdentifier of the integration emitting the run (see Supported integrations).
ls_agent_runtimeHuman-readable runtime name, for example "Claude Code 1.0.28".
thread_idStable identifier for the conversation thread. Used to group related runs in LangSmith’s Threads view.
ls_trace_schema_versionCurrently "coding-agent-v1".

Availability tiers

Fields in this schema are marked with one of three availability tiers:
TierMeaning
alwaysMust be present on every run.
where_knownRequired whenever the runtime can expose the value. Omit only when the runtime genuinely cannot provide the information.
contextualOptional metadata. Omit when not applicable.

Run types

This schema distinguishes five run types. Some fields apply only to a subset of run types.
Run typeDescription
rootThe top-level run representing a full agent turn or session.
llmA language model call within a turn.
toolA tool invocation within a turn.
subagentA nested or delegated agent run.
interruptedA run that was interrupted before completion.

Required fields by run type

All run types

The global identity block fields are always required on every run type. Additional fields required on all run types:
FieldTierDescription
ls_agent_versionwhere_knownVersion string for the agent runtime, for example "1.0.28".
git_branchwhere_knownActive Git branch in the repository being edited.
git_commit_shawhere_knownFull SHA of the current Git commit.
git_repo_urlwhere_knownRemote URL of the repository.
working_directorywhere_knownAbsolute path of the working directory.

llm runs

FieldTierDescription
ls_model_namewhere_knownModel identifier, for example "claude-opus-4-5".
ls_providerwhere_knownModel provider, for example "anthropic".

tool runs

FieldTierDescription
ls_tool_namealwaysName of the tool invoked, for example "bash" or "computer".

subagent runs

FieldTierDescription
ls_subagent_idalwaysStable identifier for the subagent.
ls_subagent_typealwaysType or role of the subagent, for example "researcher".

interrupted runs

Interrupted runs carry the same fields as root runs. The run type itself signals the abnormal termination state; no additional required fields are added.