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

# Create a new Agent

`POST /agents`

## Request body

- AgentCreateReqSchema
  - `name` string, required — A unique name label
  - `orb_tags` object — User defined key/values that will define the members of the group by matching against Agent tags

## Response `201`

Agent object

- AgentObjSchema
  - `id` string, uuid, required — Unique identifier (UUID)
  - `name` string — A unique name label
  - `agent_tags` object — Orb tags field sent in by the agent when it connects group by matching against Agent tags
  - `orb_tags` object — Orb tags field defined through the API or UI
  - `ts_created` string, date-time — Timestamp of creation
  - `agent_metadata` object — JSON object sent in by the agent representing its Capabilities
  - `state` string — Current connection status of the agent, one of 'new', 'online', 'offline', 'stale', 'removed'
  - `last_hb_data` object — JSON object sent in by the agent as its last heartbeat
  - `ts_last_hb` string, date-time — A time stamp of the last heartbeat that was received
  - `key` string, uuid — Agent key is a secret key that is generated at agent creation for authentication purposes
  - `channel_id` string, uuid — Communication channel ID (UUIDv4), unique to this agent and created at agent creation

## Other responses

- `400` — Failed due to malformed JSON.
- `401` — Missing or invalid access token provided.
- `409` — Entity already exist.
- `415` — Missing or invalid content type.
- `422` — Database can't process request.
- `500` — Unexpected server-side error occurred.

---

[API](https://skmtc.net/orb-community/apis/orb-fleet.md) · [All operations](https://skmtc.net/orb-community/apis/orb-fleet/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orb-community/orb-fleet/versions/53154347a3c8/schema)
