# AI Agent Examples



> Each example demonstrates one safe Mailrith workflow, lists its required permissions, and keeps reads, retries, writes, and stored data bounded.



- Human page: https://mailrith.com/developers/agent-examples

- Markdown page: https://mailrith.com/developers/agent-examples.md

- Category: AI Agent Platform

- Reading time: 5 min read

- Last updated: 2026-08-24

- Related keywords: AI Agent Examples, AI Agent Examples developer docs, AI Agent Platform, AI Agent Platform developer docs, Mailrith developer docs, Mailrith public API, Example Workflows, Run An Example Safely, AI Agent Quickstarts, SDKs, AI Agent Client Compatibility



## AI Agent Notes

- Use this page as implementation guidance, then validate exact endpoint fields against the OpenAPI document.

- Keep API keys server-side and workspace-scoped unless a guide explicitly says otherwise.

- Do not invent privacy, consent, or lawful-basis evidence. Send only fields that appear in the OpenAPI schema for the endpoint you are using.



## What This Guide Covers

Use small reporting, Subscriber sync, and complete Broadcasts examples with focused Work Profiles and bounded work.



## Example Workflows

The repository includes three small examples built on the official SDK and CLI contract. Each example has one task, lists its Work Profile, limits pagination, carries request IDs, and uses a task-specific credential.

- Reporting agent: bounded capability, Subscriber, Broadcast, and progress reads.
- Subscriber-sync agent: idempotent upserts with stable source keys and no bulk status changes.
- Broadcasts agent: creates and reads a draft, runs preflight, and can send once with a stable idempotency key when the requested task includes delivery.

## Run An Example Safely

1. Use a dedicated test workspace and a dedicated OAuth connection or task-specific key.
2. Read the example's required permissions and remove any permission the test does not need.
3. Set secrets in the environment. Do not edit secrets into the example source or configuration.
4. Run capability discovery before the example's first operation.
5. Keep the default page and polling limits during the first run.
6. For examples that change workspace data, read the saved resource or progress endpoint to confirm the result. Delete test resources when the run is complete.

**Example Directory**

```text
examples/agents/reporting
examples/agents/subscriber-sync
examples/agents/broadcasts
```



## Related Guides

- [AI Agent Quickstarts](https://mailrith.com/developers/agent-quickstarts.md): Start with the Mailrith plugin, the Mailrith Connector, or a scoped MCP connection. Then follow task-based paths for read-only, Broadcast, Sequence, and safe test-workspace workflows.

- [SDKs](https://mailrith.com/developers/sdks.md): Mailrith ships official TypeScript and Python SDKs generated from the same public contract that powers the OpenAPI document and capability map.

- [AI Agent Client Compatibility](https://mailrith.com/developers/agent-compatibility.md): The Mailrith plugin is available for ChatGPT and Codex, and the Mailrith Connector is available for Claude. Both use OAuth, while other supported clients can use scoped MCP connections.
