Skip to content

Python SDK — Agent Configuration

The PhyTrace Agent is configured via YAML. All fields with their defaults:

# phytrace-agent.yaml

agent:
  id: "agent-001"              # Unique agent identifier
  version: "1.0.0"             # Agent version

source:
  id: "robot-001"              # Robot/system identifier
  type: "amr"                  # Source type (amr, agv, cobot, drone, etc.)
  platform: "ros2"             # Platform identifier
  fleet_id: "fleet-001"        # Fleet grouping
  site_id: "site-001"          # Site/facility identifier
  organization_id: "org-001"   # Organization identifier

adapter:
  type: "ros2"                 # Platform adapter type
  # type: "tesla"
  # type: "simulation"
  # type: "rest"
  # type: "custom"

telemetry:
  periodic:
    interval_ms: 100           # Telemetry interval (10 Hz)
    domains:                   # Domains to capture
      - location
      - motion
      - power
      - operational
      - safety

transport:
  primary:
    type: "http"               # Transport type (http, grpc, mqtt, websocket)
    endpoint: "https://api.phycloud.io/v1/events"
    api_key_env: "PHYCLOUD_API_KEY"
    timeout_sec: 30
    max_retries: 3
  fallback:
    type: "http"
    endpoint: "https://api-fallback.phycloud.io/v1/events"

auth:
  type: "api_key"              # Auth type (api_key, mtls, oauth2)
  api_key_env: "PHYCLOUD_API_KEY"

reliability:
  buffer:
    enabled: true
    path: "/tmp/phytrace-buffer"
    max_size_mb: 512
    retention_days: 7
    encryption: true
  retry:
    max_retries: 5
    backoff_base_ms: 100
    backoff_max_ms: 30000
  batch:
    max_size: 100
    max_delay_ms: 1000
    compression: "gzip"

provenance:
  enabled: true
  signing_key_env: "PHYTRACE_SIGNING_KEY"
  include_device_attestation: false

observability:
  metrics:
    enabled: true
    port: 9090
  health_check:
    enabled: true
    port: 8081

commands:
  enabled: true                # Accept PhySafe commands
  allowed_commands:
    - "reduce_speed"
    - "set_speed_limit"
    - "stop"
    - "reroute"