# Use a template

A template is a working project with its agents and tools. Copy it, then change it.

## Before you start

You need a Veryfront account. [Sign in](/sign-in) or create one.

## Use a template

**Code**

1. Create a project from a template. The starters are:

   * `minimal`
   * `ai-agent`
   * `docs-agent`
   * `agentic-workflow`
   * `multi-agent-system`
   * `coding-agent`
   * `saas-starter`

```bash
npm create veryfront@latest tip-helper -- --template ai-agent
```

2. Start it:

```bash
cd tip-helper
npm run dev
```

3. Open the address it prints, usually [localhost:3000](http://localhost:3000).
4. Ask "What's 15% of £240?". You should now see the agent call its calculator and reply £36.

### Try it in a sandbox

```playground
step: Create the project | npm create -y veryfront@latest tip-helper -- --template ai-agent --yes
step: Start it | cd tip-helper && npm run dev
agent: assistant
ask: What's 15% of £240?
tool: calculator
expect: 36
```

**Studio**

1. Open **Templates**.
2. Click **Use template** on Support Agent.
3. Wait while Studio copies it. You should now see a chat with Support Agent and its suggestions "File a claim" and "Check coverage".

**API**

1. Find the template with an [API key](/docs/authentication/api-keys.md) for all projects:

```bash
curl "https://api.veryfront.com/agent-templates?search=support" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

2. Set `TEMPLATE_PROJECT` to the `template_project.project_reference` of the entry named Support Agent in the response: `export TEMPLATE_PROJECT=<project_reference>`.
3. Create a project from it:

```bash
curl -X POST https://api.veryfront.com/projects \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Support desk", "templateProjectId": "'$TEMPLATE_PROJECT'"}'
```

4. Set `PROJECT` to the `id` in the response: `export PROJECT=<id>`.
5. List its agents. You should now see `support-agent`, named Support Agent:

```bash
curl https://api.veryfront.com/projects/$PROJECT/agents \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

## With MCP

1. Call `veryfront__list_agent_templates` with `"search": "support"`, and take the `template_project.project_reference` of the entry named Support Agent.
2. Call `veryfront__create_project` with `"name": "Support desk"` and `"template_project_id"` set to that `project_reference`.
3. Call `veryfront__list_agents` with the new project's `id` as `project_reference`. It worked when the list holds `support-agent`, named Support Agent.

## Next steps

* [Connect an app](/docs/integrations/connect-app.md)
* [Chat with an agent](/docs/agents/chat.md)
