Actions42
- Agent Actions
- Channel Actions
- Chat Actions
- Intention Actions
- Interaction Actions
- Training Actions
- Workspace Actions
Agent → Add Context
AI-generatedSummary
Add conversation context to an agent via POST /v2/agent/{agentId}/add-message.
Inputs
- agentId (required) — Select the agent. Choose from the list, or specify an ID using an expression.
- contextId (required) — Context ID required by add-message endpoint.
- prompt (required) — Prompt/message to add into the context.
- role — Message role (default: assistant).
Output shape
API response from the add-message endpoint (typically acknowledgment/status). Details not explicitly documented in the node source; the node returns the raw HTTP response.
The agentId parameter is required and validated at runtime; if missing, the node throws an operation error. The contextId and prompt are mandatory for the API call. The role defaults to 'assistant' when omitted.
Examples
Example 1: Add a user message to an agent's context
agentId: selected from agent list; contextId: provided expression or string; prompt: user message text; role: 'user' (optional)