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

# Quickstart

> Build your first Veryfront agent app.

## Prerequisites

* Node.js 18.18 or later.
* The Veryfront CLI installed. See [Installation](/code/getting-started/installation).

## Create the app

```bash theme={null}
veryfront init support-agent --template ai-agent
cd support-agent
```

The quickstart uses `--template ai-agent` so the command creates the exact app
shown below. Omit `--template` when you want the interactive template picker
instead.

The `ai-agent` template creates a runnable chat app:

```text theme={null}
support-agent/
  AGENTS.md
  agents/
    assistant.ts
  tools/
    calculator.ts
  app/
    page.tsx
    api/
      ag-ui/
        route.ts
```

The template includes the agent, calculator tool, chat page, AG-UI route, and
`AGENTS.md` project guide for coding agents.

## Authenticate

From the project directory, authenticate with Veryfront Cloud:

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

This lets the app use the Veryfront Cloud gateway for model inference. You can
also set `VERYFRONT_API_TOKEN` directly. Direct provider keys such as
`OPENAI_API_KEY` or `ANTHROPIC_API_KEY` also work; see
[Providers](/code/guides/providers).

## Run it locally

```bash theme={null}
veryfront dev
```

`veryfront dev` also starts the development MCP server on the app port plus 2.
With the default app port, coding agents can connect to
`http://localhost:3002/mcp` and call `vf_bootstrap` once at session start.
Use [Coding agents](/code/guides/coding-agents) for setup details.

## Verify it worked

Open `http://localhost:3000` and ask:

```text theme={null}
What is 128 divided by 8?
```

To test the route without the UI:

```bash theme={null}
curl -N -X POST http://localhost:3000/api/ag-ui \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"id":"1","role":"user","parts":[{"type":"text","text":"What is 128 divided by 8?"}]}]}'
```

The answer should stream. The curl response should emit `data:` lines.
