Invoke agent

Invoke an agent on a hidden child run for delegated or self-directed work. Returns the child agent reply.

Arguments

  • promptstringrequired

    Required handoff prompt for the delegated run.

  • task_idstring · min length 1 · max length 200

    Optional stable project task id. Reuse the same project, principal, agent and task id to replay one durable child, including after completion. The admitting parent retains ownership; another parent receives a conflict. Use a new task id for new work.

  • context_modestring

    Optional context policy for the first task admission. Omit or use continue to include the current conversation branch. Use fresh to start the child model from only the handoff packet. Task replay returns the original run. One of continue, fresh.

  • idempotency_scopestring

    Optional exact-once scope for an immutable durable-task invocation. Requires task_id. Task ids already select one durable child across tool-call retries, including after completion. Use a new task id for a new run. One of durable_task.

  • contextobject

    Structured data payload for the child task. Use this for critical facts, records, ids, decisions, and values the child must act on instead of copying those facts as prose. Defaults to {} when the delegation has no record or evidence payload.

  • evidence_refsarray of object

    Optional generic source-of-truth references for facts the child must preserve. Prefer run_id/message_id/tool_call_id plus result_path over copying critical facts as prose.

  • descriptionstring

    Optional short summary of the delegated task for UI and audit display.

  • agent_idstring

    Optional agent id. Must be the exact id from agent discovery (e.g. list_agents), without any prefix or namespace. Defaults to the current agent.

  • project_idstring

    Optional exact project UUID for cross-project delegation. Defaults to the current project.

  • runtime_target_kindstring

    Optional exact runtime target override. Leave unset unless the user explicitly asked to switch targets. One of main_branch, environment, preview_branch.

  • target_environment_idstring

    Required only for a real environment target override and must be the exact environment UUID.

  • target_branch_idstring

    Required only for a real preview branch override and must be the exact branch UUID.

  • source_target_kindstring

    Optional source target override for agent config discovery. Leave unset unless the user explicitly asked to change it. One of project, main_branch, environment, preview_branch.

  • allow_delegationboolean

    Optional. When true, the child run may invoke invoke_agent again. Defaults to false for child runs.

  • toolsarray of string

    Optional exact allowlist of tool names for the child run. Omit to inherit all available tools.

  • modelstring

    Optional model override for the child run. Must be allowed by the target agent if restricted.

  • thinkingboolean | integer · min 1

    Optional thinking override. When omitted, project-defined child runs use the selected agent config and projectless child runs use the platform default. Use false to disable or a positive integer budget when the runtime supports it.

  • max_stepsinteger · min 1

    Optional max-steps override for the child run.

curl -X POST -N "https://api.veryfront.com/mcp" \  -H "Authorization: Bearer $VERYFRONT_API_KEY" \  -H "Accept: application/json, text/event-stream" \  -H "Content-Type: application/json" \  -d '{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "veryfront__invoke_agent",    "arguments": {      "prompt": "string"    }  }}'