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

# Bring your own agent

> Already have an agent project? Point Pome at it — one paste-prompt registers it and writes a pome.json, ready for its first scored run.

The [quickstart](/getting-started) runs a bundled example so you can watch a
scored run without any code of your own. This page is the next step up: you
already have an agent in a repo, and you want Pome to test **that one**. One
paste-prompt takes you from your repo to a registered agent with a written
`pome.json` — the manifest Pome runs from — without you hand-authoring
anything. The first scored run picks up from there.

## Start with the example

Examples are the fastest way to learn the loop, so do the
[quickstart](/getting-started) first if you haven't. Its paste-prompt takes the
bundled `support-triage` examinee through a full run and shows you a real
failing score (**33, not 0 or 100**) and the one-line fix. Five minutes, and
you'll recognize every step the coach takes on your own agent next — this is a
teaching step, not a detour.

## Before you start

* The quickstart's setup, done once: the coach skills installed
  (`npx skills add pome-sh/digital-twins`) and the Pome MCP connected
  (`claude mcp add --transport http pome https://mcp.pome.sh/mcp`).
* The **Pome CLI**, which writes and reads the manifest:

  ```bash theme={null}
  npm install -g @pome-sh/cli
  pome login
  ```

  `pome login` opens `app.pome.sh`, signs you in, and stores a `pme_…` key in
  your macOS Keychain (or `~/.pome/credentials.json`). CI can set
  `POME_API_KEY` instead.
* **Your agent's repo**, open in Claude Code — the one you want to test. It
  should talk to a service Pome has a twin for (GitHub, Slack, Stripe, Gmail,
  Linear), and you should know how it starts (e.g. `npm start`).

## Register your agent

Open Claude Code **in your agent's repo** and paste:

```text theme={null}
Connect this repo to Pome as my own agent — take it up to a registered agent
with a written pome.json, and stop there. Do not run it yet.

1. Confirm I've already seen a scored run on the bundled support-triage
   example (the quickstart). If I haven't, tell me to do that first — the
   example is how the loop is taught.
2. Scaffold the manifest so I never hand-write it: run `pome init` in this
   repo (use `pome init --sdk claude` if this is a Claude Agent SDK project).
   That writes a starter pome.json.
3. Set `command` in pome.json to how THIS agent actually starts — detect it
   from package.json / the repo (e.g. `npm start`) and replace the scaffold
   default. Confirm the command with me before writing it.
4. Register the agent so runs scope to this project:
   `pome register agent "<a short name>" --twins <services it uses, e.g. github,slack>`.
   This POSTs the identity and writes the server-canonical agent.slug back
   into pome.json.
5. Show me the final pome.json (agent.slug + command + twins) and the
   dashboard line register printed. Stop here — the first run is the next step.

Guardrails: keep every command plain text and show it to me before running;
never write secrets or URLs into source. pome.json is safe to commit; the
agt_ id register caches under .pome/ is not — leave it gitignored.
```

The coach runs the CLI on your behalf and shows you each command first. When
it's done, your repo has a `pome.json` you never typed by hand and a registered
agent on the dashboard.

<Note>
  The registered `agt_…` id is cached in gitignored `.pome/link.json`, never in
  the committed manifest — `pome.json` carries only the portable `agent.slug`, so
  forking a repo can't collide two projects onto one cloud agent.
</Note>

## What you have now

* **`pome.json`** — `agent.slug`, the real start `command`, and the `twins`
  this agent may exercise. This is the manifest every run reads.
* **A registered agent** on `app.pome.sh`, scoped to your team.

That's the connection. Two steps remain before a score, and both are their own
paths:

1. **Preflight the wiring.** Run `pome doctor` in the repo. It runs four checks
   in order — valid `pome.json` command, twin reachable, no production host
   surviving in agent source, egress locked to the twin — and stops at the
   first red with one named cause and one fix. A green preflight is the gate:
   don't launch a run until `pome doctor` exits clean. See
   [Troubleshooting](/docs/troubleshooting).
2. **Your first run.** With the wiring green, the coach suggests a first task
   matched to your agent and takes it to a scored report — the same
   run → read the failure → fix → re-run loop the example taught you. The
   [MCP workflow](/docs/mcp/workflow) is that loop, call by call.

## Next

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/getting-started">
    The example run this path builds on — see a scored run end to end first.
  </Card>

  <Card title="Preflight with pome doctor" icon="stethoscope" href="/docs/troubleshooting">
    The four wiring checks between a registered agent and a real run.
  </Card>

  <Card title="Which surface?" icon="layout-grid" href="/docs/which-surface">
    CLI, skill, MCP, dashboard — the same loop from wherever you drive it.
  </Card>

  <Card title="Dashboard" icon="gauge" href="/docs/dashboard">
    Where your registered agent, runs, and judge feedback live: app.pome.sh.
  </Card>
</CardGroup>
