Skip to main content
POST
/
api
/
v2
/
agents
curl -X POST "http://localhost:8000/api/v2/agents" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "customer-support",
    "pattern": "support",
    "description": "Handles customer inquiries"
  }'
{
  "agent_id": "customer-support",
  "namespace": "memanto_agent_customer-support",
  "pattern": "support",
  "description": "Handles customer inquiries",
  "created_at": "2026-05-04T10:30:00.000000",
  "last_session": null,
  "memory_count": 0,
  "session_count": 0,
  "status": "ready"
}

Overview

Create a new agent namespace for storing and retrieving memories. Each agent receives a unique agent_id which acts as an isolated context container in Moorcheh (memanto_agent_{agent_id}).

Authentication

Memanto validates Moorcheh credentials on the server using MOORCHEH_API_KEY (environment / server configuration). Callers do not send an Authorization header for this endpoint.
Content-Type
string
required
Must be application/json

Body

agent_id
string
required
Unique agent identifier (alphanumeric, hyphens, underscores only).
pattern
string
Agent pattern for memory organization. One of: support, project, tool. Defaults to support.
description
string
Optional human-readable description of the agent.
curl -X POST "http://localhost:8000/api/v2/agents" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "customer-support",
    "pattern": "support",
    "description": "Handles customer inquiries"
  }'
{
  "agent_id": "customer-support",
  "namespace": "memanto_agent_customer-support",
  "pattern": "support",
  "description": "Handles customer inquiries",
  "created_at": "2026-05-04T10:30:00.000000",
  "last_session": null,
  "memory_count": 0,
  "session_count": 0,
  "status": "ready"
}
Common causes of 500 include the server missing MOORCHEH_API_KEY, an invalid key (Memanto may fail at startup), or failure to create the namespace in Moorcheh.

Next Steps

After creating a new agent, you can: