Retrieves details of an existing agent
Agents API
Agent Get API
Retrieve details of an existing agent
GET
Retrieves details of an existing agent
Documentation Index
Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
Use this file to discover all available pages before exploring further.
⚠️ Using our API via a dedicated deployment? Just replace
api.langdock.com with your deployment’s base URL: <deployment-url>/api/publicThis is the new Agents API with native Vercel AI SDK compatibility. If you’re using the legacy Assistants API, see the migration guide.
Returns the agent’s active (published) version. If the agent has never been published, returns the current draft instead.
Requires an API key with the
AGENT_API scope and access to the agent you want to retrieve.Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | UUID of the agent to retrieve |
Examples
Basic Retrieval
Validation Rules
The API enforces the following validation rules:- Agent access - Your API key must have access to the agent
- Workspace match - Agent must belong to the same workspace as your API key
Response Format
Success Response (200 OK)
Error Handling
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.