Skip to main content
Requires maximem-synap 0.5.1 or newer (Python) and @maximem/synap-js-sdk 0.5.1 or newer (JS). Earlier versions do not have this method, and 0.5.0 loses events sent immediately after listen().
Advanced: for real-time integrations. Requires an active instance.listen stream.
record_tool_result() reports what a tool handed back. The result travels in its own field rather than in content: it is not something a person said, and content is the field every reader treats as speech.
A tool result is usually your customer’s data. An order, an account, a record. It reaches us, it is used as an anticipation hint, and it is not written into long-term memory. Send what your agent needs in order to be understood, not the whole row. Whatever you do send is subject to your instance’s PII policy and is retained for seven days.

Parameters

any
required
JSON-encodable, or a plain string. A string is sent as itself, not as a quoted JSON string.
string
The tool that produced it.
string
The id you passed to record_tool_call. This is what ties the result to the call that asked for it.
string
The conversation this result belongs to.
string
External user identifier.
string
External customer identifier. Required on B2B. Not accepted on B2C.
string
External session identifier. Usually unnecessary.
dict[str, str]
Extra string key-value pairs.

Returns

Returns None.

Example

Raises

error
No stream has been started, or it has been stopped. A stream that is mid-reconnect does not raise.

See also