Give each tracker agent its own config

The tracker-mapping, common-pattern enrichment, and third-party
disambiguation agents were all built from one shared
TrackerAgentsConfig fed by a single tracker-mapping config slot. That
forced a single AgentTimeout to be reused and patched per worker, and
two unrelated max-turns fields to share one struct.

Split the in-code config into TrackerMappingAgentConfig,
TrackerEnrichmentAgentConfig, and DisambiguationAgentConfig, each with
its own timeout and max-turns, and add dedicated tracker-enrichment and
third-party-disambiguation provider slots (the latter resolving next to
third-party-vetter). Enrichment and disambiguation fall back to the
tracker-mapping slot when their own provider is unset, preserving
single-config deployments.

Drop the shared pkg/agentsbuild package and duplicate its small wiring
into probod and proboctl so the two executables stay decoupled. Wire
the new env vars, builder test coverage, and Helm values.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-08 11:24:37 +02:00
parent e6866f88a0
commit 92a73e9302
20 changed files with 552 additions and 289 deletions

View File

@@ -20,23 +20,38 @@ import (
"go.probo.inc/probo/pkg/llm"
)
// TrackerAgentsConfig configures the tracker agents that share one LLM
// client, model, and tool surface: the tracker-mapping agent (catalog
// identification) and the common-pattern enrichment agent (description
// research). Both use DB-backed search tools and may also use Firecrawl
// for web search when an API key is supplied.
// TrackerMappingAgentConfig configures the tracker-mapping agent
// (catalog identification). It uses DB-backed search tools and may also
// use Firecrawl for web search when an API key is supplied.
//
// MaxTokens and Temperature bound and steer each LLM call (both
// outputs are tiny structured JSON). AgentTimeout caps a single agent
// run, and the per-worker max-turns bound the agent reasoning loop.
// Zero-valued tuning fields fall back to package defaults.
type TrackerAgentsConfig struct {
LLMClient *llm.Client
Model string
FirecrawlAPIKey string
MaxTokens *int
Temperature *float64
AgentTimeout time.Duration
MappingMaxTurns int
EnrichmentMaxTurns int
// MaxTokens and Temperature bound and steer the LLM call (the output is
// tiny structured JSON). Timeout caps a single agent run and MaxTurns
// bounds the agent reasoning loop. Zero-valued tuning fields fall back
// to package defaults.
type TrackerMappingAgentConfig struct {
LLMClient *llm.Client
Model string
FirecrawlAPIKey string
MaxTokens *int
Temperature *float64
Timeout time.Duration
MaxTurns int
}
// TrackerEnrichmentAgentConfig configures the common-pattern enrichment
// agent (description research). It uses DB-backed search tools and may
// also use Firecrawl for web search when an API key is supplied.
//
// MaxTokens and Temperature bound and steer the LLM call (the output is
// tiny structured JSON). Timeout caps a single agent run and MaxTurns
// bounds the agent reasoning loop. Zero-valued tuning fields fall back
// to package defaults.
type TrackerEnrichmentAgentConfig struct {
LLMClient *llm.Client
Model string
FirecrawlAPIKey string
MaxTokens *int
Temperature *float64
Timeout time.Duration
MaxTurns int
}