Update an agent
Updates the specified agent. All request fields are optional; omitted fields are left unchanged.
Merge semantics follow PATCH conventions:
- Top-level scalars (
name,description) merge field-by-field — sending one does not affect the other. - Nested objects (
runtime,backend,permissions,display,options,tools,subagents,extras) are replaced in full when any of their fields is provided. To preserve existing nested values, include them in your PATCH. - Providing any of
system_prompt,tools,subagents,files, orremove_file_pathstriggers a new file tree commit.
Entries under files are created or replaced by path; paths in
remove_file_paths are deleted. A path may not appear in both.
Validation is atomic: if any entry fails validation, no changes
are applied.
Authorizations
LangSmith API key (lsv2_...).
Path Parameters
Agent ID
Query Parameters
Comma-separated relations to hydrate: owner (resolve owner_id into an owner object) and/or files (raw file map). The legacy include_files=true boolean is a deprecated alias for include=files.
owner, files Body
Sparse update payload
Caller-defined key/value tracking merged into the agent's runtime configuration. Typed runtime fields win on key collision.
Caller-defined key/value tracking attached to the agent's metadata.
Raw file entries created or replaced by path. Triggers a new commit.
Paths to remove from the file tree. Relative paths only.
Subagents. Each entry is written to subagents/<name>/AGENTS.md and subagents/<name>/tools.json. Triggers a new commit.
Agent system prompt. Written to AGENTS.md. Triggers a new commit.
"You are a helpful agent. Use the available tools to answer the user's question."
Tool config. Written to tools.json. Triggers a new commit.
Response
OK
The caller's access level on this agent.
READ, RUN, WRITE "WRITE"
"2026-01-15T09:30:00Z"
"Researches topics and drafts summaries."
Raw file map. Returned only when include_files=true.
"11111111-1111-1111-1111-111111111111"
Deprecated: use system_prompt. Echoed alongside system_prompt with
the same value for backwards compatibility.
True when the caller owns this agent.
true
"Research Assistant"
"7f8e9d0c-1b2a-3948-5766-8594a3b2c1d0"
Opaque identifier for the agent's current revision.
"rev_3f9a2b1c"
Subagents parsed from subagents/<name>/AGENTS.md + subagents/<name>/tools.json.
Agent system prompt parsed from AGENTS.md.
"You are a helpful research assistant."
Tool config parsed from tools.json.
"2026-01-15T09:30:00Z"

