Skip to content

Configuration

A2EHostConfig

The central configuration object, loaded from YAML:

python
from a2e.schema import A2EHostConfig
config = A2EHostConfig.from_yaml("config.yaml")

Fields

FieldTypeDefaultDescription
host_idstrUUID hex[:8]Unique host identifier
serverServerConfig0.0.0.0:8765Server host and port
auth_tokenstr""Authentication token for agents
transportTransportConfigTransport type and settings
auditAuditConfigAudit logging configuration
pluginslist[PluginConfig][]Plugin configurations
snapshot_storeSnapshotStoreConfigNonePersistence store config
snapshot_modestr"host""host" / "plugin" / "hybrid"
audit_log_pathstrNonePath to audit log file
global_limitsdict{}Resource limits

Methods

MethodReturnsDescription
get_plugin(name)PluginConfig or NoneFind plugin config by name
enabled_plugins()list[PluginConfig]Filter to enabled plugins only

Complete YAML Example

yaml
host_id: "a2e-dev"
server:
  host: "0.0.0.0"
  port: 8765
auth_token: "dev-secret"

transport:
  type: http
  config:
    base_url: "http://localhost:8765"
    send_path: "/send"
    stream_path: "/stream"

audit:
  enabled: true
  path: "/tmp/a2e-audit.jsonl"
  rotate:
    max_bytes: 10485760    # 10 MB
    backup_count: 5
  session_id_source: "uuid"  # "host_id" or "uuid"

snapshot_store:
  type: file
  config:
    root: "/tmp/a2e-snapshots"

snapshot_mode: "hybrid"

plugins:
  # --- Tools ---
  - name: mytools
    type: tools
    cls: cookbook.servers.tools.registry_tool_plugin.RegistryToolPlugin
    metadata:
      enabled: true
      priority: 0
      modules:
        - cookbook.servers.tools.read_file_tool
        - cookbook.servers.tools.glob_tool
        - cookbook.servers.tools.grep_tool

  # --- Memory ---
  - name: mymemory
    type: memory
    cls: cookbook.servers.memory.inmemory.InMemoryPlugin
    metadata:
      enabled: true
      working_limit: 50
      episodic_limit: 50
      semantic_limit: 50

  # --- Environment ---
  - name: counter_env
    type: env
    cls: cookbook.servers.counter_env.CounterEnv
    metadata:
      enabled: true

  # --- Processes ---
  - name: myprocs
    type: proc
    cls: a2e.caps.proc.plugin.ProcPlugin
    metadata:
      enabled: true
      priority: 5
      allowed_commands:
        - python3
        - bash
        - ls
      timeout: 30
      max_output_bytes: 1048576
      max_procs: 10
      network_disabled: true

  # --- Learning ---
  - name: mylearn
    type: learning
    cls: cookbook.servers.learn.learn.Learn
    metadata:
      enabled: true
      strategy: "ucb1"

  # --- Skills ---
  - name: filesystem_skill
    type: skill
    cls: cookbook.servers.skills.filesystem_skill.FilesystemSkillPlugin
    metadata:
      enabled: true

  # --- MCP ---
  - name: mymcp
    type: mcp
    cls: a2e.caps.mcp.plugin.MCPPlugin
    metadata:
      enabled: true
      priority: 10
      servers:
        - server_id: "local_tools"
          name: "Local Tools"
          transport: "stdio"
          cmd: ["python", "-m", "my_mcp_server"]
        - server_id: "remote_http"
          name: "Remote HTTP"
          transport: "sse"
          url: "http://localhost:8081/sse"
      routing_strategy: "auto"
      observability: true

ServerConfig

FieldTypeDefault
hoststr"0.0.0.0"
portint8765

TransportConfig

FieldTypeDescription
typestr"http", "direct", or "subprocess"
configHTTPTransportConfig | DirectTransportConfig | SubprocessTransportConfigType-specific config

HTTPTransportConfig

FieldTypeRequiredDefaultDescription
base_urlHttpUrlYesBase URL of A2E server
send_pathstrNo"/send"POST endpoint for outgoing messages
stream_pathstrNo"/stream"SSE endpoint for incoming messages

DirectTransportConfig

FieldTypeRequiredDefaultDescription
(none)No config fields — wired programmatically via connect()

See cookbook/servers/a2e_direct.py for wiring example.

SubprocessTransportConfig

FieldTypeRequiredDefaultDescription
commandstrNoNoneCommand to launch the host subprocess (e.g. "python3 -c '...'")
envdict[str, str]NoNoneEnvironment variables to pass to the subprocess
cwdstrNoNoneWorking directory for the subprocess

Subprocess YAML example

yaml
transport:
  type: subprocess
  config:
    command: "python3 -m a2e_subprocess_host --config config_subprocess.yaml"
    env:
      PYTHONUNBUFFERED: "1"
    cwd: "/app"

Direct YAML example

yaml
transport:
  type: direct
  config: {}

WARNING

DirectTransport is wired programmatically — the YAML config type: direct is valid but build_transport() raises ValueError. Use the DirectTransport class directly in code.

FieldTypeDefaultDescription
enabledboolEnable/disable audit
pathstrNoneLog file path
rotateAuditRotateConfigRotation settings
session_id_sourcestr"uuid""host_id" or "uuid"

AuditRotateConfig

FieldTypeDefault
max_bytesint10485760 (10 MB)
backup_countint5

SnapshotStoreConfig

FieldTypeDefaultDescription
typestr"file""file", "sqlite", or "custom"
configdict{}Type-specific config

A2E Protocol v1.0 — Released under the MIT License.