---
title: "Create a new agent"
method: POST
path: "/api/agents"
tags: ["agents"]
---

# Create a new agent

`POST /api/agents`

Creates a new agent from character configuration

## Request body

- object
  - `characterPath` string — Path to a character file
  - `characterJson` object — Character configuration in JSON format

## Response `201`

Agent created successfully

- object
  - `success` boolean
  - `data` object
    - `character` Character
      - `id` string, uuid — Unique identifier for the character
      - `name` string, required — Name of the character
      - `bio` string — Short biography of the character
      - `settings` object — Character-specific settings
      - `system` string — System prompt for the character
      - `style` object — Character's communication style
      - `lore` string[] — Extended lore and background information
      - `messageExamples` string[] — Example messages for character training
      - `topics` string[] — Topics the character is knowledgeable about
      - `plugins` string[] — Plugins used by the character

## Other responses

- `400` — Error creating agent

---

[API](https://skmtc.net/elizaos/apis/eliza-os-api.md) · [All operations](https://skmtc.net/elizaos/apis/eliza-os-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elizaos/eliza-os-api/revisions/f43280bfdb0c/schema)
