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

# Bring your own agent

> Connect your own AI coding agent to an app you built in the app editor, with no local copy of the code

Bring your own AI coding agent to a Base44 app by connecting it to the app's [sandbox](/developers/app-code/sandbox/overview). The agent reads, searches, edits, and runs commands in the same cloud environment the app editor uses, so there's no local checkout, nothing to install, and no deploy step. Start from **Send to Coding Agent** in the app editor, or connect the agent yourself with the CLI or the MCP server.

This is for apps you built in the app editor. To create a new backend project on your machine and deploy it with the CLI, install the Base44 skills and follow [Build with AI](/developers/backend/quickstart/quickstart-with-ai) instead.

<Warning>
  You need a [**Builder plan**](/Account-and-billing/Billing-and-plans) or higher to reach an app's sandbox from outside the app editor. Without one, commands fail with `PREMIUM_REQUIRED`.
</Warning>

## Start from the app editor

The quickest way to connect is to let the app editor write the prompt for you. The prompt contains everything your agent needs to connect to this app's sandbox and start working. This option isn't offered for mobile apps or apps with unmanaged source code.

**To send an app to your coding agent:**

1. Open the app in the Base44 app editor.
2. Click **More actions** (the three dots next to **Publish**, in the top right corner), then click **Send to Coding Agent**.
3. Choose a local CLI agent or a web chat.
4. Paste the prompt into your agent.

## Connect a local agent with the CLI

Use the CLI for an agent that runs on your machine, such as Claude Code, Cursor, or Codex, and for your own scripts.

**To connect with the CLI:**

1. Install the CLI. It requires Node.js 20.19.0 or higher.

   ```bash theme={null}
   npm install -g base44@latest
   ```

2. Sign in. This starts a session with the `sandbox:write` permission your agent needs to change files.

   ```bash theme={null}
   base44 login
   ```

3. Copy the app ID from the app editor URL: `https://app.base44.com/apps/<app_id>/editor`.

4. Check the connection by listing the app's files. Pass `--app-id` on every command, or set the `BASE44_APP_ID` environment variable once instead.

   ```bash theme={null}
   base44 sandbox ls --app-id <app_id>
   ```

5. Give your agent this app's README, which explains how to work in the sandbox with the CLI. It's public and needs no sign-in.

   ```text theme={null}
   https://app.base44.com/api/sandbox/<app_id>/local-agent/readme.md
   ```

## Connect an agent over MCP

Use the [Base44 MCP server](/developers/backend/overview/mcp-server) for an assistant that connects over MCP, including web chats that can't run a CLI.

**To connect over MCP:**

1. Add the server to your AI tool's MCP configuration. In Claude Code, run `claude mcp add --transport http base44 https://app.base44.com/mcp` instead.

   ```json theme={null}
   "base44": {
     "type": "http",
     "url": "https://app.base44.com/mcp"
   }
   ```

2. Sign in to Base44 when your tool prompts you. In Claude Code, run `/mcp` to start it.

3. Approve sandbox access at the consent step. Without it, your assistant can read the app but can't change it.

## After you connect

Once connected, your agent works through the sandbox commands or MCP tools listed in the [cloud sandbox overview](/developers/app-code/sandbox/overview#ways-to-connect). It can list, search, and read the app's files, change them, and run shell commands in the app's environment, such as installing a package, running the build, or deleting a file. Each file change is committed as soon as it's made, so it shows up in the app editor and its live preview right away. [Publishing](/developers/app-code/sandbox/overview#editing-and-publishing) the app is still a separate step.

To check that a change compiles, ask your agent to run the build or the type check in the sandbox, for example `npm run build` or `npx tsc --noEmit`. The development server writes its log to `/tmp/vite.log` inside the sandbox, so your agent can read compile errors from there as well.

Before a risky set of changes, ask your agent to create a [checkpoint](/developers/app-code/sandbox/overview#checkpoints). If something goes wrong, restore it from the app editor's version history.

## See also

* [Cloud sandbox](/developers/app-code/sandbox/overview): How the sandbox works, how changes persist, and the limits that apply
* [Base44 MCP server](/developers/backend/overview/mcp-server): Connect an AI assistant to your Base44 account
* [CLI Overview](/developers/references/cli/get-started/overview): Install and use the Base44 CLI
* [Build with AI](/developers/backend/quickstart/quickstart-with-ai): Create a new backend project on your machine with your coding agent
* [Skills](/developers/backend/overview/skills): Teach AI coding agents how to work with Base44 projects
