Skip to content

Agent Runtime Tools

This page is generated by pnpm docs:generate:pack-reference. Add any pack-specific notes outside the managed block below; reruns preserve them.

| Tool | Permission | Required approvals | Required scopes | | -------------------------------- | ---------- | ------------------------------ | ----------------------------------------------------------------- | | agent-runtime:execute-turn | write | None | path read .agent-runtime/**
path write .agent-runtime/** | | agent-runtime:resume_workflow | write | None | path read .agent-runtime/**
path write .agent-runtime/** | | agent-runtime:pause_turn | write | agent-runtime:remote_control | path read .agent-runtime/**
path write .agent-runtime/** | | agent-runtime:abort_turn | write | agent-runtime:remote_control | path read .agent-runtime/**
path write .agent-runtime/** | | agent-runtime:elevate_autonomy | write | agent-runtime:remote_control | path read .agent-runtime/**
path write .agent-runtime/** | | agent-runtime:lower_autonomy | write | None | path read .agent-runtime/**
path write .agent-runtime/** | | agent-runtime:approve_inflight | write | None | path read .agent-runtime/**
path write .agent-runtime/** |

  • Permission: write
  • Required approvals: None
  • Required scopes: path read .agent-runtime/**, path write .agent-runtime/**
{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "minLength": 1
    },
    "model_profile": {
      "type": "string",
      "minLength": 1
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "stream": {
      "type": "boolean"
    },
    "messages": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": ["system", "user", "assistant", "tool"]
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "text"
                        },
                        "text": {
                          "type": "string"
                        },
                        "provider_item_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "provider_status": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": ["type", "text"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "reasoning"
                        },
                        "text": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "provider_item_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "provider_status": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": ["type"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "opaque"
                        },
                        "provider": {
                          "type": "string",
                          "enum": ["openai_compatible", "openai_responses", "messages_compatible"]
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1
                        },
                        "data": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      },
                      "required": ["type", "provider", "kind", "data"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "tool_call"
                        },
                        "call_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "input": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "provider_item_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "provider_status": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": ["type", "call_id", "name", "input"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "tool_result"
                        },
                        "call_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "output": {},
                        "is_error": {
                          "type": "boolean"
                        },
                        "provider_item_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "provider_status": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": ["type", "call_id", "output", "is_error"],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            ]
          },
          "tool_name": {
            "type": "string"
          },
          "tool_call_id": {
            "type": "string"
          }
        },
        "required": ["role", "content"],
        "additionalProperties": false
      }
    },
    "tool_catalog": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "input_schema": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": ["name", "description"],
        "additionalProperties": false
      }
    },
    "intent_catalog": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["id", "description"],
        "additionalProperties": false
      }
    },
    "limits": {
      "type": "object",
      "properties": {
        "max_turns_per_session": {
          "type": "integer",
          "minimum": 1
        },
        "max_tool_calls_per_session": {
          "type": "integer",
          "minimum": 1
        },
        "max_input_bytes": {
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false
    }
  },
  "required": ["session_id", "model_profile", "url", "messages"],
  "additionalProperties": false
}
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": ["reply", "tool_request"]
    },
    "untrusted_model_label": {
      "type": "string",
      "minLength": 1
    },
    "assistant_message": {
      "type": "string"
    },
    "requested_tools": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "call_id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "input": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": ["call_id", "name", "input"],
        "additionalProperties": false
      }
    },
    "content_blocks": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "text": {
                "type": "string"
              },
              "provider_item_id": {
                "type": "string",
                "minLength": 1
              },
              "provider_status": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["type", "text"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "reasoning"
              },
              "text": {
                "type": "string"
              },
              "metadata": {
                "type": "object",
                "additionalProperties": true
              },
              "provider_item_id": {
                "type": "string",
                "minLength": 1
              },
              "provider_status": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["type"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "opaque"
              },
              "provider": {
                "type": "string",
                "enum": ["openai_compatible", "openai_responses", "messages_compatible"]
              },
              "kind": {
                "type": "string",
                "minLength": 1
              },
              "data": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "required": ["type", "provider", "kind", "data"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "tool_call"
              },
              "call_id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "input": {
                "type": "object",
                "additionalProperties": true
              },
              "provider_item_id": {
                "type": "string",
                "minLength": 1
              },
              "provider_status": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["type", "call_id", "name", "input"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "tool_result"
              },
              "call_id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "output": {},
              "is_error": {
                "type": "boolean"
              },
              "provider_item_id": {
                "type": "string",
                "minLength": 1
              },
              "provider_status": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["type", "call_id", "output", "is_error"],
            "additionalProperties": false
          }
        ]
      }
    },
    "terminal_state": {
      "type": "string",
      "enum": ["complete", "tool_request", "incomplete", "refused", "paused", "unknown"]
    },
    "provider": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": ["openai_compatible", "openai_responses", "messages_compatible"]
        },
        "model": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": ["kind", "model"],
      "additionalProperties": false
    },
    "usage": {
      "type": "object",
      "properties": {
        "input_tokens": {
          "type": "integer",
          "minimum": 0
        },
        "output_tokens": {
          "type": "integer",
          "minimum": 0
        },
        "total_tokens": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "finish_reason": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "status",
    "assistant_message",
    "content_blocks",
    "terminal_state",
    "provider",
    "finish_reason"
  ],
  "additionalProperties": false
}
  • Permission: write
  • Required approvals: None
  • Required scopes: path read .agent-runtime/**, path write .agent-runtime/**
{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": ["session_id"],
  "additionalProperties": false
}

Not declared in the pack manifest.

  • Permission: write
  • Required approvals: agent-runtime:remote_control
  • Required scopes: path read .agent-runtime/**, path write .agent-runtime/**
{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "minLength": 1
    },
    "reason": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": ["session_id"],
  "additionalProperties": false
}

Not declared in the pack manifest.

  • Permission: write
  • Required approvals: agent-runtime:remote_control
  • Required scopes: path read .agent-runtime/**, path write .agent-runtime/**
{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "minLength": 1
    },
    "reason": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": ["session_id"],
  "additionalProperties": false
}

Not declared in the pack manifest.

  • Permission: write
  • Required approvals: agent-runtime:remote_control
  • Required scopes: path read .agent-runtime/**, path write .agent-runtime/**
{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "minLength": 1
    },
    "reason": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": ["session_id"],
  "additionalProperties": false
}

Not declared in the pack manifest.

  • Permission: write
  • Required approvals: None
  • Required scopes: path read .agent-runtime/**, path write .agent-runtime/**
{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "minLength": 1
    },
    "reason": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": ["session_id"],
  "additionalProperties": false
}

Not declared in the pack manifest.

  • Permission: write
  • Required approvals: None
  • Required scopes: path read .agent-runtime/**, path write .agent-runtime/**
{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": ["session_id"],
  "additionalProperties": false
}

Not declared in the pack manifest.

agent-runtime:execute-turn treats requested_tools and ordered tool_call entries in content_blocks as one exact contract. Call IDs must be present and unique, and each position must have the same ID, name, and input object. The adapter rejects missing, duplicate, conflicting, or reordered calls before the orchestration loop can execute a governed tool. Executable requests come only from native OpenAI-compatible tool_calls or Messages-compatible tool_use blocks. There is no singular execute-turn alias or text-shaped requested-tool fallback.

Canonical native tool-only responses remain executable without a synthetic text envelope. The adapter derives tool_request from native calls and the matching provider reason, preserves provider text when present, and never invents a call ID. Assistant text is untrusted ordinary content and is never parsed as a JSON control channel. intent_catalog is accepted only as a deprecated ignored compatibility input. Messages-compatible requests emit x-api-key, a pinned anthropic-version, and a positive max_tokens budget required by the native API.

This OpenAI-compatible contract is Chat Completions-style; it does not claim Responses typed-item/SSE compatibility. Messages-compatible execution covers client-owned tool calls, not provider-owned/server tools or nested and programmatic tool graphs.

The host loop admits a multi-call batch atomically against max_tool_calls_per_session. If the whole batch does not fit, no tool runs and every declared call receives a paired LIMIT_EXCEEDED result. If a tool throws after the batch starts, that call receives a failure result and every remaining call receives an explicit not-executed result, keeping provider history resumable.

The provider safety limits bound non-stream response bytes, total stream bytes, event count, snapshot count, content blocks, tool calls, and tool-argument bytes. Stream snapshots contain only the latest delta rather than a growing copy of all prior text. Tool-argument byte accounting is incremental for fragmented calls.

After a provider terminal marker—OpenAI [DONE] or Messages-compatible message_stop—the adapter drains until natural EOF or one absolute configured deadline, rejects every non-empty post-terminal chunk observed before that deadline, and then cancels a reader that did not close. Cancellation is best-effort and never blocks the bounded return path. Bytes sent only after the deadline are not observable. Abort signals remain active during body reads and produce one cancelled outcome; disconnected readers produce one client_disconnect outcome. OpenAI [DONE] is accepted only after a finish reason. Messages message_stop is accepted only after every started content block has stopped and message_delta supplied a stop reason. Tool turns require OpenAI tool_calls or Messages-compatible tool_use. Truncation reasons such as length and max_tokens map to incomplete; filtering or refusal maps to refused; all remain non-runnable.

Messages-compatible thinking and redacted_thinking data is retained as provider-owned state so the next tool-use request can return those blocks complete and unmodified. Indexed OpenAI reasoning fragments retain their ordering and signatures. See Anthropic’s official extended-thinking guidance.