How mivaille777/aitrans works
AITrans is a local-first desktop research and knowledge workspace. Users bring in documents or browser selections, read and capture passages, then use chat or Agent workflows to synthesize evidence and reuse results in Research and Knowledge. The desktop UI calls a FastAPI backend; its Agent runtime coordinates bounded specialist tasks, while RAG supplies grounded retrieval and a dedicated debugging surface. The README documents the broader product branches; sampled source confirms selected API, retrieval, and persistence responsibilities, but does not expose every runtime call path.
Main entry points: main.py FastAPI routes · App.tsx Desktop workspaces · ReadingWorkspace.tsx Reading workspace · runtime.py Agent runtime
Components 24
Desktop experience
- Desktop workspaces
apps/desktop/src/App.tsx - Chat companion
apps/desktop/src/features/companion/CompanionWorkspaceV2.tsx - Desktop integration
apps/desktop/src-tauri/src/main.rs - FastAPI routes
backend/main.py
Reading and language
- Browser selection
browser_extension/aitrans_selection_bridge/service_worker.js - Selection capture
app/selection/manager.py - Reading workspace
apps/desktop/src/features/reading/ReadingWorkspace.tsx - Translation
backend/api/translation.py
Agent and research
- Agent workspace
apps/desktop/src/features/agent/AgentWorkspace.tsx - Agent runtime
backend/agent_core/runtime.py - Research orchestration
backend/services/research_orchestration_service.py - Specialist workflows
backend/agent_graph
Knowledge and evidence
- Research evidence
app/research/evidence_ledger.py - Knowledge workspace
apps/desktop/src/features/knowledge/KnowledgeRoute.tsx - Knowledge services
backend/knowledge/service.py
RAG and retrieval
- RAG Debug Studio
apps/desktop/src/features/settings/RagDebugStudioTrace.tsx - RAG debug API
backend/api/rag_debug.py - RAG diagnostics
backend/services/rag_debug_service.py - Retrieval pipeline
backend/rag/retrieval_service.py - Vector store
backend/rag/stores/base.py - Debug profiles store
backend/services/rag_debug_store_service.py
Other components
- User
- Local runtime data
app/infrastructure/paths.py - Model provider
Connections 30
- User → Desktop workspaces: opens workspaces
- Desktop workspaces → FastAPI routes: uses typed APIs
- Desktop workspaces → Agent workspace: presents Agent
apps/desktop/src/App.tsx - Desktop workspaces → Reading workspace: presents reading
apps/desktop/src/App.tsx - Desktop workspaces → Knowledge workspace: presents knowledge
apps/desktop/src/App.tsx - Desktop workspaces → Chat companion: presents chat
apps/desktop/src/App.tsx - User → Browser selection: selects passage
- Browser selection → Selection capture: sends context
- Selection capture → Reading workspace: supplies selection
- Desktop integration → Selection capture: supports capture
- Reading workspace → FastAPI routes: requests reading
- Reading workspace → Translation: requests translation
- FastAPI routes → Agent runtime: routes Agent work
- Agent workspace → FastAPI routes: requests Agent runs
- Chat companion → FastAPI routes: requests chat
- Agent runtime → Research orchestration: coordinates research
- Research orchestration → Specialist workflows: dispatches tasks
- Agent runtime → Model provider: uses language models
- Research orchestration → Research evidence: organizes evidence
- Research evidence → Knowledge workspace: supports reuse
- Knowledge workspace → FastAPI routes: requests knowledge
- FastAPI routes → Knowledge services: routes knowledge
- RAG Debug Studio → RAG debug API: requests diagnostics
- RAG debug API → RAG diagnostics: delegates runs
backend/api/rag_debug.py - RAG diagnostics → Retrieval pipeline: runs retrieval
backend/services/rag_debug_service.py - Retrieval pipeline → Vector store: searches vectors
backend/rag/retrieval_service.py - RAG debug API → Debug profiles store: loads profiles
backend/api/rag_debug.py - RAG diagnostics → Debug profiles store: persists debug data
backend/services/rag_debug_service.py - FastAPI routes → Local runtime data: uses local state
- Knowledge services → Local runtime data: persists knowledge