---
title: "Create Agent"
method: POST
path: "/api/v1/agents"
tags: ["agents"]
---

# Create Agent

`POST /api/v1/agents`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/agents`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Create new agent.
Supports both IDs and identifiers for traits, knowledge sources, and tools.
Auto-generates identifier from name if not provided.

## Request body

- AgentCreate: Schema for creating a new agent. Supports both new entity_type_configs (with collection modes) and legacy entity_type_ids (auto-converted to passive mode configs).
  - `name` string, required
  - `description` string, nullable
  - `instructions` string, nullable
  - `identifier` string, nullable
  - `image_url` string, nullable
  - `configuration` object, nullable
  - `model` string, nullable
  - `temperature` number
  - `reasoning_effort` string
  - `orchestrator` boolean
  - `memory` string, nullable
  - `interactive_buttons_enabled` boolean
  - `interactive_buttons_behavior` string, nullable: Optional guidance on WHEN the agent should render interactive choice buttons. NULL uses the canonical default behavior.
  - `access_level` 'PRIVATE' | 'PASSWORD_PROTECTED' | 'PUBLIC'
  - `access_password` string, nullable
  - `chat_theme_id` integer, nullable
  - `uri` string, nullable: URL-friendly identifier for public access (e.g., 'my-assistant')
  - `domain_id` integer, nullable: Domain where the agent will be published
  - `knowledge_ids` integer[], nullable
  - `tool_ids` union[], nullable
    - union
      - integer
      - string
  - `trait_ids` union[], nullable
    - union
      - integer
      - string
  - `entity_type_configs` AgentEntityTypeConfig[], nullable
    - `entity_type_id` integer, required
    - `collection_mode` 'passive' | 'opportunistic' | 'active' | 'guided': Data collection mode for entity types assigned to agents.
    - `custom_prompt` string, nullable
  - `entity_type_ids` integer[], nullable
  - `connections` AgentConnectionCreate[], nullable
    - `connection_type` 'ai_delegation' | 'handoff', required
    - `target_agent_id` integer, nullable
    - `target_team_id` integer, nullable
    - `instructions` string, nullable

## Response `201`

Successful Response

- Agent

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gnosari/apis/gnosari-api.md) · [All operations](https://skmtc.dev/gnosari/apis/gnosari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gnosari/apis/gnosari-api/revisions/f299cf53ae5f?raw)
