How aegntic/don-bot works
Nod is a local personal AI agent that handles work across connected apps and real websites, using a user-selected model and requesting approval when an action is not covered by the user’s rules. The principal flow is a user request entering the chat/server, becoming a thread turn, and being executed by the agent runtime through app integrations or its computer/browser; results and approval requests return through the conversation. The graph also preserves the README’s memory, scheduled/proactive work, vault, and usage capabilities. Some subsystem paths and relationships come from the SOURCE INDEX or README rather than sampled implementation excerpts.
Main entry points: index.ts Agent runtime · thread.ts Threads and turns · app.ts Chat API · object-storage.ts Private object storage
Components 28
Conversation and control
- Chat API
src/server/app.ts - Threads and turns
src/server/thread.ts - Tasks and schedules
src/server/tasks.ts - Shared contracts
src/shared/contracts.ts - Action presentation
src/shared/presentation.ts
Agent execution
- Agent runtime
src/runtime/index.ts - Agent port
src/ports/agent.ts - Model providers
src/shared/models.ts - Proactivity
src/ports/proactivity.ts
Apps and computer
- Computer port
src/ports/computer.ts - Browser providers
src/providers/container-browser/client.ts - App integrations
src/ports/integrations.ts - Connected services
Local state and trust
- Database
src/server/db.ts - Transactions
src/server/transaction.ts - Private object storage
src/server/object-storage.ts - Object storage port
src/ports/object-storage.ts - File constraints
src/shared/files.ts - Trust review
src/server/trust-review.ts - Vault credentials
src/web/pages/tasks.tsx - Personal memory
src/ports/memory-recall.ts - Usage analytics
src/server/analytics.ts
User experience
- Web interface
src/web/app.tsx - App connections UI
src/web/pages/apps.tsx - Account manager
src/web/components/app-account-manager.tsx - Desktop runtime
desktop/main/main.mjs - Local engine
desktop/main/engine.mjs
Other components
- User
Connections 30
- User → Web interface: submits request
README.md - Web interface → Chat API: sends chat
- Chat API → Threads and turns: manages turns
src/server/app.ts - Threads and turns → Agent runtime: runs agent
- Tasks and schedules → Threads and turns: starts turns
src/server/tasks.ts - Threads and turns → Database: persists conversation
src/server/thread.ts - Threads and turns → Transactions: uses transactions
src/server/thread.ts - Agent runtime → Agent port: implements agent
src/runtime/index.ts - Agent runtime → Model providers: uses selected model
README.md - Agent runtime → Computer port: uses computer
src/runtime/index.ts - Computer port → Browser providers: implemented by
src/providers/container-browser/client.ts - Agent runtime → App integrations: uses app tools
README.md - App integrations → Connected services: acts in services
README.md - User → App connections UI: connects apps
README.md - App connections UI → Account manager: manages accounts
src/web/pages/apps.tsx - App connections UI → App integrations: configures connections
- Private object storage → Transactions: uses transactions
src/server/object-storage.ts - Private object storage → Object storage port: implements store
src/server/object-storage.ts - Private object storage → File constraints: validates limits
src/server/object-storage.ts - Agent runtime → Trust review: checks action rules
README.md - Trust review → User: requests approval
README.md - Agent runtime → Vault credentials: enters secrets privately
README.md - Agent runtime → Personal memory: recalls facts
README.md - Agent runtime → Proactivity: supports proactive work
README.md - Tasks and schedules → Proactivity: schedules checks
- Chat API → Usage analytics: records usage
src/server/analytics.ts - Desktop runtime → Local engine: starts engine
desktop/main/engine.mjs - Local engine → Chat API: loads server
desktop/main/engine.mjs - Threads and turns → Action presentation: formats results
src/server/thread.ts - Action presentation → Web interface: renders results
README.md