AI layer for a US-tax advisory platform
From an audit of the team’s architecture docs to a production AI layer, built solo in two weeks: durable multi-agent execution on Temporal and hybrid RAG with source citations.
- Role
- Lead AI Engineer (solo)
- Period
- Oct 2026
- Stack
- PythonFastAPITemporalPostgreSQLpgvectorLiteLLMAWS

A project engagement in October 2026 for a fintech platform that advises on US tax. I started by auditing the team’s architecture documents and finished with the AI layer running in production. I built it solo, inside their existing FastAPI monolith, in two weeks.
The task
The team had a product scope, a high-level architecture and an MVP description of the agent logic, but the documents disagreed on how agents should run. My job was to settle two design questions: how to orchestrate the agents reliably, and how to build the knowledge base and retrieval. Then I had to ship both.
Approach
Durable execution first. An advisory answer can take many steps and wait on a person: a clarifying question or an approval. Nothing may be lost or left hanging. I compared building a scheduler on a queue with off-the-shelf workflow engines and chose self-hosted Temporal. It gives retries, timers and human-in-the-loop pauses out of the box, and keeps workflow history inside the client’s own infrastructure. I recorded the choice as an ADR and agreed the module boundaries with the backend team. The application database stays the source of truth.
Code decides, models explain. Where the answer is a rule or a date, code computes it and a model only explains it. Every claim in an answer links back to its source.
Hybrid retrieval in one database. Exact identifiers such as form numbers need full-text search, and paraphrased questions need vectors. Both run in the same PostgreSQL with pgvector, so there is no separate search service to operate.
What shipped
- An agent harness on Temporal with human-in-the-loop approvals, cost limits and an audit trail.
- 13 domain agents behind a single lead agent that answers the client.
- A knowledge base with document ingestion and hybrid search with citations.
- A multi-provider model gateway on LiteLLM with personal data masked before it leaves the system.
- A chat API, system-triggered runs and an operator console for evals.
- Production on AWS with zero-downtime deploys through GitHub Actions and Terraform.
Quality
Eval sets with 188 cases run through the public API, and the metric is stability across repeated runs, not one lucky pass. The back-office QA set went from 42 to 114 of 115 in two days. About 6,700 tests run at 96–97% coverage.
How I worked
I acted as a curator over AI coding agents: written specifications with a source for every point, acceptance on a clean checkout, and my own checks against dead code. That came to 691 commits in two weeks, with the first production release in the middle of the second week.