---
title: "Register New Agent"
method: POST
path: "/agents"
tags: ["Agents"]
---

# Register New Agent

`POST /agents`

Register a new AI agent in the system with its Ed25519 public key.
The agent_id will be automatically generated if not provided.

## Request body

- AgentCreate
  - `agent_id` string — Optional agent ID. If not provided, one will be generated.
  - `name` string — Human-readable name for the agent
  - `description` string — Optional description of the agent's purpose
  - `public_key` string, base64, required — Base64-encoded Ed25519 public key (32 bytes)

## Response `201`

Agent registered successfully

- Agent
  - `agent_id` string
  - `name` string
  - `description` string
  - `public_key` string, base64
  - `status` 'active' | 'inactive' | 'revoked'
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `last_seen_at` string, date-time, nullable

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing authentication
- `409` — Agent with this public key already exists
- `500` — Internal Server Error - Unexpected server error

---

[API](https://skmtc.net/deeptrail/apis/deepsecure-api-dual-service-architecture.md) · [All operations](https://skmtc.net/deeptrail/apis/deepsecure-api-dual-service-architecture/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeptrail/deepsecure-api-dual-service-architecture/versions/78627360c082/schema)
