Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

Execution Targets and Native Runners

Beyond standard HTTP providers, Keeptrusts supports execution targets — local processes, native CLI runners, and adapter-backed providers that run tools, agents, and MCP bridges directly from the gateway.

Use this page when

  • You need the exact command, config, API, or integration details for Execution Targets and Native Runners.
  • You are wiring automation or AI retrieval and need canonical names, examples, and constraints.
  • If you want a guided rollout instead of a reference page, use the linked workflow pages in Next steps.

Primary audience

  • Primary: AI Agents, Technical Engineers
  • Secondary: Technical Leaders

Overview

Execution targets let you proxy requests to:

  • Claude Agent SDK — Run Claude Code as a native agent
  • Codex SDK — Run OpenAI Codex as a sandboxed agent
  • MCP bridges — Connect to Model Context Protocol servers
  • Browser agents — Playwright-based browser automation
  • Custom adapters — Any executable that speaks the adapter protocol

Adapter families

FamilyString valueSupportProvider aliases
Claude Agent SDKclaude-agent-sdkNative or adapterclaude-agent-sdk, claude-code, anthropic:claude-agent-sdk
Codex SDKcodex-sdkNative or adaptercodex-sdk, codex, openai:codex-sdk, openai:codex
OpenAI Agentsopenai-agentsNative or adapteropenai-agents, openai:agents
OpenCode SDKopencode-sdkNative or adapteropencode-sdk, opencode, openai:opencode-sdk
Bedrock Agentsbedrock-agentsNative or adapterbedrock-agents, bedrock:agents, aws:agents
MCPmcpNative or adaptermcp
BrowserbrowserAdapter onlybrowser, browser-agent, playwright-browser
ChatKitchatkitAdapter onlychatkit, openai:chatkit:*
WebSocketwebsocketAdapter onlywebsocket
TransformerstransformersNative or adaptertransformers, transformers.js, transformers:*

Native families have a default executable and can run without adapter_command. Adapter only families require an adapter_command.

Common adapter fields

These fields apply to all execution targets:

pack:
name: config-execution-targets-providers-1
version: 1.0.0
enabled: true
providers:
targets:
- id: my-agent
provider: claude-agent-sdk
model: claude-sonnet-4-20250514
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true
FieldTypeDefaultDescription
adapter_commandstringPath to the adapter executable
adapter_argsstring[][]Arguments passed to the adapter
adapter_cwdstringWorking directory for the adapter process (falls back to working_dir)
adapter_envmap{}Environment variables injected into the adapter process
execution_timeout_msinteger30000Timeout for the execution target (ms, min: 1)
working_dirstringWorking directory for native runners (fallback for adapter_cwd)
additional_directoriesstring[][]Extra directories exposed to the runner
cli_envmap{}Environment variables for native runners (merged with adapter_env, takes precedence)

Claude Agent SDK

Run Claude Code as a native agent with tool permissions, turn limits, and fallback models.

Minimal config

pack:
name: config-execution-targets-providers-2
version: 1.0.0
enabled: true
providers:
targets:
- id: claude-agent
provider: claude-agent-sdk
model: claude-sonnet-4-20250514
secret_key_ref:
env: ANTHROPIC_API_KEY
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

Full config

pack:
name: config-execution-targets-providers-3
version: 1.0.0
enabled: true
providers:
targets:
- id: claude-agent
provider: claude-agent-sdk
model: claude-sonnet-4-20250514
secret_key_ref:
env: ANTHROPIC_API_KEY
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

Claude Agent SDK fields

FieldTypeDefaultDescription
path_to_claude_code_executablestring"claude"Path to the Claude executable
permission_modestringTool permission level (see below)
append_allowed_toolsstring[][]Tools added to the default allow-list
disallowed_toolsstring[][]Tools explicitly blocked
allow_all_toolsbooleanfalsePermit all available tools
fallback_modelstringModel to use when the primary fails
max_turnsintegerMaximum conversation turns per invocation (min: 1)

Permission modes

ModeBehavior
defaultStandard tool permissions (ask for approval)
planPlan-only mode — suggest tool calls but don't execute
acceptEditsAuto-accept file edits
bypassPermissionsSkip all permission checks
dontAskNever prompt for approval, silently deny
bypassPermissions disables all safety prompts. Use only in sandboxed environments with trusted inputs.

Codex SDK

Run OpenAI Codex as a sandboxed agent with network and approval controls.

Minimal config

pack:
name: config-execution-targets-providers-4
version: 1.0.0
enabled: true
providers:
targets:
- id: codex-agent
provider: codex-sdk
model: codex-mini
secret_key_ref:
env: OPENAI_API_KEY
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

Full config

pack:
name: config-execution-targets-providers-5
version: 1.0.0
enabled: true
providers:
targets:
- id: codex-agent
provider: codex-sdk
model: codex-mini
secret_key_ref:
env: OPENAI_API_KEY
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

Codex SDK fields

FieldTypeDefaultDescription
codex_path_overridestring"codex"Path to the Codex executable
sandbox_modestringSandbox restriction level
approval_policystringWhen to require human approval
network_access_enabledbooleanAllow outbound network access
web_search_enabledbooleanAllow web search
skip_git_repo_checkbooleanSkip Git repository safety check

