Skip to main content
Enables or disables an agent in your workspace. Disabled agents cannot be used by workspace members until re-enabled.

Before You Start

  • 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.
  • Admin action: This is an administrative action. Only workspace admins or users with appropriate permissions can disable/enable agents.

Base URL

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

Use Cases

  • Temporarily disable an agent that needs maintenance or updates
  • Re-enable a previously disabled agent
  • Control agent availability during rollouts or testing

Parameters

Example

Response Format

Success Response (200 OK)

Error Handling

Behavior

When an agent is disabled:
  • Users cannot start new conversations with the agent
  • The agent does not appear in the agent library for regular users
  • Existing conversations may still be viewable but the agent cannot respond
  • Admins can still view and manage the agent
  • The agent can be re-enabled at any time
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.