create_macro
Validates and saves a new macro in the Library, disabled and not exposed, for you to review.
Details #
An agent can write a macro, but it cannot turn it on. A created macro is always saved:
enabled: false, so no trigger fires it.agent.exposed: false,approve: never,destructive: false. Only the description is kept from what the agent sent (description, or the olderagent.description); it is marked as written by a model.originof kindai, fromagent; the Library shows who wrote it.In the group named by
group(an id or a name), or in a group called Agent, made on first use.
You review it in Switchboard, then turn it on. Until then the agent can lint_macro, dry_run and update_macro it.
{ "jsonrpc": "2.0", "id": 6, "method": "tools/call",
"params": { "name": "create_macro", "arguments": { "json": {
"name": "Say hello",
"icon": "hand.wave",
"do": [{ "id": "s1", "type": "hud", "params": { "text": "Hello" } }]
} } } }
{
"created": true,
"id": "m_c10a77",
"name": "Say hello",
"warnings": [],
"note": "Saved disabled and not exposed to agents. The user reviews it in Switchboard, then turns it on."
}
Gotchas #
An agent cannot expose a macro, enable it or change approval settings. That is deliberate.