state_set
Set a key-value pair in a shared state store with optional TTL expiration and audit tracking. Supports any JSON-serializable value, overwriting existing entries.
Instructions
Set a key-value pair in the shared state store.
The value can be any JSON-serialisable type (dict, list, str, int, …). If ttl_seconds is provided, the entry will expire automatically after that many seconds. Existing entries are overwritten silently. If agent_id is provided, it is recorded in the audit history so the caller can be identified in history_log results.
Use a structured key prefix to avoid collisions in multi-workflow deployments, e.g. 'shared:my_namespace:my_key' or simply 'fact_1'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>",
"value": "<value>"
},
"name": "state_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| value | Yes | ||
| agent_id | No | ||
| ttl_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |