How richard2606-hub/guildhouse works
GuildHouse is a privacy-focused AI clerk platform: users select a YAML-defined clerk, submit a request through the web console, and receive a response with confidence/escalation and audit metadata. The session manager owns the request lifecycle, including safety checks, tools, retrieval, inference, and final rendering; the web app also exposes pack management and pipeline inspection. The graph follows README-documented stages and sampled call sites; unsampled frontend API wiring and some internal stage details are represented only where documentation supports them.
Main entry points: session.py Session Pipeline · main.py FastAPI API · App.jsx Console App · inference.py Local Draft Engine
Components 19
Web Console
- Console App
frontend/src/App.jsx - Live Console
frontend/src/views/Console.jsx - Pack Catalog
frontend/src/views/Catalog.jsx - Pack Studio
frontend/src/views/PackStudio.jsx - Pipeline Inspector
frontend/src/views/Inspector.jsx
API And Packs
- FastAPI API
backend/main.py
Clerk Runtime
- Pack Loader
backend/engine/loader.py - YAML Packs
backend/packs - Session Pipeline
backend/engine/session.py - Safety Rules
backend/engine/rules.py - Pack Tools
backend/engine/tools.py - Knowledge Retrieval
backend/engine/retrieval.py - Persona Rendering
backend/engine/persona.py
Inference And Audit
- Local Draft Engine
backend/engine/inference.py - Escalation Gateway
backend/engine/gateway.py - Audit Ledger
backend/engine/ledger.py - Fireworks AI
- Google Gemini
Other components
- Clerk User
Connections 26
- Clerk User → Live Console: submits request
- Console App → Live Console: selects view
- Console App → Pack Catalog: selects view
- Console App → Pack Studio: selects view
- Console App → Pipeline Inspector: selects view
- Live Console → FastAPI API: sends chat
- Pack Catalog → FastAPI API: manages packs
- Pack Studio → FastAPI API: edits packs
- Pipeline Inspector → FastAPI API: reads trace
- FastAPI API → Session Pipeline: processes request
- FastAPI API → Pack Loader: serves pack data
- FastAPI API → Audit Ledger: reads ledger
- Pack Loader → YAML Packs: loads manifests
- Session Pipeline → Pack Loader: gets clerk pack
- Session Pipeline → Safety Rules: checks input
- Session Pipeline → Pack Tools: detects tool intent
- Session Pipeline → Knowledge Retrieval: retrieves context
- Session Pipeline → Local Draft Engine: generates draft
- Session Pipeline → Escalation Gateway: escalates draft
- Session Pipeline → Safety Rules: validates answer
- Session Pipeline → Persona Rendering: renders response
- Session Pipeline → Audit Ledger: logs events
- Local Draft Engine → Fireworks AI: requests inference
- Local Draft Engine → Google Gemini: requests inference
- Escalation Gateway → Fireworks AI: requests escalation
- Escalation Gateway → Google Gemini: requests escalation