Skip to main content
Build an agent on Plain with your own models and tools. It gets an identity, receives events, and calls the same GraphQL API the app uses. The model, prompts, and tool use are yours. These pages cover identity, webhooks, and the mutations to call back.
Bring your own agent is currently free to use while in beta.
This guide is for agents that run inside Plain. To connect an external agent to support data in Plain, use the MCP server.

What you need

A machine user

Identity, public name, avatar, and API keys.

A webhook listener

HTTPS endpoint. Thread events for a support agent; discussion.* for an internal agent.

A GraphQL client

Reads and writes: threads for a support agent, discussions for an internal agent.
When something happens in Plain, it delivers a webhook to your endpoint. Your code decides whether the agent should act and uses the GraphQL API to do it. Agents come in many shapes. A support agent might reply to every new thread, or only when assigned, or never reply at all and only classify, summarize, or post internal notes. An internal agent answers your team where they ask Sidekick. The building blocks above are the same; the events and mutations are not.

Support or internal

Both start with a machine user. They do not share events or mutations. Either can search knowledge sources.

Build a support agent

Assigned to customer threads. Reads, replies, reports status, hands off to a user.

Build an internal agent

Answers users in Ask Sidekick. Reports status and tool calls; can wait on Approve or Deny.

Also in this section

Searching knowledge

Search Help Center articles and indexed documents.

Agent integrations

MCP, skills, and Cursor, if you are not building an in-product agent.