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
PythonlangsmithresourcesagentsAgentsResourcelist
Method●Since v0.14

list

Copy
list(
  self,
  *,
  id: SequenceNotStr[str] | Omit =
View source on GitHub
omit
,
cursor
:
str
|
Omit
=
omit
,
name
:
str
|
Omit
=
omit
,
page_size
:
int
|
Omit
=
omit
,
sort_by
:
Literal
[
'last_run_start_time'
,
'name'
,
'created_at'
]
|
Omit
=
omit
,
sort_order
:
Literal
[
'asc'
,
'desc'
]
|
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
)
->
SyncItemsCursorGetPagination
[
Agent
]

Parameters

NameTypeDescription
idSequenceNotStr[str] | Omit
Default:omit

Exact Agent ids (repeat the parameter; maximum 100)

cursorstr | Omit
Default:omit

Opaque pagination cursor

namestr | Omit
Default:omit
page_sizeint | Omit
Default:omit
sort_byLiteral['last_run_start_time', 'name', 'created_at'] | Omit
Default:omit
sort_orderLiteral['asc', 'desc'] | Omit
Default:omit
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

Returns Agents visible to the caller.

Each item is the same Agent shape as GET /api/v1/agents/{agent_id}, including the environments the caller may read. The list never embeds runtime bindings. An unknown query parameter, including limit, returns 400; use page_size to set the page size.

Case-insensitive partial Agent name

Maximum number of Agents to return

Field to sort by. When name is set, exact name matches still come first.

Sort direction

Agent source type

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