Agents - old
The Agent API enables conversational interactions and message-driven workflows through a smart assistant interface. Users can send messages like "Send 5 USDC to Alice" and receive structured prompts or automated transaction suggestions.
Parameter Reference
userId
string
Yes
The ID of the user sending/receiving messages
message
string
Yes
User input text for the agent
walletAddress
string
Optional
Wallet context for the conversation
roomId
string
Yes (for room-specific fetch)
Identifier for a specific chat room
page
number
Optional
Page number for pagination
pageSize
number
Optional
Number of messages per page
messageContent
string
Output
Agent or user message body
isSystem
boolean
Output
Indicates whether the message is generated by the system/agent
action
string
Output
Action type, e.g. "NONE" (may expand in future)
1. Send Message to Agent
POST /agent/message
Authentication: Required
Description
Sends a message to the Reveel agent from a user. The agent can respond with a prompt, system action, or next-step suggestion.
Request Body
{
"message": "Hello, I'd like to send some ETH to bob",
"walletAddress": "0x...",
"userId": "user-id"
}Success Response — 200 OK
Error Responses
400 Bad Request
Missing userId or invalid message
404 Not Found
User not found
500 Internal Server Error
Messaging or AI agent error
2. Get Rooms
GET /agent/rooms
Authentication: Required
Query Parameters
userId(string, required)
Success Response — 200 OK
Error Responses
400 Bad Request
Missing user ID
404 Not Found
User not found
400 Bad Request
General error (e.g. malformed input)
3. Get Latest Room Messages
GET /agent/get-latest-room-messages
Authentication: Required
Query Parameters
userId(string, required)page(number, optional, default: 1)pageSize(number, optional, default: 20)
Success Response — 200 OK
Error Responses
400 Bad Request
Missing user ID or room ID
404 Not Found
User not found
400 Bad Request
Invalid input or system error
4. Get Messages from Specific Room
GET /agent/rooms/:roomId
Authentication: Required
Path Parameters
roomId(string, required)
Query Parameters
userId(string, required)page(number, optional, default: 1)pageSize(number, optional, default: 20)
Success Response — 200 OK
Error Responses
400 Bad Request
Missing user ID or room ID
404 Not Found
User or room not found
Last updated
Was this helpful?

