> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Agent Event

> Send a user message or tool result into an agent session. The event is persisted and the assistant response is returned as a new event record.

Use this endpoint to push an event into an active agent session. The body accepts a user message, tool calls, or tool results, and the API returns the created event with its generated identifier.

## Endpoint

```http theme={null}
POST /v1/agents/sessions/{session_id}/events
```

## Authentication

Pass one of `Authorization: Bearer <api-key>` or `Authorization: ApiKey <key>`.

## Path Parameters

<ParamField path="session_id" type="string" required>
  The agent session identifier.
</ParamField>

## Request Body

<ParamField body="role" type="string" required>
  The event role. Use `user` for messages or `tool` for tool results.
</ParamField>

<ParamField body="content" type="string">
  Text content of the message. Required when role is `user`.
</ParamField>

<ParamField body="tool_calls" type="array">
  Array of tool call objects emitted by the model.
</ParamField>

<ParamField body="tool_call_results" type="array">
  Array of tool call result objects returned to the model.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique event identifier.
</ResponseField>

<ResponseField name="session_id" type="string">
  The session this event belongs to.
</ResponseField>

<ResponseField name="type" type="string">
  Event type, for example `message`.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of creation.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://agent.example.com/v1/agents/sessions/sess_01J5X8/events \
    -H "Authorization: Bearer <api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "role": "user",
      "content": "What is the weather in Tokyo?"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "evt_01J5X9",
    "session_id": "sess_01J5X8",
    "type": "message",
    "created_at": "2024-06-01T12:34:56Z"
  }
  ```
</ResponseExample>


## Related topics

- [Stream Agent Events](/api-reference/agent/events/stream.md)
- [Create Aria Agent Cloud Session for an Agent](/api-reference/agent/sessions/create.md)
- [Create Agent - POST /v1/agents](/api-reference/agent/agents/create.md)
- [Get Agent Turn](/api-reference/agent/turns/get.md)
- [List Agent Turns](/api-reference/agent/turns/list.md)
