How chittaranjanp51/govsys works
GovSys is an on-prem AI governance assistant with a Streamlit dashboard and a LangGraph multi-agent request workflow. Staff sign in, submit requests, and receive responses only after governance gates; requests and blocked attempts are audited. The graph preserves the documented identity, policy, model, data, red-team, monitoring, and compliance capabilities. Some subsystem links reflect README documentation or SOURCE INDEX references; unsampled implementation details and dynamic wiring are not inferred.
Main entry points: graph.py Governed agent graph · monitor.py Monitor · report.py Compliance report · audit.py Tamper-evident audit
Components 28
User experience
- Streamlit dashboard
app/streamlit_app.py - Session and sign-in
app/common.py - Assistant chat
app/app_pages/chat.py - Monitor
app/app_pages/monitor.py - Model registry UI
app/app_pages/models.py - Policy UI
app/app_pages/policies.py - Red-team UI
app/app_pages/redteam.py - Compliance UI
app/app_pages/compliance.py
Governed assistant
- Governed agent graph
agents/graph.py - Order, billing, admin agents
agents/graph.py - Agent database tools
agents/tools.py - LLM client
agents/llm.py
Governance controls
- Human and agent identity
governance/identity.py - Seven-check results
governance/checks.py - Input and output guardrails
governance/guardrails_layer.py - Authorization policy
governance/policy.py - Model approval gate
governance/model_governance.py - Data access and masking
governance/data_governance.py
Assurance and reporting
- Tamper-evident audit
governance/audit.py - Adversarial suite
governance/redteam.py - Compliance report
compliance/report.py
External services and data
- Keycloak IdP
- OPA policy engine
- MLflow registry
- Postgres
- Ollama
- Langfuse tracing
Other components
- Staff user
Connections 36
- Staff user → Streamlit dashboard: uses
README.md - Streamlit dashboard → Session and sign-in: initializes
app/streamlit_app.py - Session and sign-in → Human and agent identity: verifies login
app/common.py - Assistant chat → Governed agent graph: submits request
app/app_pages/chat.py - Governed agent graph → Human and agent identity: authenticates
agents/graph.py - Governed agent graph → Input and output guardrails: checks input/output
agents/graph.py - Governed agent graph → Model approval gate: checks approval
agents/graph.py - Governed agent graph → Order, billing, admin agents: routes and governs
README.md - Order, billing, admin agents → Agent database tools: invokes tools
agents/graph.py - Order, billing, admin agents → LLM client: requests generation
agents/graph.py - Governed agent graph → Authorization policy: authorizes handoffs
agents/graph.py - Governed agent graph → Data access and masking: checks data access
agents/graph.py - Governed agent graph → Tamper-evident audit: records outcome
README.md - Human and agent identity → Keycloak IdP: authenticates optionally
governance/identity.py - Authorization policy → OPA policy engine: requests decisions
governance/policy.py - Model approval gate → MLflow registry: checks registry
governance/model_governance.py - LLM client → Ollama: serves model
README.md - Agent database tools → Data access and masking: uses connections
agents/tools.py - Data access and masking → Postgres: reads catalog and data
governance/data_governance.py - Tamper-evident audit → Postgres: writes audit rows
governance/audit.py - Tamper-evident audit → Langfuse tracing: sends traces optionally
governance/audit.py - Monitor → Tamper-evident audit: reads and verifies
app/app_pages/monitor.py - Monitor → Data access and masking: checks data health
app/app_pages/monitor.py - Monitor → Human and agent identity: checks identity health
app/app_pages/monitor.py - Monitor → Model approval gate: checks registry health
app/app_pages/monitor.py - Monitor → Authorization policy: checks policy health
app/app_pages/monitor.py - Model registry UI → Model approval gate: manages approvals
app/app_pages/models.py - Policy UI → Authorization policy: inspects policy
app/app_pages/policies.py - Red-team UI → Adversarial suite: runs suite
app/app_pages/redteam.py - Adversarial suite → Governed agent graph: exercises pipeline
governance/redteam.py - Adversarial suite → Postgres: probes permissions
governance/redteam.py - Compliance UI → Compliance report: generates report
app/app_pages/compliance.py - Compliance report → Tamper-evident audit: verifies audit evidence
compliance/report.py - Compliance report → Model approval gate: collects registry evidence
compliance/report.py - Compliance report → Data access and masking: collects data evidence
compliance/report.py - Compliance report → Adversarial suite: collects run evidence
compliance/report.py