add_conversation_note
Add an internal note to the conversation, visible to your agents and never to the customer.
add_conversation_note(context: dict, text: str) -> dictAdds an internal note to the conversation. Notes appear in the conversation timeline for your agents and are never shown to the customer.
Parameters
| Name | Type | Description |
|---|---|---|
context | dict | The context object passed to your action |
text | str | The note body (max 50,000 characters) |
Returns
dict — {"success": bool, "message": str}
Behavior
- The note is attributed to Automation rather than to an agent, so it is distinguishable from one a colleague typed.
- Skipped in test/mock environments.
Examples
Record what an automation did
def execute_action(context):
ticket_id = create_external_ticket(context)
add_conversation_note(context, f"Escalated to the web team as {ticket_id}.")
return {"ticket": ticket_id}Write a summary the next agent will read
def execute_action(context):
summary = llm_summarize(
context,
prompt="Summarize the customer's problem in three bullets for the next agent.",
)
add_conversation_note(context, summary)Leave a trail when something goes wrong
def execute_action(context):
try:
result = call_supplier_api(context)
except Exception as exc:
add_conversation_note(context, f"Supplier lookup failed: {exc}")
raise
return result