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

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Migrate from Claude Managed Agents to Guild

> Move Claude Managed Agents to Guild OpenClaw or Native agents, and map MCP servers, vaults, permission policies, and scheduled deployments to Guild.

Claude Managed Agents is Anthropic's hosted agent harness on the Claude API, in public beta since April 2026. An agent is a versioned config: model, system prompt, tools, MCP servers, and skills. Each session runs in its own cloud container with bash, file tools, and git, or in a sandbox worker you host. Vaults hold credentials, scheduled deployments run agents on a cron, and the `ant` CLI applies agents from files with `ant apply`.

The built-in toolset gives every agent bash and file tools by default, so most Managed Agents move to Guild OpenClaw agents. Agents without sandbox work move to Native.

> [!NOTE]
>
> This guide covers Claude Managed Agents. The Claude Agent SDK (`claude_agent_sdk` or `@anthropic-ai/claude-agent-sdk`) runs the agent loop in your own process; port that code to a Guild TypeScript, Native, or OpenClaw agent.

## Who this is for

Teams running Claude Managed Agents who want models from more than one provider, ready-made integrations, and agents that start from Slack mentions or GitHub events, with every run in one workspace.

## Concept map

| Claude Managed Agents | Guild |
| - | - |
| Agent (`/v1/agents`), versioned | A Guild agent, versioned with each `guild agent save` |
| `system`, or the Markdown body of an `ant apply` agent file | `AGENTS.md` in an OpenClaw agent, or `PROMPT.md` in a Native agent |
| `model` (Claude models only) | The `models` fallback list in `guild.yaml`, which can include other providers |
| `agent_toolset_20260401` in a `cloud` environment | An [OpenClaw agent](https://docs.guild.ai/guide/openclaw-agents.md), which has shell, file, git, and search tools built in |
| `custom` tools your app executes (`agent.custom_tool_use`) | An integration operation, or a function in `logic.ts` in a TypeScript agent |
| `mcp_servers` and `mcp_toolset` | The catalog integration for the same service, or a [custom MCP integration](https://docs.guild.ai/services/create-an-integration.md) created from the server's URL in the web app |
| Vaults (`mcp_oauth`, `static_bearer`, `environment_variable`) | [Credentials](https://docs.guild.ai/platform/credentials.md) on the integration; the credential proxy keeps them out of the agent |
| `allowed_hosts` and injection location on a credential | The credential proxy, which adds each credential only to its own integration's calls, plus [credential policies](https://docs.guild.ai/platform/credential-policies.md) |
| Permission policy `always_ask` | A `ui_prompt` confirmation before each call, plus a [credential policy](https://docs.guild.ai/platform/credential-policies.md) that limits which agents can call it |
| `multiagent` subagents and workflows | Separate Guild agents called with `guildAgentTool`; fixed workflows become a TypeScript `run()` |
| Skills (`SKILL.md`) | `skills/<name>/SKILL.md` in an OpenClaw agent (same format), or a [Guild skill](https://docs.guild.ai/platform/skills.md) |
| Scheduled deployments (`schedule: {type: cron, expression, timezone}`) | A [schedule trigger](https://docs.guild.ai/platform/schedule-triggers.md) with `--frequency CRON` and `--cron-timezone` |
| `POST /v1/sessions` and `user.message` events | An [API trigger](https://docs.guild.ai/platform/api-triggers.md), or `guild workspace chat --once` |
| Outcomes (`user.define_outcome` and a rubric) | [Guild Evaluations](https://docs.guild.ai/platform/evaluations.md), with an `llmJudge` check that uses your rubric, and `guild agent test` |
| Session budgets (`budget.max_list_cost`) | Spend budgets per workspace, agent, or user |
| Session observability in the Console | The session event log and Insights |
| `ant apply` | `guild agent save --wait --publish` |

## Before you start

```bash theme={null}
guild auth login
guild workspace select
```

## Inventory

If the agent lives in a repository as `ant apply` files, you'll find a `claude-lock.json` at the root and folders such as `agents/`, `environments/`, `deployments/`, and `skills/`. In an agent file, the frontmatter is the request body and the Markdown body is the system prompt. If the agent was created in the Console or a script, export it first:

```bash theme={null}
ant beta:agents retrieve --agent-id <agent_id>
```

Then list, by name only, never secret values:

* The system prompt, model, and every tool in `tools`, including which built-in tools are turned off.
* Each tool's permission policy. The built-in toolset defaults to `always_allow`, and MCP toolsets default to `always_ask`.
* Every MCP server URL and the vault credential it uses.
* Custom tools and the code in your app that answers them.
* Skills, subagents, and workflows.
* The environment: `cloud` or `self_hosted`, network rules, and packages.
* Scheduled deployments (cron expression and timezone), webhook handlers, budgets, outcomes, and memory stores.

## Steps

> [tab] Sandbox agent → OpenClaw
>
> Use this path when the agent keeps the built-in bash and file tools, works on a repository, or uses skills that drive files and commands.
>
> **1. Scaffold an OpenClaw agent**
>
> ```bash theme={null}
> guild agent init --name code-reviewer --agent-type OPENCLAW \
>   --category <category> --owner <owner>
> ```
>
> `--category` and `--owner` stop the CLI from prompting, which a script or coding agent can't answer. List categories with `guild agent categories`.
>
> **2. Move the system prompt and tools**
>
> ```yaml Guild: guild.yaml theme={null}
> models:
>   - provider: anthropic
>     model: claude-opus-5-5
> integrations:
>   - name: guildai~github
>     version: ^1.0.0
>     tools: [github_pulls_list, github_pulls_get]
>   - name: <owner>~linear
>     version: ^1.0.0
>     tools: [linear_issue_create]
> ```
>
> ```markdown Managed Agents: agents/reviewer.md theme={null}
> ---
> name: Code reviewer
> model: claude-opus-5-5
> mcp_servers:
>   - type: url
>     name: linear
>     url: https://mcp.linear.app/mcp
> tools:
>   - type: agent_toolset_20260401
>   - type: mcp_toolset
>     mcp_server_name: linear
> ---
> You review pull requests for correctness, security, and readability.
> File a Linear issue for anything that blocks the merge.
> ```
>
> Copy the system prompt into `AGENTS.md`. Copy custom skills into `skills/<name>/`; they keep the same `SKILL.md` format. Each MCP server becomes the catalog integration for the same service, with only the operations the agent calls. Check the real names with `guild integration operation list <owner~integration> --json`.
>
> For an MCP server with no catalog integration, create one from the server's URL in the web app by choosing the **MCP** protocol in [Create an integration](https://docs.guild.ai/services/create-an-integration.md).
>
> **3. Test**
>
> ```bash theme={null}
> git add -A
> guild agent test
> ```
>
> `guild agent test` collects files by walking your local directory and honoring `.gitignore`, the same way `guild agent save` does, so new files such as `logic.ts` are uploaded even without `git add`.

> [tab] Tools only → Native
>
> Use this path when the agent turns off the built-in toolset, or its prompt never relies on bash or files.
>
> **1. Scaffold a Native agent**
>
> ```bash theme={null}
> guild agent init --name support-triage --agent-type GUILD_NATIVE \
>   --category <category> --owner <owner>
> ```
>
> `--category` and `--owner` stop the CLI from prompting, which a script or coding agent can't answer. List categories with `guild agent categories`.
>
> **2. Move the system prompt and tools**
>
> Copy the system prompt into `PROMPT.md`, and list each MCP server's tools under `integrations` in `guild.yaml`. For tools set to `always_ask`, add `builtins: [{ name: ui, tools: [ui_prompt] }]` and tell the agent in `PROMPT.md` to confirm with `ui_prompt` before it calls them.
>
> A `custom` tool your app answered becomes an integration operation, or moves to a TypeScript agent when it needs real logic.
>
> **3. Test**
>
> ```bash theme={null}
> git add -A
> guild agent test
> ```
>
> `guild agent test` collects files by walking your local directory and honoring `.gitignore`, the same way `guild agent save` does, so new files such as `logic.ts` are uploaded even without `git add`.

Then publish, and recreate each scheduled deployment as a schedule trigger. Guild converts a timezone schedule to UTC:

```bash theme={null}
guild agent save --message "Port from Claude Managed Agents" --wait --publish
guild workspace agent add <owner~agent> --workspace <owner~workspace>
guild trigger create --workspace <owner~workspace> --type time --agent <owner~agent> \
  --frequency CRON --cron-expression "0 3 * * *" --cron-timezone America/Los_Angeles \
  --input '{"type":"text","text":"Review any open pull requests. Start with the oldest."}'
```

> [!NOTE]
>
> The first `guild agent save --wait --publish` after `guild agent init` fails with "No saved state… use --force" because of the `.gitignore` the scaffold writes. Add `--force` to that first save for now.

You can also publish with the [Publish Agent to Guild](https://docs.guild.ai/migrations/overview.md#publish-from-github-actions) GitHub Action instead of `guild agent save --publish`. The Action needs an account API key with the `agents:write` scope:

```bash theme={null}
guild api-key create --owner <owner> --name "Publish migrated agent" --scopes agents:write
```

## Credentials and policies

Vault credential values are write-only, so you can't export them. Connect each service again as a Guild [credential](https://docs.guild.ai/platform/credentials.md) on the matching integration. Use member scope for MCP servers each person connected with their own account, and workspace or agent scope for service accounts. Like vaults, the credential proxy keeps secret values out of the agent.

Guild splits a tool approval into two controls:

* **Who can call it.** Add a [credential policy](https://docs.guild.ai/platform/credential-policies.md) rule scoped to the agent and workspace that allows or denies the operation. DENY wins over ALLOW.
* **Sign-off on each call.** Add the `ui_prompt` built-in and have the agent confirm with the user before it calls the tool. The run pauses until someone answers.

## What doesn't map 1:1

> [accordion] Approvals the platform enforces
>
> `always_ask` pauses a tool call on Anthropic's side until your app answers. On Guild, a [credential policy](https://docs.guild.ai/platform/credential-policies.md) scoped to the agent and workspace decides whether the agent can call the operation at all. For sign-off on each call, the agent's instructions tell it to confirm with `ui_prompt` first, and the run pauses until someone answers.

> [accordion] Self-hosted sandboxes
>
> A self-hosted environment runs tool calls on a worker you host. Guild runs agents in its own containers, so self-hosted sandboxes move to Guild's runtime.

> [accordion] Session budgets and outcomes
>
> A per-session dollar cap (`max_list_cost`) and outcome grading inside a session have no direct equivalent. Guild spend budgets apply per workspace, agent, or user, and Guild Evaluations grade sessions after they run.

> [accordion] Memory stores
>
> Memory stores mounted at `/mnt/memory/` have no equivalent across runs. An OpenClaw agent's `MEMORY.md` seeds its memory on the first turn. Keep durable state in an outside store reached through an integration.

> [accordion] Anthropic-provided skills
>
> Skills such as `xlsx` and `pdf` that Anthropic provides have no direct equivalent. Check the Hub for a Guild skill, or write one.

> [accordion] Webhooks
>
> Guild has no outbound session webhooks. Have the agent post its result through an integration, such as Slack or GitHub.

## Three ways to migrate

> [card] [guild-migrate skill](https://docs.guild.ai/migrations/guild-migrate-skill.md)
>
> Ask your coding agent: "Migrate the Managed Agents files in this repository to Guild." It reads the `ant apply` files and writes `MIGRATION.md`.

> [card] [Publish Agent to Guild Action](https://docs.guild.ai/migrations/overview.md#publish-from-github-actions)
>
> Commit the port to your repository, then publish it from GitHub Actions with an account API key.

> [card] [Migration agent](https://app.guild.ai/organizations/guildai/agents/guildai~migrate-to-guild)
>
> Point Migrate to Guild at your repository; it opens a draft pull request. The guild-migrate skill ships in the same package.

## Related pages

> [card] [OpenClaw agents](https://docs.guild.ai/guide/openclaw-agents.md)
>
> `AGENTS.md`, skills, and the coding toolchain.

> [card] [Credential policies](https://docs.guild.ai/platform/credential-policies.md)
>
> ALLOW and DENY rules by operation, resource, agent, and workspace.

Migrating a team? [Talk to us](https://www.guild.ai/talk-to-sales?utm_source=docs\&utm_medium=referral\&utm_campaign=migrations).
