Give tracker agents a browser to read setters
The tracker-mapping and common-pattern enrichment agents only had web search, which returns title/url/snippet, so they could never open a cookie-database or cookie-policy page to read which vendor actually sets a tracker. This mis-attributed setters whose snippet is misleading (e.g. _li_* read as LinkedIn rather than LiveIntent). Wire the read-only headless-browser toolset into both agents, gated on a configured Chrome endpoint, mirroring the common-third-party enrichment worker: agent construction moves into the run path so each run can carry a per-run browser that is closed when the run returns. The prompts now direct the agent to open a promising result and read the named setter from the full page text. Both agents stay unchanged when no Chrome endpoint is configured. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -62,6 +62,7 @@ func (impl *Implm) buildTrackerAgents(
|
||||
LLMClient: mappingClient,
|
||||
Model: mappingAgentCfg.ModelName,
|
||||
FirecrawlAPIKey: firecrawlAPIKey,
|
||||
ChromeAddr: impl.cfg.ChromeDPAddr,
|
||||
MaxTokens: mappingAgentCfg.MaxTokens,
|
||||
Temperature: mappingAgentCfg.Temperature,
|
||||
Timeout: time.Duration(impl.cfg.TrackerMappingWorker.AgentTimeout) * time.Second,
|
||||
@@ -88,6 +89,7 @@ func (impl *Implm) buildTrackerAgents(
|
||||
LLMClient: enrichmentClient,
|
||||
Model: enrichmentAgentCfg.ModelName,
|
||||
FirecrawlAPIKey: firecrawlAPIKey,
|
||||
ChromeAddr: impl.cfg.ChromeDPAddr,
|
||||
MaxTokens: enrichmentAgentCfg.MaxTokens,
|
||||
Temperature: enrichmentAgentCfg.Temperature,
|
||||
Timeout: time.Duration(impl.cfg.CommonPatternEnrichmentWorker.AgentTimeout) * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user