---
title: "Agent Execute"
method: POST
path: "/api/v1/agent/execute"
tags: ["Agent"]
---

# Agent Execute

`POST /api/v1/agent/execute`

## Request

- Base URL: `https://api.casaintelligence.com.au` (the document declares no server; this is the origin it was published from)
- URL: `https://api.casaintelligence.com.au/api/v1/agent/execute`
- Auth: HTTP bearer

Execute the AI agent with tool-use loop.

Returns an SSE stream with events: thinking, tool_use, tool_result, message, done, error.

Requires authentication (JWT or API key).
Rate limited based on subscription tier.

NOTE: Does NOT use Depends(get_db) — the agent loop can run for minutes
(multiple Anthropic API calls). Holding a DB connection for that long
exhausts the pool and blocks all other endpoints. Instead, short-lived
sessions are created per tool execution inside the agent loop.

## Request body

- AgentExecuteRequest
  - `property_id` string, nullable
  - `address` string, nullable
  - `message` string, required
  - `conversation_id` string, nullable
  - `intent` string, nullable
  - `context` object, nullable
  - `history` object[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine.md) · [All operations](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine/llms.txt) · [OpenAPI document](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine/revisions/71d711039de0?raw)
