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

# Create an Agent

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



## OpenAPI

````yaml post /v1/agents
openapi: 3.0.0
info:
  title: Browserbase API
  description: Browserbase API for 3rd party developers
  version: v1
servers:
  - url: https://api.browserbase.com
    description: Public endpoint
    variables: {}
security:
  - BrowserbaseAuth: []
tags: []
paths:
  /v1/agents:
    post:
      summary: Create an Agent
      description: >-
        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.
      operationId: Agents_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: >-
                    Human-readable name for the agent. Used to identify the
                    agent in the dashboard and API responses.
                  type: string
                  maxLength: 255
                  minLength: 1
                systemPrompt:
                  description: >-
                    System prompt that steers the agent's behavior on every run
                    that uses this agent.
                  type: string
                  minLength: 1
                resultSchema:
                  description: >-
                    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.
                  type: object
                  additionalProperties: true
                  properties: {}
              additionalProperties: false
              required:
                - name
      responses:
        '201':
          description: The agent has been created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
components:
  schemas:
    Agent:
      description: >-
        A reusable agent. Referenced by `agentId` to apply a system prompt to
        every run that uses the agent.
      type: object
      properties:
        agentId:
          description: >-
            Unique identifier for the agent. Use this value as `agentId` when
            creating an agent run.
          type: string
        name:
          description: >-
            Human-readable name for the agent. Used to identify the agent in the
            dashboard and API responses.
          type: string
        systemPrompt:
          description: System prompt applied to every run that uses this agent.
          type: string
        resultSchema:
          description: >-
            [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.
          type: object
          additionalProperties: true
          properties: {}
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - agentId
        - name
        - createdAt
        - updatedAt
  securitySchemes:
    BrowserbaseAuth:
      type: apiKey
      in: header
      name: X-BB-API-Key
      description: Your [Browserbase API Key](https://www.browserbase.com/settings).

````