How arc53/docsgpt works
DocsGPT is a self-hosted, document-grounded agent platform. A user submits a question through the web app or an integration; the API runs an agent, retrieves knowledge, invokes models and tools, applies guardrails, and returns a cited answer. Separate capabilities cover knowledge ingestion and syncing, visual workflows, integrations, and team administration. The README documents the high-level API/worker/data flow; source-index references support several internal links. Other links reflect documented capabilities, not inspection of unsampled implementations.
Main entry points: app.py API routes · agentic_agent.py Agent execution · worker.py Background worker · embedding_pipeline.py Document ingestion
Components 23
User experience
- Web app
frontend/src/App.tsx - Chat widget
extensions/react-widget/src/App.tsx - API routes
docsgpt/app.py - Answer endpoint
docsgpt/api/answer/routes/answer.py - OpenAI API
docsgpt/api/v1/routes.py - MCP server
docsgpt/mcp_server.py
Knowledge pipeline
- Search service
docsgpt/services/search_service.py - Retrieval strategies
docsgpt/retriever/dispatcher.py - Document ingestion
docsgpt/parser/embedding_pipeline.py - Knowledge connectors
docsgpt/connectors/service.py - Background worker
docsgpt/worker.py
Agent runtime
- Agent execution
docsgpt/agents/agentic_agent.py - Workflow engine
docsgpt/agents/workflows/workflow_engine.py - Guardrails
docsgpt/guardrails/engine.py - Agent tools
docsgpt/agents/default_tools.py - Model providers
docsgpt/llm/llm_creator.py
Platform services
- Postgres data
docsgpt/storage/db/session.py - Vector stores
docsgpt/vectorstore/vector_creator.py - File storage
docsgpt/storage/storage_creator.py
Administration
- Identity and access
docsgpt/api/user/resource_access.py - Teams and quotas
docsgpt/api/admin/quotas.py - Schedules and webhooks
docsgpt/api/user/schedules/routes.py
Other components
- User or client
Connections 32
- User or client → Web app: uses
README.md - User or client → Chat widget: uses
README.md - User or client → API routes: requests
README.md - User or client → MCP server: queries
README.md - Web app → API routes: calls
README.md - Chat widget → API routes: calls
README.md - API routes → Answer endpoint: routes
- API routes → OpenAI API: routes
docsgpt/app.py - Answer endpoint → Agent execution: runs
- OpenAI API → Agent execution: runs
docsgpt/api/v1/routes.py - MCP server → Search service: searches
- Agent execution → Search service: retrieves
- Search service → Retrieval strategies: dispatches
docsgpt/services/search_service.py - Retrieval strategies → Vector stores: queries
- Agent execution → Model providers: invokes
- Agent execution → Agent tools: executes
- Agent execution → Guardrails: checks
- Background worker → Document ingestion: runs
- Knowledge connectors → Document ingestion: syncs content
- Document ingestion → Vector stores: indexes
docsgpt/parser/embedding_pipeline.py - Document ingestion → Postgres data: records progress
docsgpt/parser/embedding_pipeline.py - Background worker → Postgres data: uses
README.md - Background worker → Vector stores: uses
README.md - Background worker → File storage: uses
README.md - API routes → Postgres data: uses
README.md - API routes → Vector stores: uses
README.md - API routes → File storage: uses
README.md - Workflow engine → Agent execution: runs nodes
docsgpt/agents/workflows/workflow_engine.py - Workflow engine → Agent tools: uses
- API routes → Identity and access: checks access
- API routes → Teams and quotas: administers
- API routes → Schedules and webhooks: manages