U8 · Secondary
AgentLab — agent architecture lab
A study lab where I test agent architectures. Users build agents with their own Anthropic or OpenAI key and can switch on a mode that runs a 5-node LangGraph graph, showing each step live and sending traces to Langfuse.
Screens



Engineering decisions
- LangGraph graph with conditional routing: it classifies intent and chooses between calling tools, retrieving context or answering directly. A validation node asks for a new answer up to 2 times if the first one fails.
- Lab panel inside the chat: per-node execution log with timings, a graph diagram that highlights the active node, and a link to the Langfuse trace, all streamed over SSE.
- Multi-provider BYOK: Anthropic and OpenAI keys are encrypted with AES-256-GCM before they hit the database. The model list is fetched from each provider's API.
- Two execution paths: regular chat runs through the Vercel AI SDK in Next.js; lab mode runs in a separate Python (FastAPI) service. The user's key never reaches the browser.
- 4-layer input sanitization against prompt injection (Unicode normalization, regex, base64 payload detection and special-character ratio).
- Built from 12 per-feature specs (spec-driven development), using Claude Code.
Results
- Public MIT-licensed code, with specs and docs for architecture, BYOK, auth and the database in the repo.
Stack
Next.js 15TypeScriptPythonFastAPILangGraphVercel AI SDKPrismaPostgreSQLLangfuseDocker
What it shows
It's where I try out agent patterns (routing, tool use, self-validation, observability) in a full app before using them in client work.
More projects
U5
ReachantB2B lead-list builder for Brazil and the US. It finds businesses on Google Places by industry and city, then enriches each lead with website, contacts and decision-maker. Includes an API and an MCP server for AI agents.
liveU6NutriAppPractice software for dietitians: patient records, meal plans, lab results and scheduling, with each practitioner's data isolated at the database level. AI reads lab reports, with mandatory review, and drafts a consult-support report.
liveU7DockPlus AI Client WebsitesFast, search-friendly, on-brand websites for small businesses in Brazil and the US, built with a repeatable process I wrote as a Claude Code skill that goes from the client's Instagram and Google Business Profile to deploy.
live