---
title: "Create an Agent"
method: POST
path: "/v1/agents"
---

# Create an Agent

`POST /v1/agents`

Create a reusable agent. An agent defines a `systemPrompt` and `resultSchema` that guide its behavior for every run. Only `name` is required; an agent created with no `systemPrompt` behaves like an unconfigured run.

## Request body

- object
  - `name` string, required — Human-readable name for the agent. Used to identify the agent in the dashboard and API responses.
  - `systemPrompt` string — System prompt that steers the agent's behavior on every run that uses this agent.
  - `resultSchema` object — An optional [JSON Schema](https://json-schema.org/specification) object. If provided, runs that reference this agent will aim to return a `result` that conforms to this schema when they complete. Can be overridden per run by passing `resultSchema` on the run request.

## Response `201`

The agent has been created.

- Agent — A reusable agent. Referenced by `agentId` to apply a system prompt to every run that uses the agent.
  - `agentId` string, required — Unique identifier for the agent. Use this value as `agentId` when creating an agent run.
  - `name` string, required — Human-readable name for the agent. Used to identify the agent in the dashboard and API responses.
  - `systemPrompt` string — System prompt applied to every run that uses this agent.
  - `resultSchema` object — [JSON Schema](https://json-schema.org/specification) that runs referencing this agent will aim to conform their `result` to. Can be overridden per run by passing `resultSchema` on the run request.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

---

[API](https://skmtc.net/browserbase/apis/browserbase-api.md) · [All operations](https://skmtc.net/browserbase/apis/browserbase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/browserbase/browserbase-api/versions/832b22144edf/schema)
