[{"data":1,"prerenderedAt":222},["ShallowReactive",2],{"\u002Fen\u002Fwork\u002Fsigrun-multi-agent-rag-platform":3},{"id":4,"title":5,"body":6,"client":184,"description":194,"extension":195,"featured":196,"featuredImage":197,"meta":198,"metric":199,"navigation":196,"ogImage":200,"path":201,"robots":200,"seo":202,"sitemap":203,"stem":204,"tags":205,"technologies":210,"year":220,"__hash__":221},"work_en\u002Fwork\u002Fsigrun-multi-agent-rag-platform.md","Sigrun Multi-Agent RAG Platform",{"type":7,"value":8,"toc":185},"minimark",[9,14,18,21,25,28,35,41,44,79,85,90,96,101,107,112,115,119,145,151,156,160,163,167],[10,11,13],"h2",{"id":12},"challenge","Challenge",[15,16,17],"p",{},"Small and mid-size businesses hold valuable operational knowledge scattered across documents, CRM notes, internal processes, chat history, spreadsheets, and the heads of a few key people. Generic chatbot wrappers don't solve that: they lack retrieval quality, domain awareness, cost control, and clear boundaries on what the system is allowed to do on its own.",[15,19,20],{},"Sigrun was built to close that gap — a platform that connects business knowledge to useful, grounded answers and carefully bounded actions, built to run in production rather than in a demo.",[10,22,24],{"id":23},"solution","Solution",[15,26,27],{},"I designed Sigrun as a multi-agent RAG platform for ValkymIA client work: a Python\u002FFastAPI async backend (LangGraph orchestration, PostgreSQL + pgvector) fronted by a chat-first Nuxt app on Cloudflare Workers. The focus is knowledge retrieval, cost-aware LLM orchestration, and bounded automation — not one-off prompts.",[15,29,30],{},[31,32],"img",{"alt":33,"src":34},"System architecture: a Nuxt chat frontend on Cloudflare Workers calling a FastAPI\u002FLangGraph backend, with pgvector retrieval and a budget-aware gateway routing between local Ollama and hosted OpenRouter models.","\u002Fimages\u002Fwork\u002Fsigrun\u002Farchitecture.png",[15,36,37],{},[38,39,40],"em",{},"System architecture — frontend on Cloudflare Workers, FastAPI\u002FLangGraph backend, pgvector retrieval, and budget-aware routing between local and hosted models.",[15,42,43],{},"Key capabilities:",[45,46,47,55,61,67,73],"ul",{},[48,49,50,54],"li",{},[51,52,53],"strong",{},"Graph-aware retrieval",": Ingests Obsidian-based knowledge bases, chunks on document structure, and embeds locally with BGE-M3. Retrieval runs in two stages — vector similarity followed by wikilink graph expansion — so answers pull in linked context that a flat vector search would miss. Responses are grounded with structured citations.",[48,56,57,60],{},[51,58,59],{},"Domain-specialized agents",": Five agent personas (sales, marketing, admin, operations, strategy), each with its own scope, retrieval filters, and plan gating, running over a shared LangGraph workflow. The caller selects the agent; over WhatsApp, users switch with slash commands.",[48,62,63,66],{},[51,64,65],{},"Budget-aware model routing",": Every paid inference passes through an inference gateway that estimates worst-case cost, checks per-tenant and per-workflow budget policies, and routes to a hosted model (OpenRouter), a local model (Ollama), or refuses — with kill switches and admin overrides. Local models handle embeddings and light work; hosted models are reserved for where quality justifies the spend.",[48,68,69,72],{},[51,70,71],{},"Human-in-the-loop actions",": External side effects (e.g. drafting a social post) run through a separate checkpointed graph that drafts, pauses for explicit approval, then executes or rejects. No autonomous actions by default.",[48,74,75,78],{},[51,76,77],{},"Multi-tenant and observable",": Row-level org isolation across the vector store and knowledge base, Prometheus metrics for retrieval quality, latency, token cost, budget state, and knowledge gaps, plus a database audit trail of every answer and action.",[15,80,81],{},[31,82],{"alt":83,"src":84},"Sigrun chat interface returning a grounded answer with knowledge-base source citations.","\u002Fimages\u002Fwork\u002Fsigrun\u002Fchat-citations.png",[15,86,87],{},[38,88,89],{},"Grounded answer with citations — placeholder screenshot.",[15,91,92],{},[31,93],{"alt":94,"src":95},"Two-stage retrieval: vector-similarity results expanded along Obsidian wikilinks to pull in linked context.","\u002Fimages\u002Fwork\u002Fsigrun\u002Fgraph-retrieval.png",[15,97,98],{},[38,99,100],{},"Graph-aware retrieval — Stage 1 vector similarity, then Stage 2 wikilink graph expansion, assembled with per-domain grounding into a cited answer.",[15,102,103],{},[31,104],{"alt":105,"src":106},"Human-in-the-loop approval: Sigrun drafts an action and pauses for explicit approval before executing.","\u002Fimages\u002Fwork\u002Fsigrun\u002Fapproval-loop.png",[15,108,109],{},[38,110,111],{},"Human-in-the-loop approval — placeholder screenshot.",[15,113,114],{},"Integrations are deliberately narrow and honest about their boundaries: WhatsApp (via Twilio) as a read channel, approval-gated social drafting (draft-only by default), and transactional email. General LLM tool-calling is scaffolded for a later phase rather than claimed as done.",[10,116,118],{"id":117},"impact","Impact",[45,120,121,127,133,139],{},[48,122,123,126],{},[51,124,125],{},"Moves AI beyond chat"," by connecting retrieval, domain reasoning, and bounded actions into one workflow layer",[48,128,129,132],{},[51,130,131],{},"Improves knowledge access"," for teams whose operational knowledge lives in fragmented documents and a few people's heads",[48,134,135,138],{},[51,136,137],{},"Keeps AI delivery cost-aware"," through budget-checked routing between local and hosted models, with hard spend boundaries per tenant",[48,140,141,144],{},[51,142,143],{},"Provides a reusable architecture"," for ValkymIA client systems built on RAG, agents, and integrations — multi-tenant from day one",[15,146,147],{},[31,148],{"alt":149,"src":150},"Observability dashboard: token cost, per-tenant budget state, retrieval quality, and knowledge-gap metrics.","\u002Fimages\u002Fwork\u002Fsigrun\u002Fobservability.png",[15,152,153],{},[38,154,155],{},"Cost and retrieval observability — placeholder; optional.",[10,157,159],{"id":158},"why-it-matters","Why It Matters",[15,161,162],{},"Sigrun is the core of my current AI engineering work: turning RAG and agentic patterns into a system that holds up in real business environments. The architecture is deliberately pragmatic — retrieval quality, cost governance, human review, tenant isolation, and observability over impressive-looking demos that can't be trusted in production.",[10,164,166],{"id":165},"links","Links",[45,168,169,178],{},[48,170,171],{},[172,173,177],"a",{"href":174,"rel":175},"https:\u002F\u002Fsigrun.valkymia.mx",[176],"nofollow","Visit Sigrun",[48,179,180],{},[172,181,184],{"href":182,"rel":183},"https:\u002F\u002Fvalkymia.mx",[176],"ValkymIA",{"title":186,"searchDepth":187,"depth":187,"links":188},"",2,[189,190,191,192,193],{"id":12,"depth":187,"text":13},{"id":23,"depth":187,"text":24},{"id":117,"depth":187,"text":118},{"id":158,"depth":187,"text":159},{"id":165,"depth":187,"text":166},"Production RAG platform for Mexican SMBs: graph-aware retrieval over Obsidian knowledge bases, domain-specialized agents, budget-aware LLM routing, and human-in-the-loop actions.","md",true,"\u002Fimages\u002Fwork\u002Fsigrun-multi-agent-rag-platform.png",{},"Graph-aware RAG + HITL agents",null,"\u002Fwork\u002Fsigrun-multi-agent-rag-platform",{"title":5,"description":194},{"loc":201},"work\u002Fsigrun-multi-agent-rag-platform",[206,207,208,209],"AI","RAG","Agentic Workflows","LLM Systems",[211,212,213,214,215,216,217,218,219],"Python","FastAPI","LangGraph","PostgreSQL","pgvector","Ollama","OpenRouter","Nuxt","Cloudflare Workers","2025","YtNcxFIW_ONKs6V0wJ1tM8edYxdTBtUlHn6CfbTVkcA",1784004542625]