> ## 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.

# Generate and deploy web apps with v0 from Guild agents

> Connect Guild agents to the v0 Platform API with an API key to start v0 chats, iterate on generated apps, manage projects, and create deployments.

Integrations · v0

Guild agents use v0, Vercel's app builder, to turn a prompt or existing code into a working web app. The agent starts a v0 chat, sends follow-up messages to iterate, and deploys the result. Guild stores your v0 API key and injects it server-side, so agent code never sees it.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use v0.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect v0 to your first agent.

## What the v0 integration exposes

The integration is `guildai~v0`, and it calls the v0 Platform API at `https://api.v0.dev`. It has seven tools:

* `v0_v0_create_chats` starts a chat from a prompt.
* `v0_v0_init_chats` starts a chat from existing files or a repository.
* `v0_v0_send_message_chats` sends a follow-up message to iterate.
* `v0_v0_get_chats` reads a chat and its latest version.
* `v0_v0_projects_create` and `v0_v0_projects_find` create and look up projects.
* `v0_v0_deployments_create` deploys a chat version.

## How it works

**1. Create a v0 API key**

Sign in to v0 with your Vercel account, open [API keys](https://v0.dev/chat/settings/keys), and create a key. It starts with `v0_`, and v0 shows it only once.

**2. Connect the key in Guild**

Go to **Access & setup > Credentials**, click **Connect**, select **v0**, and paste the key into **API Key**.

**3. Import the tools**

Import `V0Tools` from `@guildai-services/guildai~v0` and add them to the agent's tools.

## Why v0 access needs governing

Generating apps spends v0 credits, and a deployment puts code on a public URL. Guild keeps the key server-side and checks every request against your [credential policies](https://docs.guild.ai/platform/credential-policies.md), so an agent can draft apps while a DENY rule on `v0_v0_deployments_create` keeps it from shipping them.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as `Authorization: Bearer <key>`

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { V0Tools } from "@guildai-services/guildai~v0"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt:
    "You build internal dashboards with v0. Start a chat from the request, iterate until it matches, and return the preview URL. Don't deploy.",
  tools: { ...V0Tools },
})
```

## Tools

Tools in the latest published version of `guildai~v0`:

| Tool | What it does |
| - | - |
| `v0_v0_create_chats` | Create chats. |
| `v0_v0_deployments_create` | Deployments create. |
| `v0_v0_get_chats` | Get chats. |
| `v0_v0_init_chats` | Init chats. |
| `v0_v0_projects_create` | Projects create. |
| `v0_v0_projects_find` | Projects find. |
| `v0_v0_send_message_chats` | Send message chats. |

## Frequently asked questions

> [accordion] Why do the tool names start with v0\_v0\_?
>
> Every tool name starts with the integration name, `v0_`, followed by the operation ID, and v0's operation IDs start with `v0` too.

> [accordion] Can the agent push v0's code to GitHub?
>
> Not through these tools. Pair v0 with the [GitHub integration](https://docs.guild.ai/integrations/github.md) and have the agent commit the files it reads from the chat.

> [accordion] Can I let an agent generate apps but not deploy them?
>
> Yes. Write a credential policy that denies `v0_v0_deployments_create`. See [Credential policies](https://docs.guild.ai/platform/credential-policies.md).

## Related

**Also runs on Guild:** [GitHub](https://docs.guild.ai/integrations/github.md) · [Figma](https://docs.guild.ai/integrations/figma.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
