Skip to main content
Grounds agent responses with WithRetrievers. Pick one backend per run. Sample KB documents are seeded by Task infra. Edit docker/weaviate/sample-documents.json or docker/pgvector/sample-documents.json and re-run up to change corpus content. Source: examples/agent_with_retriever/

Retriever modes

Set RETRIEVER_MODE in .env (default agentic): Prefetch/hybrid embed your exact user message — use concrete questions aligned with the sample KB (returns, shipping, warranty, etc.).

Setup

From examples/:
Weaviate:
pgvector:

Run examples

Use SHOW_TELEMETRY=true to compare prefetch vs agentic search counts.

Expected output

The response is grounded in the sample KB documents seeded by task infra:weaviate:up / task infra:pgvector:up. With SHOW_TELEMETRY=true in agentic mode you’ll see total_retriever_searches: 1.

Learn more

Retrieval

Retriever modes and backends

Memory

Long-term memory on same infra