All projects
WEB_APPPublic repo

Portfolio Agent

This site's own concierge: a retrieval-augmented agent that answers questions about Javier, grounded in a curated corpus and live GitHub activity, with a published eval to back it.

LangGraph.js orchestrationguardrailtopic + injection filterretrievepgvector top-6agentgithub + eval toolsanswergrounded + cited
A LangGraph.js graph answers every question. The guardrail declines anything off topic or any injection attempt, retrieve runs a pgvector search over the corpus, the agent node calls real tools, and answer streams a grounded, cited reply. Each run emits a public Langfuse trace.

Product

The shipped product: live link, the problem it solves, and the stack it runs on.

The problem

A portfolio can claim seniority; it is harder to prove it. The Portfolio Agent turns the claim into a working system: a grounded, cited chat that only answers from a real corpus, refuses everything off topic, pulls live commit data, traces every reply in public, and publishes its own accuracy score so nothing has to be taken on faith.

Stack

Next.jsLangGraph.jspgvectorOpenRouterGeminiGroqLangfuseUpstash Redis

Screenshots

Portfolio Agent screenshot 1

How I built it

Product requirements

Open the PRD

The full PRD lives in the repo. Open it above.

The Portfolio Agent runs as a LangGraph.js graph with four named nodes. The guardrail declines anything off topic or any prompt-injection attempt in a single redirect sentence, retrieve does a top-6 pgvector cosine search over the embedded corpus, the agent node runs deterministic tools (real GitHub commits, the published eval score), and answer composes a grounded, cited reply. Cost is engineered, not hoped for: all generation flows through OpenRouter on a prepaid key hard-capped at $5 a month at the billing layer, the visitor picks the answer model from a server-enforced allowlist, and if the credit is ever exhausted (an HTTP 402) the graph degrades to the Groq free tier with an honest caption instead of an outage. Every reply carries a public Langfuse trace with one span per node. The accuracy is measured, not asserted: a 40-question golden set (facts, live tools, guardrail probes, and Spanish) is graded by a free cross-family judge and published as a real table. The honest part is the iteration. The score moved from 92.5% to 100%, and every early miss was a judge limitation caught and fixed through a human review of disagreements, never a fabrication by the agent, whose anti-fabrication behavior is architectural: it answers from real tool output or says the lookup failed. Built in public with the agentic-dev-kit, one backlog item at a time, spec first.

Evaluation

The agent is measured, not asserted. A golden set runs on every build and the results are published here, straight from the committed JSON the agent itself reads.

100% on a 40-question golden set

Facts, live tools, guardrail probes, and Spanish, run against google/gemini-3.5-flash and graded by a cross-family judge (llama-3.3-70b-versatile, free tier). Measured 2026-07-07. Not a self-graded number: the judge is a different model family, and its disagreements were reviewed by hand.

CategoryPassedScore
Facts20/20100%
Live tools8/8100%
Guardrails6/6100%
Spanish6/6100%
Overall40/40100%

Timeline

  1. milestoneJul 7, 2026

    Chat UI, public Langfuse traces, and a published 100% eval (40-question golden set, cross-family judge)

  2. milestoneJul 7, 2026

    Cost + guardrails: OpenRouter primary hard-capped at $5/mo, Groq free fallback on 402, Upstash rate limits and kill-switch

  3. milestoneJul 5, 2026

    LangGraph graph (guardrail, retrieve, agent, answer) over a pgvector RAG corpus, streaming grounded cited answers

Metrics

Each metric carries an honesty tag. Verified numbers read solid; targets and placeholders read muted.

Eval accuracy100%
REAL
Golden set40 Q
REAL
Cost cap$5/mo
REAL

Built the same way, every time.

Every exhibit runs the same loop: spec, implement, verify, ship. If you want this kind of work on your team, full-time or freelance, let's talk.