Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from collections.abc import Mapping
from typing import Any
from typing import Any, cast

from agent_control_models import Step
from galileo_core.schemas.logging.session import Session
Expand Down Expand Up @@ -156,21 +156,21 @@ def record_from_step(
**common,
input=GalileoRecordNormalizer.tool_input(input_value),
output=GalileoRecordNormalizer.tool_output(output_value),
spans=_span_children(child_records, parent_type=record_type),
spans=cast(Any, _span_children(child_records, parent_type=record_type)),
)
if record_type == "retriever":
return RetrieverSpan(
**common,
input=GalileoRecordNormalizer.retriever_input(input_value),
output=GalileoRecordNormalizer.retriever_output(output_value),
spans=_span_children(child_records, parent_type=record_type),
spans=cast(Any, _span_children(child_records, parent_type=record_type)),
)
if record_type == "trace":
return Trace(
**common,
input=GalileoRecordNormalizer.trace_input(input_value),
output=GalileoRecordNormalizer.trace_output(output_value),
spans=_span_children(child_records, parent_type=record_type),
spans=cast(Any, _span_children(child_records, parent_type=record_type)),
)
traces = [child for child in child_records if isinstance(child, Trace)]
if len(traces) != len(child_records):
Expand Down
1 change: 1 addition & 0 deletions server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ license = {text = "Apache-2.0"}

[project.optional-dependencies]
galileo = ["agent-control-evaluator-galileo>=7.5.0"]
redis = ["redis>=5.2.1"]
binary = ["psycopg[binary]>=3.1"]
c = ["psycopg[c]>=3.1"]

Expand Down
17 changes: 16 additions & 1 deletion server/src/agent_control_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
import secrets
from functools import cached_property
from typing import Any
from typing import Any, Literal

from agent_control_models import JSONObject
from agent_control_telemetry import DEFAULT_CONTROL_EVENT_SINK_NAME
Expand Down Expand Up @@ -191,6 +191,21 @@ class Settings(BaseSettings):
),
)

control_cache_backend: Literal["postgres", "redis"] = Field(
default="postgres", validation_alias=AliasChoices("AGENT_CONTROL_CONTROL_CACHE_BACKEND")
)
redis_url: str | None = Field(
default=None, validation_alias=AliasChoices("AGENT_CONTROL_REDIS_URL")
)
redis_mode: Literal["standalone", "cluster"] = Field(
default="standalone", validation_alias=AliasChoices("AGENT_CONTROL_REDIS_MODE")
)
control_cache_ttl_seconds: int = Field(
default=60,
ge=1,
validation_alias=AliasChoices("AGENT_CONTROL_CONTROL_CACHE_TTL_SECONDS"),
)

# Prometheus metrics settings
prometheus_metrics_prefix: str = _env_alias_field(
"agent_control_server",
Expand Down
Loading
Loading