---
title: "Send Agent Message"
method: POST
path: "/api/v1/intelligence/agent/messages"
tags: ["agent", "Agent"]
---

# Send Agent Message

`POST /api/v1/intelligence/agent/messages`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/intelligence/agent/messages`
- Auth: none declared

Send a message to the agent and get a response.

If session_id is None a new agent session is created automatically.
The agent loop runs synchronously and the full result is returned.

## Headers

- `Authorization` string

## Request body

- AgentMessageRequest
  - `session_id` string, uuid, nullable
  - `message` string, required
  - `asset_id` string, uuid, nullable
  - `auto_approve` boolean
  - `history` AgentHistoryTurn[], nullable
    - `role` string, required
    - `content` string, required

## Response `200`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

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