What It Does
Tessera automates the investigation of the ~5–10% of transactions that rule engines cannot resolve — cases where signals conflict or context is required. The agent runs a live multi-tool loop, retrieves precedent from historical cases via vector similarity, and returns a cited verdict in under 5 seconds. If it cannot cite a source it escalates to a human rather than guessing.
Grounding Enforcement
Every verdict must cite an owner-defined rule or a retrieved case, or it is rewritten to ESCALATE. This constraint is enforced at the application layer (Pydantic validation on the agent service), not in the prompt. Uncited APPROVE / DECLINE verdicts never reach the caller — Tessera never silently fails.
Architecture
Three independent services communicate over JSON/HTTP with internal API key auth:
- tessera-agent (Python / FastAPI) — agent loop, tool dispatch, grounding enforcement, cost tracking
- tessera-data (Go / chi) — data API, pgvector similarity search, case management
- tessera-web (Next.js 15 / React 19) — analyst dashboard with real-time SSE streaming
Live Data Tools (6)
User purchase history, IP risk fingerprinting, device fingerprinting, blacklist checks, pgvector case similarity search (1536-dim embeddings, ivfflat index), and cross-user velocity detection.
Human-in-the-Loop RAG Flywheel
When an analyst corrects a verdict their decision, note, and decisive signals are embedded and stored in pgvector. The next similar transaction retrieves this case as precedent. The system improves by growing its case memory — no retraining required, feedback is live within hours.
SLOs & Unit Economics
- Latency: < 5 s per verdict
- Cost: < $0.10 USD per decision (token usage accumulated and persisted per run)
- Accuracy: ≥ 80% match with analyst golden dataset
- Observability: Full Langfuse traces (parent trace + child spans per tool call and LLM invocation)