LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithresourcesagentsAsyncAgentsResourceupdate
Method●Since v0.14

update

Copy
update(
  self,
  agent_id: str,
  *,
  agent_type: Literal['CUSTOM', 'CODING'] |
View source on GitHub
Omit
=
omit
,
name
:
str
|
Omit
=
omit
,
source_type
:
Literal
[
'LSD'
,
'MDA'
,
'EXTERNAL'
,
'FLEET'
]
|
Omit
=
omit
,
extra_headers
:
Headers
|
None
=
None
,
extra_query
:
Query
|
None
=
None
,
extra_body
:
Body
|
None
=
None
,
timeout
:
float
|
httpx
.
Timeout
|
None
|
NotGiven
=
not_given
)
->
Agent

Parameters

NameTypeDescription
agent_typeLiteral['CUSTOM', 'CODING'] | Omit
Default:omit

New classification. Omit to keep the current classification.

namestr | Omit
Default:omit

New display name. Omit to keep the current name.

source_typeLiteral['LSD', 'MDA', 'EXTERNAL', 'FLEET'] | Omit
Default:omit
extra_headersHeaders | None
Default:None
extra_queryQuery | None
Default:None
extra_bodyBody | None
Default:None
timeoutfloat | httpx.Timeout | None | NotGiven
Default:not_given

Updates an Agent's name, source_type, or agent_type.

Omitted fields keep their values. Changing agent_type requires workspaces:manage in addition to project update access; repeating the current type is a no-op. Source type can change only for an EXTERNAL Agent without runtime bindings. The id is immutable and is rejected when present. Requires update permission on every environment project.

New runtime kind. Only EXTERNAL agents without runtime bindings can change kind.

Send extra headers

Add additional query parameters to the request

Add additional JSON properties to the request

Override the client-level default timeout for this request, in seconds