# Talk to Your Agent

> Send messages, wait for the reply inline or poll, and keep retries safe with a client request id.

Canonical: https://revnu.com/docs/talk-to-your-agent

A message through the API is exactly what typing into the dashboard chat does. The agent reads it, works, and replies in one or more bubbles.

## One call, with the reply inline

Pass `waitSeconds` (up to 120) and the request stays open until the agent has replied or failed. Replies usually land in well under a minute.

```bash
curl -X POST -H "Authorization: Bearer $REVNU_API_TOKEN" \
  -H "content-type: application/json" \
  -d '{"text":"Which leads replied this week?","waitSeconds":90}' \
  https://revnu.com/api/v1/agent/messages
```

A `200` carries the finished `message` with its `replies`. If the wait runs out you get `202` with the last observed state and a `requestId` to keep polling.

## Or post and poll

Without `waitSeconds` the POST returns `202` immediately. Poll `GET /agent/messages/{requestId}` every few seconds; `status` moves `queued → running → replied`, or `failed` with a `failure` message.

## Safe retries

Pass `clientRequestId` (up to 128 characters). A retried POST with the same id returns the original `requestId` instead of sending a second message. A `failed` message should be re-sent with a new id.

## Each token is its own conversation

Your dashboard and Slack threads are not visible through the API, and API messages do not appear in them. `GET /agent/thread` returns this token's conversation, newest first.

## Frequently asked questions

### Can the agent do work from a message, not just answer?

Yes. It is the same agent with the same tools. Ask it to draft outreach and the draft lands in the review queue like any other.

### How do I know the agent is even up?

`GET /agent/status` reports the sandbox state, whether a turn is running, and the next scheduled wake.
