# Build with AI agents

> Connect an AI agent to your workspace through the MCP server, the CLI or the API, and use the agent skill to teach it the rest.

An AI agent can do anything in your workspace that you can, but only with the access you give it. It acts as **you**, and the audit log records everything it does.

There are three ways to connect one, from the least setup to the most:

| Your agent                              | Use                                                           |
| --------------------------------------- | ------------------------------------------------------------- |
| Claude, ChatGPT or another app with MCP | The [MCP server](/docs/mcp/). Nothing to install.             |
| A coding agent with a terminal          | The [CLI](/docs/cli/), with `--json`.                         |
| Your own software                       | The [API](/docs/quickstart/) or the [SDK](/docs/typescript/). |

## Agents work in test

Through the MCP server and the CLI alike, an agent works in **test** unless you tell it to use live. Test limits and counts are separate from live ones, so a mistake the agent makes while trying things out never refuses one of your real customers. Every response the agent gets names its environment, `Environment: test` or `Environment: live`. [Test and live](/docs/test-and-live/) has more.

## MCP server

Add `https://mcp.limitry.com/mcp` to your agent as a remote MCP server. The first time it connects, you sign in through your browser and choose **one workspace** and what the agent may do there. You also choose whether it works in **Test** or **Live** by default. It can’t do anything else. [MCP server](/docs/mcp/) has the details and the safeguards.

## CLI

Claude Code and Codex work well with the [CLI](/docs/cli/), and so does any coding agent with a terminal, such as Cursor, GitHub Copilot, Windsurf, Gemini CLI, Antigravity or OpenCode:

```bash
npm install -g @limitry/cli
limitry login                                  # you approve it in the browser
limitry workspace list --json
limitry workspace webhook-endpoints list --workspace acme --json
```

With `--json`, the agent gets exactly the JSON the API returns. Errors go to stderr as JSON. The exit code is 0 on success and 1 on failure. A wrong command or flag exits 2. It exits 4 when the agent isn’t logged in, and 5 when Limitry refuses a `limitry check`. [The CLI](/docs/cli/#scripts-and-agents) lists them.

In CI, or in a sandbox with no browser to sign in with, set `LIMITRY_TOKEN` to a [personal access token](/docs/authentication/) instead. Create it with **Manage limits** when the agent sets limits up, or **Check limits** when it only checks. To act in live, the agent passes `--environment live`, or you set `LIMITRY_ENVIRONMENT=live`.

## Teach your agent: the skill

The agent skill teaches an agent everything on this page: how to sign in, how to choose the workspace, every operation, the error codes, and what to leave to a person. It also explains how Limitry works, from test and live to limits, checks and reservations, and how to add Limitry to a codebase. We generate it from the API, so it never goes out of date.

The quickest way to use it is to tell your agent to read it. This works in any coding agent and needs nothing installed:

```text
Read https://limitry.com/docs/skill/SKILL.md and follow it.
```

To have the skill in every session, install it:

```bash
npx skills add limitry/limitry-skills
```

The command installs the skill from our public [skills repository](https://github.com/limitry/limitry-skills) for the agents you pick, such as Claude Code or Codex ([every agent it supports](https://github.com/vercel-labs/skills/blob/main/docs/agents.md)). Run it again to update. If you use the GitHub CLI, run `gh skill install limitry/limitry-skills limitry` instead.

In Claude Code, you can instead install it as a plugin that also adds the MCP server:

```text
/plugin marketplace add limitry/limitry-skills
/plugin install limitry@limitry-skills
```

You can also read the files directly: [`SKILL.md`](https://limitry.com/docs/skill/SKILL.md), [`tools.md`](https://limitry.com/docs/skill/tools.md) and [`cli.md`](https://limitry.com/docs/skill/cli.md).

## Without writing code

If you don’t write code, you can still work in your workspace through the agent you already use: Claude, ChatGPT, or an agent that keeps working while you’re away. [Use Limitry with your AI agent](/agents/) shows how, step by step.

1. Add a custom connector with the address `https://mcp.limitry.com/mcp`, and sign in when the agent asks. In Claude, connectors are under **Customize → Connectors**. In ChatGPT, custom MCP servers are added at [chatgpt.com/plugins](https://chatgpt.com/plugins). The [MCP server](/docs/mcp/#connect) page has each app’s steps. Choose **Live** to ask about your real customers.
2. [Download the skill](/docs/skill/limitry.zip) and add it to the agent’s skills. In Claude and ChatGPT, skills are in the settings too. On a team plan, an owner can add the skill for everyone.

Then ask for what you need in your own words, such as “Which customers are close to their limit this month?” If the agent works while you’re away, the skill tells it to ask for your approval and carry on instead of waiting.

## Docs for agents

The docs also come as plain text. [`/docs/llms.txt`](/docs/llms.txt) lists every page, and [`/docs/llms-full.txt`](/docs/llms-full.txt) has all of them in one file. The site’s [`/llms.txt`](https://limitry.com/llms.txt) links to both, and to the API, the MCP server and the skill.

## What agents can’t do

Even with full access, an agent connected through MCP can’t send your workspace’s data somewhere new or hand out access by itself, for example by creating an API key or a webhook endpoint. It can’t add credits or copy limits from test to live either. For these, the agent asks instead, and you approve or deny the request in the app. [Approvals](/docs/approvals/) explains how. If the action creates a secret, the agent never sees it.

A coding agent that uses your own token or the command line acts as you. If you can add credits or change a webhook endpoint, so can it. Creating an API key and copying limits to live still need an approval, because the API has no direct way to do them.

| Action                                   | Agent connected through MCP | Coding agent with your token or the command line |
| ---------------------------------------- | --------------------------- | ------------------------------------------------ |
| Add credits                              | Asks                        | Acts as you                                      |
| Add, change or remove a webhook endpoint | Asks                        | Acts as you                                      |
| Create an API key                        | Asks                        | Asks                                             |
| Copy limits from test to live            | Asks                        | Asks                                             |