Sandbox modes

ModeBehavior
read-onlyCan read files but not write
workspace-writeCan write within the working directory
danger-full-accessFull filesystem access (use with caution)

Approval policies

PolicyBehavior
neverNever ask for approval
on-requestAsk before every action
on-failureAsk only when an action fails
untrustedAsk for all untrusted tool calls

MCP bridge

Connect to Model Context Protocol servers with tool validation and security policies.

Minimal config

pack:
name: config-execution-targets-providers-6
version: 1.0.0
enabled: true
providers:
targets:
- id: mcp-server
provider: mcp
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

Full config with validation

pack:
name: config-execution-targets-providers-7
version: 1.0.0
enabled: true
providers:
targets:
- id: mcp-server
provider: mcp
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

MCP bridge fields

FieldTypeDefaultDescription
mcp.protocol_versionstring"2026-03-26"MCP protocol version
mcp.session_idstringOperator-defined session identifier
mcp.tool_validationobjectTool allowlist and schema validation
mcp.tool_securityobjectArgument-level security checks

Tool validation

FieldTypeDefaultDescription
declared_toolsstring[][]Allowlisted tool names
schemasmap{}JSON Schema per tool (keys = tool names)
allow_undeclaredbooleanfalseAllow unlisted tools (logged but not blocked)
semantic_validation.enabledbooleanfalseEnable LLM-based semantic validation
semantic_validation.endpointstringOpenAI-compatible validation endpoint
semantic_validation.modelstringModel for semantic validation
semantic_validation.secret_key_refstringEnv var with validation API key
semantic_validation.timeout_msinteger3000Timeout for validation call (min: 1)

Tool security

FieldTypeDefaultDescription
analysis_modestring"local"local (static analysis) or external (firewall)
firewall_endpointstringExternal firewall URL (required when external)
secret_key_refobjectEnvironment-backed secret reference for the firewall API key
fail_closedbooleantrueBlock if firewall unavailable
blocked_entity_typesstring[][]Entity types that trigger local blocks

Default blocked entity types: pan, ssn, jwt, aws_access_key, mrn, private_key.

Browser agents

Run Playwright-based browser automation agents.

pack:
name: config-execution-targets-providers-8
version: 1.0.0
enabled: true
providers:
targets:
- id: browser-agent
provider: browser
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

Browser targets always require adapter_command — there is no native default executable.

Custom adapters

Any executable that speaks the adapter protocol can be used as a provider:

pack:
name: config-execution-targets-providers-9
version: 1.0.0
enabled: true
providers:
targets:
- id: custom-agent
provider: openai-agents
policies:
chain:
- audit-logger
policy:
audit-logger:
immutable: true
retention_days: 365
log_all_access: true

Combining with policy chains

Execution targets work with the same policy chain as HTTP providers:

pack:
name: agent-gateway
version: 1.0.0
enabled: true
providers:
targets:
- id: claude-agent
provider: claude-agent-sdk
model: claude-sonnet-4-20250514
secret_key_ref:
env: ANTHROPIC_API_KEY
policies:
chain:
- agent-firewall
- prompt-injection
- audit-logger
policy:
agent-firewall:
allowed_tools:
- Read
- Write
- Bash
blocked_tools:
- WebFetch
max_actions_per_session: 100

For AI systems

  • Canonical terms: Keeptrusts, policy-config.yaml, execution targets, adapter_command, adapter_args, adapter_cwd, adapter_env, cli_env, execution_timeout_ms, claude-agent-sdk, codex-sdk, openai-agents, mcp, browser, permission_mode, sandbox_mode.
  • Adapter families: Claude Agent SDK, Codex SDK, OpenAI Agents, OpenCode SDK, Bedrock Agents, MCP, Browser, ChatKit, WebSocket, Transformers.
  • Best next pages: Providers Configuration, Cloud Provider Configuration, Agent Firewall policy.

For engineers

  • "Native" families (Claude, Codex, MCP) have default executables and work without adapter_command; "adapter only" families (Browser, ChatKit, WebSocket) require it.
  • Set execution_timeout_ms appropriately for long-running agent tasks (120s+ for complex code generation or multi-turn agents).
  • cli_env takes precedence over adapter_env when both set the same variable.
  • Use permission_mode: "plan" for Claude agents in production to prevent unreviewed tool execution.
  • MCP tool_validation.allow_undeclared: false ensures only declared tools can be called; undeclared tools are blocked.
  • Combine execution targets with agent-firewall policy for tool-level access control.

For leaders

  • Execution targets extend the gateway to proxy requests to native agent SDKs (Claude Code, Codex, MCP servers) with the same policy enforcement as HTTP providers.
  • Permission modes and sandbox restrictions provide security boundaries for agent code execution without custom infrastructure.
  • MCP tool validation and security ensure agents can only call declared tools with validated arguments, preventing unauthorized actions.
  • All execution targets work with the same policy chain (prompt-injection, agent-firewall, audit-logger), providing consistent governance regardless of provider type.

Next steps