agent_spawn
Write a task to a blackboard to assign it to a specific agent, who will execute it on its next poll cycle.
Instructions
Write a task record to the blackboard to dispatch work to a named agent on its next poll cycle. Returns {ok:true, taskKey, agentId, instruction, written:true} on success. Returns {ok:false, error:"..."} if agent_id, task_key, or instruction is missing, or if payload_json is malformed. Call agent_list first to confirm the target agent is registered; verify the task was recorded with blackboard_read after spawning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | ID of the agent to assign the task to (e.g. "code_writer", "data_analyst") | |
| task_key | Yes | Blackboard key for the task (e.g. "task:write:auth_module") | |
| instruction | Yes | Natural language instruction for the agent | |
| payload_json | No | Optional JSON-encoded extra payload for the agent | |
| ttl | No | Time-to-live for the task entry in seconds (default: 3600) |