How soumanpaul/sovereignforgeai works
SovereignForgeAI is an on-premise agentic workbench for turning industrial documents, code repositories, and vendor quotations into reviewable artifacts. Users submit goals and files through the workbench; the API records and queues tasks, whose worker classifies the workflow, routes to a capable local model, and executes constrained actions. The three main branches are evidence-grounded inspection review, sandbox-checked code repair, and policy-aware procurement comparison. Knowledge indexing/retrieval, artifact validation, persisted execution traces, and security evidence support that flow. Some subsystem links reflect README-level capabilities because their implementations were not sampled.
Main entry points: tasks Agent workflows · tasks.py Task API · knowledge_ingestion.py Knowledge ingestion · service.py Task records
Components 23
User experience
- Next.js workbench
frontend/app - API client
frontend/lib/api.ts - Local authentication
frontend/components/auth/auth-screen.tsx - Trace and security views
frontend/components/control-plane/trace-security.tsx
API and tasks
- FastAPI application
backend/app/main.py - Task API
backend/app/api/routes/tasks.py - Task records
backend/app/tasks/service.py - Task runtime
backend/app/tasks/runtime.py
Knowledge and retrieval
- Document extraction
backend/app/services/document_extraction.py - Knowledge ingestion
backend/app/services/knowledge_ingestion.py - Hybrid retrieval
backend/app/services/hybrid_retrieval.py
Agent execution
- Agent workflows
backend/app/tasks - Task and model routing
backend/app/routing/router.py - Local model provider
backend/app/model_providers/ollama.py - Tool registry and policies
backend/app/tools/registry.py - Sandbox client
backend/app/services/sandbox_client.py - Isolated code runner
sandbox-runner/app.py - Artifact generation
backend/app/artifacts
State and evidence
- Vector index
backend/app/services/qdrant_store.py - Application database
backend/app/db/models.py - Uploaded files
backend/app/services/file_storage.py - Security and audit API
backend/app/api/routes/security.py
Other components
- Workbench user
Connections 29
- Workbench user → Next.js workbench: submits work
- Next.js workbench → Local authentication: authenticates
- Next.js workbench → API client: requests data
- API client → FastAPI application: calls API
- FastAPI application → Task API: dispatches routes
- Task API → Task records: creates and reads
- Task API → Task runtime: notifies worker
- Task runtime → Task records: loads task state
- Task runtime → Agent workflows: executes workflow
- Agent workflows → Task and model routing: classifies and routes
- Task and model routing → Local model provider: checks model health
- Agent workflows → Local model provider: requests inference
- Agent workflows → Hybrid retrieval: retrieves evidence
- Agent workflows → Document extraction: extracts input
- Agent workflows → Tool registry and policies: dispatches actions
- Tool registry and policies → Sandbox client: requests execution
- Sandbox client → Isolated code runner: runs isolated code
- Agent workflows → Artifact generation: produces deliverables
- Agent workflows → Task records: records run results
- Task API → Uploaded files: serves uploads
- Knowledge ingestion → Document extraction: extracts documents
- Knowledge ingestion → Local model provider: requests embeddings
- Knowledge ingestion → Vector index: writes vectors
- Hybrid retrieval → Vector index: searches vectors
- Task records → Application database: persists task state
- Knowledge ingestion → Application database: persists index records
- Task API → Application database: reads trace and artifacts
- FastAPI application → Security and audit API: mounts security routes
- Trace and security views → API client: loads trace views