diff --git a/src/langsmith/coding-agent-metadata-contract.mdx b/src/langsmith/coding-agent-metadata-contract.mdx index 31fde05b3a..3786a27fa3 100644 --- a/src/langsmith/coding-agent-metadata-contract.mdx +++ b/src/langsmith/coding-agent-metadata-contract.mdx @@ -28,7 +28,8 @@ Every run type must include the following identity fields in its metadata: | Field | Description | |---|---| -| `ls_agent_kind` | High-level kind of agent, for example `"coding-agent"`. | +| `ls_agent_type` | The run's type within the agent. Should be one of `"root"`, `"subagent"`, `"middleware"`, or `"compaction"`. | +| `ls_agent_purpose` | High-level purpose of the agent, for example `"coding"`. | | `ls_integration` | Identifier of the integration emitting the run (see [Supported integrations](#supported-integrations)). | | `ls_agent_runtime` | Human-readable runtime name, for example `"Claude Code 1.0.28"`. | | `thread_id` | Stable identifier for the conversation thread. Used to group related runs in LangSmith's Threads view. | diff --git a/src/langsmith/trace-with-cursor.mdx b/src/langsmith/trace-with-cursor.mdx index 83ce2c499f..aa63d0c569 100644 --- a/src/langsmith/trace-with-cursor.mdx +++ b/src/langsmith/trace-with-cursor.mdx @@ -141,7 +141,7 @@ Every run carries the shared `coding-agent-v1` metadata contract on `run.extra.m | Scope | Keys | | --- | --- | -| Always present | `ls_agent_kind` (`"coding_agent"`), `ls_integration` (`"cursor"`), `ls_agent_runtime` (`"Cursor"`), `ls_trace_schema_version` (`"coding-agent-v1"`), `thread_id` (= Cursor's `conversation_id`). | +| Always present | `ls_agent_type` (`"root"`, `"subagent"`, `"middleware"`, or `"compaction"`), `ls_agent_purpose` (`"coding"`), `ls_integration` (`"cursor"`), `ls_agent_runtime` (`"Cursor"`), `ls_trace_schema_version` (`"coding-agent-v1"`), `thread_id` (= Cursor's `conversation_id`). | | Present where known | `ls_integration_version`, `ls_agent_runtime_version` (Cursor's `cursor_version`), `turn_id` (= Cursor's `generation_id`), `turn_number`, `repository_url`, `repository_provider`, `repository_name`, `git_branch`, `git_commit_sha`, `cwd`. | | Contextual | `local_username`, `user_email` (provisional). | | Subagent runs only | `ls_subagent_id`, `ls_subagent_type`. |