> ## Documentation Index
> Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Example agents

> Working agents built on the Plain API that you can run locally and copy from.

[`team-plain/example-internal-agents`](https://github.com/team-plain/example-internal-agents) holds two working agents.

Both answer users in [discussions](/docs/agents/discussions), receive webhooks on a local endpoint, and gate the one action a customer would see behind an [approval](/docs/agents/tool-calls#ask-for-approval). They differ in how much of the agent loop they hand to a framework.

| Agent                                                                                                        | Built with                                  | What it shows                                                   |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------- | --------------------------------------------------------------- |
| [`example-eve-agent`](https://github.com/team-plain/example-internal-agents/tree/main/example-eve-agent)     | [Vercel eve](https://github.com/vercel/eve) | Durable sessions, one per discussion, with a ready-made harness |
| [`example-aisdk-agent`](https://github.com/team-plain/example-internal-agents/tree/main/example-aisdk-agent) | [Vercel AI SDK](https://ai-sdk.dev)         | Owning the model loop yourself, with no framework in between    |

## The tools

Both agents give the model the same 5 tools, each a call on Plain's API:

* **`list_thread_queue`** and **`search_threads`**: find a thread when the discussion wasn't opened on one
* **`read_customer_thread`**: paginates `timelineEntries` and concatenates `llmText`, as in [read the thread](/docs/agents/threads#read-the-thread)
* **`search_knowledge`**: calls `searchKnowledgeSources`, as in [using knowledge](/docs/agents/searching-knowledge)
* **`reply_to_customer`**: reports the tool call, asks for approval, waits for the decision, then calls `replyToThread`

## Running one

Each README walks through the setup: a machine user with the Custom agent type, the permissions to grant, a public URL for the webhook target, and the events to subscribe to.

From there, open a thread in Plain, click **Ask Sidekick**, pick your agent, and ask it to help.
