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

# Build with an agent

> Let your coding agent set Lurk up and write the rules. It drafts; a person takes them live.

Lurk is made to be used by agents as much as by people. An agent can read your project, send events, write rules as drafts and preview them. It cannot take anything live, give units by hand, or touch credentials: those wait for a person.

> [!NOTE]
>
> Nothing here is required. Everything an agent does is also an ordinary API call, and a person can do all of it in the dashboard.

> [!TIP]
>
> Want the assistant you already use (Claude, ChatGPT, Cursor, Codex, VS Code) to work in Lurk as you, with no key? See [Connect your assistant](https://docs.getlurk.com/connect-your-assistant.md).

## Four ways in, pick any

> [tab] MCP server
>
> Connect your agent to Lurk's MCP server. It gets typed tools instead of making HTTP calls.
>
> ```json mcp.json theme={null}
> {
>   "mcpServers": {
>     "lurk": {
>       "url": "https://api.getlurk.com/mcp",
>       "headers": { "Authorization": "Bearer lurk_ak_…" }
>     }
>   }
> }
> ```
>
> Make an **agent key** in **Developers → Agents**. Receipts and proposals then carry the agent's name. [All the tools](https://docs.getlurk.com/mcp-tools.md).

> [tab] Instructions
>
> Put the short brief from [Agent instructions](https://docs.getlurk.com/agent-instructions.md) in your agent's instructions file (`AGENTS.md`, `CLAUDE.md`, `.cursor/rules`). It knows the rules that matter: use Staging, keep the key on the server, send idempotency keys, never invent unit names.

> [tab] Agent skill
>
> Give your agent Lurk's [agent skill](https://docs.getlurk.com/agent-skill.md): the same habits as the instructions, with the reasons and reference pages it reads when a task needs them. Agents that load skills (Claude Code reads `.claude/skills/`) use it by themselves; the page says how to install it.

> [tab] Just the docs
>
> These docs are written for agents too. Every page has a **Copy** menu for its Markdown, and the whole site is at [`/llms.txt`](https://docs.getlurk.com/llms.txt) and [`/llms-full.txt`](https://docs.getlurk.com/llms-full.txt). Docs search is also an MCP server: `https://docs.getlurk.com/mcp`.

## A prompt to start from

Paste this into your agent, with a Staging key in `LURK_KEY`. Change the part in brackets.

```text theme={null}
Set up Lurk in this app. Use the project key in LURK_KEY (a Staging project).
1. Read the project first: list its units, rules and events, and the project's setup status. Use the names you find; do not invent any.
2. Find where [users check in / place orders / finish a lesson] happens in this code and send a Lurk event there
   (event name: lowercase words joined by dots, the thing first, for example checkin.scanned). Use the user's own ID
   as `user`. Build the idempotency key from something stable, like the order ID. Keep the key on the server.
3. Write a rule for it as a DRAFT and preview it. Show me the preview.
4. Stop. A person takes rules live. If a proposal link comes back, give it to me.
Docs: https://docs.getlurk.com/llms.txt
```

## What an agent can and cannot do

| An agent can | An agent cannot |
| - | - |
| Read units, rules, receipts, events, budgets, people | Take a rule live |
| Send events | Give units by hand, or undo a receipt |
| Create and edit rules as drafts, and preview them | Create or change units (a project key can; an agent key cannot) |
| Ask a person to approve a change (a proposal) | Decide a proposal, or a held change |
| Pause a rule | See or make keys, team or settings |
| Move a Staging project's clock for a test | Copy between projects |
| Tell the Lurk team about a bug or a gap, once you have said yes ([Send feedback](https://docs.getlurk.com/guides/send-feedback.md)) | |

When something needs a person, the call answers `approval_required` with a link. That is not a failure: give the link to the person and stop. See [Going live](https://docs.getlurk.com/guides/going-live.md).

## Keep it safe

* Use an **agent key** (`lurk_ak_`), one per agent, so you can revoke one without touching the others.
* Point agents at **Staging** while they build. A Staging project is separate from Production: its own users, rules and keys.
* Never paste a key into a prompt that is logged or shared. Put it in an environment variable and let the agent read the variable.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.