Skip to main content

Module

Resolve Galileo context for Agent Control calls. This module produces generic Agent Control targets from Galileo state. It does not import the Agent Control SDK; callers wire the two SDKs together explicitly. For Agent Control telemetry ingestion, use galileo.handlers.agent_control.

AgentControlTargetUnresolvedError

Raised when no Agent Control target can be resolved from available inputs.

AgentControlTarget

A target identifier that can be passed to Agent Control. Arguments
  • target_type: Opaque Agent Control target type. Agent Control treats this value as deployer-defined; Galileo currently auto-resolves only log_stream targets.
  • target_id: Opaque Agent Control target ID.
  • project_id: Galileo project ID for logs, debugging, and audit context only. Agent Control resolves project ownership from target_type and target_id.

get_agent_control_target

def get_agent_control_target(*,
                             target_type: str=LOG_STREAM_TARGET_TYPE,
                             target_id: str | None=None,
                             log_stream_id: str | None=None,
                             project_id: str | None=None) -> AgentControlTarget
Resolve an Agent Control target from explicit inputs or Galileo context. Resolution order:
  1. Explicit target_id.
  2. Explicit log_stream_id for log_stream targets.
  3. GALILEO_LOG_STREAM_ID for log_stream targets.
  4. An already-initialized galileo_context logger.
This helper does not resolve log stream names over the network. If only a log stream name is available, resolve it with the Galileo SDK first and pass the resulting ID explicitly.