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

# Build with an agent

> Connect a coding agent to d0 Builder MCP, create a dashboard, or adapt an existing local project.

d0 runs your dashboards. An external coding agent builds them using **Builder MCP**.
You control when editing is enabled, which apps the agent may edit, and which
operations it may use.

## Connect the builder

1. Open **Agent Builder** in d0 and create a builder credential.
2. Choose the stdio or HTTP configuration for your MCP-compatible client and
   copy the configuration generated by d0 into that client.
3. Enable the corresponding transport. For HTTP, keep d0 open and use the local
   endpoint shown in the app.
4. Choose an editing duration, allowed operations, and app scope. Enable
   **Agent editing**.
5. Reconnect the agent's MCP client and have it discover the available tools.

The builder exposes tools including `apps_list`, `app_create`, `app_read_file`,
and `app_write_file`. Use the installed tool schemas for exact arguments.

The builder credential is separate from the Access credential used by a dashboard
at runtime. Do not put either credential into dashboard HTML or JavaScript.

## Prompt for your agent

```text theme={null}
Build a small dashboard in Gatetrix d0 for [goal].
Use [public data source or specifically approved Access connection].
Discover the available Builder MCP tools and use their current schemas.

Create a dashboard bundle with local HTML, CSS, JavaScript, and manifest.json.
Declare only the hosts, paths, tools, connector operations, and storage it needs.
Use window.gatetrix for supported data access. Do not embed credentials,
remote scripts, a development server, or direct filesystem access.

Include loading, empty, and error states. Keep write actions explicit.
Explain the permissions and what I should check before trusting the version.
Leave the trust decision to me in d0.
```

After edits, refresh d0, review the version and its permission changes, and trust
it if they match your intent. Confirm the result with a small test before using
broader data.

## Import an existing project

Open **Import Existing Project**, choose the local project folder, and copy the
migration prompt to your agent. The agent needs access to read that source folder
through its own coding environment as well as Builder MCP access to d0.

The import is an adaptation: build a separate dashboard bundle, replace unsupported
data access with the d0 bridge, and keep secrets out of copied files. An existing
Node server, arbitrary filesystem operation, or remote script cannot simply run
inside the dashboard. See [Runtime and permissions](/d0/runtime).

## Finish the editing session

Turn off **Agent editing** when finished. This blocks new builder operations.
An operation already authorized may finish; switching editing off does not undo
completed changes. Inspect the dashboard and Runtime Audit if a result is unclear.


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