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

# Create agent

> Define an AI agent.

## Prerequisites

* A Veryfront project from [Create project](/code/getting-started/create-project).
* An `agents/` directory. For a minimal setup, run `mkdir agents`.

## Define the agent

Create `agents/assistant.ts`:

```ts theme={null}
// agents/assistant.ts
import { agent } from "veryfront/agent";

export default agent({
  id: "assistant",
  system: "You are a concise assistant. Answer in one short paragraph.",
});
```

The file name becomes the agent id unless the agent config sets another `id`.

## Verify it worked

Confirm `agents/assistant.ts` exports the `assistant` agent. The next page uses
that id in the API route.

Next, expose the agent with [Create API](/code/getting-started/create-api).
