How simpleyyt/ai-manus works
AI Manus is a web-based general-purpose agent that runs tool-using tasks in isolated sandboxes. The primary workflow starts in the chat UI, creates or selects a session, submits a message, and runs a plan-and-execute agent that can use browser, shell, file, search, messaging, and MCP tools; events stream back to the web client. Other major product areas include authentication, skill packages, session/project history, and a cross-session file library. Relationships shown here follow the README workflow and the sampled backend/frontend references; unsampled subsystem details are represented at directory level.
Main entry points: mongo_session_repository.py Session history · agent_service.py Agent service · tools Agent tools · ChatPage.vue Chat and panels
Components 26
Web experience
- Chat and panels
frontend/src/pages/ChatPage.vue - Web API clients
frontend/src/api/chatWs.ts - File preview
frontend/src/components/FilePreviewer.vue
Server API
- HTTP API routes
backend/app/interfaces/api/routes.py - Session endpoints
backend/app/interfaces/api/session_routes.py - WebSocket events
backend/app/interfaces/api/ws_routes.py - Service wiring
backend/app/interfaces/dependencies.py - Authentication
backend/app/interfaces/api/auth_routes.py
Agent runtime
- Agent service
backend/app/application/services/agent_service.py - Session orchestration
backend/app/domain/services/agent_domain_service.py - Task runner
backend/app/domain/services/agent_task_runner.py - Plan-act execution
backend/app/domain/services/flows/plan_act.py - Agent tools
backend/app/domain/services/tools - Skill runtime
backend/app/application/services/skill_runtime_service.py
Tools and sandbox
- Sandbox service
backend/app/infrastructure/external/sandbox/docker_sandbox.py - Sandbox tools API
sandbox/app/api/router.py - Language model
backend/app/infrastructure/external/llm - Web search
backend/app/infrastructure/external/search
Identity and state
- Auth service
backend/app/application/services/auth_service.py - Session history
backend/app/infrastructure/repositories/mongo_session_repository.py - Projects, skills, library
backend/app/application/services
Other components
- User
- MongoDB
- Redis
- Browser service
- Search providers
Connections 26
- User → Chat and panels: starts task
README.md - Chat and panels → Web API clients: submits messages
README.md - Web API clients → Session endpoints: creates session
README.md - Session endpoints → Agent service: delegates requests
backend/app/interfaces/api/session_routes.py - Agent service → Session orchestration: orchestrates task
backend/app/domain/services/agent_domain_service.py - Session orchestration → Task runner: runs task
backend/app/domain/services/agent_domain_service.py - Task runner → Plan-act execution: executes plan
README.md - Plan-act execution → Language model: requests decisions
README.md - Plan-act execution → Agent tools: invokes tools
README.md - Agent tools → Sandbox service: uses sandbox
README.md - Sandbox service → Sandbox tools API: controls tools
README.md - Agent tools → Web search: runs searches
README.md - Web search → Search providers: queries provider
- Agent tools → Browser service: uses browser
README.md - Agent service → Session history: persists sessions
- Session history → MongoDB: stores history
README.md - WebSocket events → Web API clients: streams events
README.md - WebSocket events → Session history: catches up history
backend/app/interfaces/api/ws_routes.py - User → Authentication: authenticates
README.md - Authentication → Auth service: resolves credentials
backend/app/interfaces/api/auth_routes.py - Auth service → Session history: reads users
backend/app/application/services/auth_service.py - Auth service → Redis: stores auth sessions
backend/app/application/services/auth_service.py - Chat and panels → File preview: previews artifacts
README.md - Agent service → Skill runtime: loads skills
- User → Projects, skills, library: manages resources
README.md - Projects, skills, library → Session history: organizes sessions