Detected country: US
logo
Sign InBook a Demo
GuideRecipesDeveloper

Developer Docs

  • Developer foundations
    • How do I authenticate with the Ballet API?
    • How do I connect to Ballet's MCP endpoint?
    • How do I run a playbook over the REST API?
    • How do I stream playbook run events?
    • How do I trigger and react to playbooks with webhooks?
    • How do I wake a suspended run with reply or resume?
  • How do I use Ballet playbooks in an agent framework?
    • How do I call Ballet playbooks from Google ADK?
    • How do I call Ballet playbooks from LangChain?
    • How do I call Ballet playbooks from Mastra?
    • How do I call Ballet playbooks from Pydantic AI?
    • How do I call Ballet playbooks from the Vercel AI SDK?
  • How do playbooks connect to external systems?
    • How do I call external APIs and SDKs from a playbook?
    • How do I connect external MCP servers to playbooks?
    • How do I use secrets and env vars in steps?
  • Introduction
Loading…
logo

Powered by

Introduction

TL;DR: Build on Ballet programmatically. Run playbooks from your own apps and agents over the REST API or Ballet's MCP endpoint, stream live run events, wake suspended runs, and connect playbooks out to external systems and SDKs. Start with an API token, call a playbook, then wire it into an agent framework like the Vercel AI SDK, LangChain, Mastra, or Google ADK.

Who this is for

Developers integrating Ballet with custom apps, backend services, CI/CD, or agent frameworks — in either direction.

What can I build?

Ballet integrations go two ways:

  • Call into Ballet — external apps and agents invoke playbooks as tools. Use the REST API for direct control or the MCP endpoint to expose playbooks (and agents, skills, tools) to any MCP-aware client.
  • Connect Ballet out — playbooks reach external systems and SDKs from inside steps, via MCP connectors, HTTP steps, and custom tools.

Where do I start?

  1. Create a workspace API token in Settings → API tokens.
  2. Read Foundations to run a playbook over REST and stream its events.
  3. For durable human-in-the-loop, see Wake a suspended run.
  4. To wire Ballet into an agent, see Agent frameworks.
  5. To let playbooks reach your systems, see Connecting to external systems.

How is this organized?

  • Foundations — authentication, REST API, streaming run events, wake suspended runs, webhooks, and the MCP endpoint.
  • Agent frameworks — call Ballet playbooks as tools from Vercel AI SDK, LangChain, Mastra, and Google ADK.
  • Connecting to external systems — MCP connectors, HTTP and custom tools, and secrets in steps.

Related articles

  • How do I create and use API tokens?
  • How do I wake a suspended run with reply or resume?
  • How do I connect an MCP server?
  • What triggers can start a playbook?
  • How do I run a playbook?