An agent that queries databases and documents, and can't step out of scope even when asked to.
The challenge
An agent that can run SQL is useful and dangerous at the same time: one well-crafted message can try to make it delete or modify data. Asking it not to in the prompt is not a guarantee.
How it's built
LangGraph with autonomous tool selection: SQL queries, document search and safe maths.
Read-only access enforced by a parser: any non-read statement is rejected before it reaches the database.
Langfuse tracing of every step, tool and cost.
138 automated tests, including attacks that try to make the agent write to the database or leave its scope. A test passes only if the attack fails.
What it shows
An agent's boundaries belong in code, and its behaviour should be tested with cases designed to break it. It's the same approach I apply to production agents.
Production RAG over US tax regulationRAG system over 50+ IRS documents for a US tax-compliance client: 9 retrieval configurations benchmarked, Recall@5 of 0.98 and on-premise deployment.
Automating official filings for the legal sectorAI automation of official forms for law firms: LLM extraction, validation against official registries and human approval. 75-90% less manual time, zero incorrect filings.