Skip to main content
The Agents API lets you create, manage, and chat with agents in your Langdock workspace programmatically. The completions endpoint uses the Vercel AI SDK compatible message format, so you can use agents with the useChat hook and other Vercel AI SDK features.

Before You Start

  • API key scope: Agent endpoints accept an API key with the Agent API (full access) scope. GET /agent/v1/list also accepts the Read Agents scope. The attachment endpoints require the KNOWLEDGE_FOLDER_API scope.
  • Which key: Running an agent works with a workspace key, a personal Platform API key with an Agent scope, or a personal Model Gateway key with Run agents. Managing agents (create, update, publish) needs a Platform API key or a workspace key. Agent endpoints are on https://api.langdock.com, also for Model Gateway keys.
  • Limits: An agent run counts toward the requests and tokens per minute of the agent’s model and toward the key’s spend limit and the agent’s budget. See Limits and usage.
  • Agent access: To use an existing agent with an API key, the agent must be shared with that key. See Sharing Agents with API Keys.
  • Legacy Assistants API: This is the new Agents API with native Vercel AI SDK compatibility. If you’re using the legacy Assistants API, see the migration guide.

Base URL

Dedicated deploymentsReplace api.langdock.com with <your-deployment-url>/api/public in all requests.

Available Endpoints

Agents

Attachments

Guides