How tinyhumansai/opencompany works
OpenCompany is a desktop/hosted operating runtime for a one-person business: an operator selects or configures a company, then durable company services coordinate agent desks and workflows into recorded work. The README documents hive episodes, cross-desk referrals, approvals, and journal-backed history; the source index supports the runtime, configuration, persistence, and console boundaries. Several product subsystems are visible only in the tree or README, so their internal call edges are omitted rather than inferred.
Main entry points: runtime.rs Company runtime · routes.rs HTTP server · client.ts Console API client · mod.rs Company definition
Components 25
Company setup
- Runtime configuration
crates/opencompany-core/src/app/config.rs - Company definition
crates/opencompany-core/src/company/mod.rs - Roster setup
crates/opencompany-core/src/company/setup.rs
Agent runtime
- Company runtime
crates/opencompany-core/src/company/runtime.rs - Workflow execution
crates/opencompany-core/src/workflows/runner.rs - Run journal
crates/opencompany-core/src/runtime/journal.rs - Agent cognition
crates/opencompany-core/src/brain/hosted.rs - Desk coordination
crates/opencompany-core/src/hive/routing.rs - Local agent protocol
crates/opencompany-app/src/acp/client.rs
Business capabilities
- Inference routing
crates/opencompany-core/src/company/inference.rs - Tool integrations
crates/opencompany-core/src/company/mcp.rs - Business ledgers
crates/opencompany-core/src/ledger/engine.rs - Company search
crates/opencompany-core/src/company/search/store.rs - Feedback triage
crates/opencompany-core/src/feedback/service.rs
Host and persistence
- HTTP server
crates/opencompany-core/src/server/routes.rs - User authentication
crates/opencompany-core/src/server/users/routes.rs - Memory engine API
crates/opencompany-core/src/server/ops/memory_engine.rs - Durable storage
crates/opencompany-core/src/store/mod.rs
Operator surfaces
- Desktop app
crates/opencompany-app/src/main.rs - Web console
frontend/src/App.tsx - Console API client
frontend/src/api/client.ts - Setup flow
frontend/src/setup/SetupController.tsx
Other components
- Operator
- OpenHuman runtime
- Inference service
Connections 25
- Operator → Desktop app: launches
README.md - Operator → Web console: operates
README.md - Web console → Console API client: requests
- Setup flow → Console API client: submits setup
- Console API client → HTTP server: calls API
- HTTP server → User authentication: routes auth
- HTTP server → Memory engine API: routes engine
crates/opencompany-core/src/server/ops/memory_engine.rs - Runtime configuration → Company definition: configures
crates/opencompany-core/src/app/config.rs - Company definition → Roster setup: defines roster
crates/opencompany-core/src/company/mod.rs - Roster setup → Company runtime: starts company
- Company runtime → Agent cognition: runs agents
- Company runtime → Desk coordination: coordinates desks
README.md - Company runtime → Workflow execution: runs workflows
- Company runtime → Run journal: records rounds
README.md - Company runtime → Durable storage: uses ports
crates/opencompany-core/src/store/mod.rs - Agent cognition → OpenHuman runtime: hosted by
README.md - Desk coordination → Inference service: routes decisions
README.md - Company runtime → Local agent protocol: local agent link
- Company runtime → Inference routing: resolves models
- Company runtime → Tool integrations: dispatches tools
- Company runtime → Business ledgers: updates records
- Company runtime → Company search: queries knowledge
- Company runtime → Feedback triage: triages feedback
- Memory engine API → Company runtime: rebuilds companies
crates/opencompany-core/src/server/ops/memory_engine.rs - Durable storage → Run journal: persists events