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

list

Copy
list(
  self,
  *,
  id: SequenceNotStr[str] | Omit 
View source on GitHub
=
omit
,
cursor
:
str
|
Omit
=
omit
,
include_count
:
bool
|
Omit
=
omit
,
name
:
str
|
Omit
=
omit
,
page_size
:
int
|
Omit
=
omit
,
search
:
str
|
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
)
->
AsyncPaginator
[
Agent
,
AsyncItemsCursorGetPagination
[
Agent
]
]

Parameters

NameTypeDescription
idSequenceNotStr[str] | Omit
Default:omit

Exact Agent ids (repeat the parameter; maximum 100)

cursorstr | Omit
Default:omit

Opaque pagination cursor

include_countbool | Omit
Default:omit
namestr | Omit
Default:omit
page_sizeint | Omit
Default:omit
searchstr | 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.

Include the total number of visible Agents matching the filters, independent of pagination

Deprecated: use search. Case-insensitive partial Agent name. Ignored when search is provided.

Maximum number of Agents to return

Case-insensitive partial Agent name or ID, ignoring hyphens and spaces. When provided, name is ignored.

Field to sort by. When name or search is set, exact 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