How zju-real/hugagentos works
HugAgentOS is a self-hosted durable agent harness: users submit work through web or messaging interfaces, the server continues it in the background, and users receive results or approval requests. The map follows that workflow through the API, agent runtime, sandbox, and persistent state, while retaining documented capabilities for personal agents, memory, knowledge, integrations, and desktop/hybrid use. Relationships involving unsampled subsystems are included only where the README documents them; source-level links are limited to indexed or excerpted evidence.
Main entry points: runner.py Agent runtime · useAppController.ts Web application · pipeline.py Personal agent · app.py Backend API
Components 20
User experience
- Web application
src/frontend/src/hooks/useAppController.ts - Frontend API client
src/frontend/src/api.ts - Chat browser storage
src/frontend/src/storage.ts - Messaging channels
src/backend/integrations/channels/manager.py - Desktop and hybrid
desktop/src-tauri/src/hybrid.rs
Agent execution
- Backend API
src/backend/api/app.py - Agent runtime
src/backend/core/agent_runtime/runner.py - Background jobs
src/backend/api/routes/v1/jobs.py - Persistent sandbox
docker/opensandbox-server/opensandbox_mount_worker.py - Human approvals
src/backend/api/routes/v1/tool_approval.py
Agent capabilities
- Personal agent
src/backend/personal_agent/memory/dreaming/pipeline.py - Memory pipeline
src/backend/core/memory/pipeline.py - Knowledge wiki
src/backend/features/knowledge/wiki/pipeline.py - Skills and tools
src/backend/core/capabilities/skills/management.py - Approved evolution
src/backend/core/evolution/generators/skill_candidate_engine.py
Platform and state
- Application settings
src/backend/core/config/settings.py - Application database
src/backend/core/db/engine.py - Evolution records
src/backend/core/db/models/evolution.py - Structured logging
src/backend/core/infra/logging.py
Other components
- User
Connections 21
- User → Web application: submits task
README.md - Web application → Frontend API client: calls API
src/frontend/src/hooks/useAppController.ts - Frontend API client → Backend API: sends requests
src/frontend/src/api.ts - User → Messaging channels: hands off task
README.md - Messaging channels → Personal agent: routes messages
README.md - Backend API → Background jobs: starts background work
README.md - Background jobs → Agent runtime: runs task
README.md - Agent runtime → Persistent sandbox: works in sandbox
README.md - Agent runtime → Human approvals: requests approval
README.md - Human approvals → User: awaits decision
README.md - Agent runtime → Memory pipeline: uses memory
README.md - Personal agent → Persistent sandbox: uses permanent computer
README.md - Personal agent → Memory pipeline: organizes memory
README.md - Memory pipeline → Knowledge wiki: builds memory wiki
README.md - Agent runtime → Skills and tools: uses skills and tools
README.md - Agent runtime → Approved evolution: supports self-evolution
README.md - User → Desktop and hybrid: connects local device
README.md - Desktop and hybrid → Backend API: hybrid operation
README.md - Web application → Chat browser storage: persists chat state
src/frontend/src/hooks/useAppController.ts - Application settings → Application database: configures database
src/backend/core/db/engine.py - Application database → Evolution records: loads model metadata
src/backend/core/db/engine.py