Runtime Contract
Message Envelope
Section titled “Message Envelope”Advanced integrations can send a JSON-RPC 2.0 style payload directly to an agent:
{ "jsonrpc": "2.0", "id": "request-1", "method": "agent.request", "params": { "sessionId": "session-1", "userId": "user-1", "content": { "text": "Hello" } }}For normal Node-RED flows, use agent-in to build this shape for you.
Inbound Methods
Section titled “Inbound Methods”| Method | Purpose | Required content |
|---|---|---|
agent.request | Start or continue an agent turn. | { text, images? } |
agent.status | Read current session status. | No content required. |
tool.response | Return a skill result to the agent. | Tool result data and correlation fields. |
images may contain URL images or base64 image data when the selected model supports
vision input.
Visible Event Types
Section titled “Visible Event Types”Studio and downstream flows may show these event types:
agent.requestagent.clarifyagent.responseagent.statusagent.warningagent.erroragent.usagetool.requesttool.responsememory.readmemory.write
Debug events may be available when debug mode is enabled, but they can contain sensitive request and response details. Enable debug mode only in trusted environments.
Context Modes
Section titled “Context Modes”| Mode | Behavior |
|---|---|
full | Includes the full stored conversation history. |
summary | Includes a stored summary plus the latest window of messages. |
lastn | Includes only the latest configured number of messages. |
none | Sends no stored history. |
Memory And Events
Section titled “Memory And Events”Smartunit stores two kinds of operational data:
| Data | Purpose |
|---|---|
| Facts | Saved memory such as preferences, profile details, summaries, and usage totals. |
| Events | Activity history used to inspect sessions, responses, tool calls, warnings, and errors. |
Facts can be scoped to a session or user. Event history can contain user input, model output, and tool results, so handle exports and screenshots carefully.
Budgets And Usage
Section titled “Budgets And Usage”Budgets can limit tokens or provider-reported spend. Supported periods are:
sessiondailyweeklymonthlylifetime
Warnings emit agent.warning; hard limits emit agent.error and stop the turn.