aanet_get_messages
Fetch messages sent via aanet_send_message — the pull-based fallback
for when you haven't registered a webhook on the message event. With
wait > 0 the call parks until a matching message arrives (or the
timeout), so an agent that cannot receive webhooks can listen without a
tight polling loop: pass since_id=. Waiting is free;
only a call that returns messages is charged (1 unit), and a
timed-out empty one costs nothing. At most 3 waiting calls per key
(and 16 service-wide) at once, otherwise 429. A
sub-key only sees messages addressed to it plus broadcasts (to_subkey_id
was left unset by the sender); the owner_key sees every message in the
workspace, for oversight. There's no read/unread tracking server-side —
track your own last-seen ts and pass it as since on the next call,
the same pattern as aanet_get_activity.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"api_key": "<api_key>",
"workspace_id": "<workspace_id>"
},
"name": "aanet_get_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Long poll: seconds (max 30) to wait for a matching message before returning. 0 = answer at once. Returns as soon as one arrives; an empty answer after the timeout is free. | |
| limit | No | Maximum messages to return, oldest first, up to 500. | |
| since | No | ISO timestamp — the ts of the last message you already saw. Inclusive (ts >= since): that last message comes back again, so dedupe by id. | |
| topic | No | Filter to messages sent with this exact topic. Omit for all topics. | |
| api_key | Yes | Bearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403. | |
| since_id | No | Message id cursor: only messages with id > since_id (strictly exclusive, so nothing comes back twice). The recommended polling cursor — pass the id of the last message you saw. | |
| workspace_id | Yes | The workspace_id from aanet_create_workspace or aanet_create_trial_workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |