MCPcopy Index your code
hub / github.com/Miosa-osa/BusinessOS

github.com/Miosa-osa/BusinessOS @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
16,258 symbols 50,577 edges 1,646 files 8,042 documented · 49%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

BusinessOS

Your business, on autopilot.

Give your AI agents a home. BusinessOS is a MIOSA template — a complete, self-hosted optimal system where AI agents don't just assist your business, they run it. Automate your existing company or build a new one from scratch.

License: Apache 2.0 Go SvelteKit TypeScript PRs Welcome

BusinessOS Desktop Environment

BusinessOS desktop environment — draggable windows, dock, terminal with OSA agent, 3D effects. Your business from another dimension.


What is this?

MIOSA builds optimal systems and interfaces that reduce cognitive load — for humans and AI agents alike. MIOSA templates are the infrastructure your agents work inside. Not chat windows. Not prompt chains. Actual systems with data, workflows, integrations, and UI.

BusinessOS is the template for running a business. It gives your agents a home — with projects, clients, documents, team structure, and the full context of your operation — so they can make decisions, take actions, and deliver results without you babysitting every step.

Automate your existing company — plug BusinessOS into your current operation and let agents handle projects, CRM, scheduling, and coordination alongside your team.

Build a new one — start from zero and let AI agents run the entire thing. Content, client work, operations — whatever your business does, BusinessOS is the system it runs on.

Step What happens
01 Clone the template
02 Configure your AI providers and integrations
03 Your agents have a home — projects, clients, docs, context, everything they need to operate

Think of it like this: your agents need more than a prompt. They need an org chart, a CRM, a knowledge base, a project tracker, a calendar — the same tools a human employee needs to do their job. BusinessOS is all of that in one system, designed for agents to use natively.


The Desktop

BusinessOS isn't a web app — it's a desktop environment. Draggable windows, a dock, snap layouts, wallpapers, and a full 3D mode that lets you view your business from another dimension. Every module opens in its own window. Arrange your workspace however you want.

Run it in the browser, or package it as a native desktop app with Electron. One codebase, both targets. The Electron build ships with Electron Forge — npm run make and you've got a .dmg (macOS), .exe (Windows), or .deb (Linux).

The desktop is where your agents live. OSA runs in the terminal. Your CRM, projects, docs, and calendar are all open in windows around it. Everything your agent needs is right there — visible, contextual, and interactive.

  • Window management — drag, resize, snap, minimize, maximize. Multi-window multitasking like a real desktop
  • Dock — quick access to all modules. Pin your favorites
  • 3D Desktop — not an effect, a full spatial desktop. Your modules exist in three-dimensional space. Rotate, zoom, orbit. Built-in hand motion and gesture controls — navigate your business with your hands
  • Native Electron app — package as a real desktop application. macOS, Windows, Linux. Auto-updates, system tray, native notifications
  • Wallpapers and theming — dark glassmorphic UI with customizable backgrounds
  • Terminal — real PTY terminal via WebSocket (xterm.js) with OSA agent built in. Type osa to talk to your agent

BusinessOS 3D Desktop — modules in three-dimensional space

3D Desktop — a full spatial environment. Every module lives in 3D space. Hand gesture controls, orbit navigation, grid view. See your entire business from a dimension no dashboard can show you.


This is a starter — you build your own modules

BusinessOS open source is a foundation, not a finished app. It ships with the hard parts already done — accounts, the Organization → Workspace → Team hierarchy, roles and granular access, the desktop window environment, the local terminal, the Settings module, the email system, and the design system — plus one example module, Knowledge, so you can see the pattern. Everything else, you build for your own business. That's the point: come here, fork it, and make it yours.

What ships in the box

Included What it is
Foundation Email + Google auth, Organization → Workspace → Team hierarchy, roles + granular access, invites, the full Settings module
Knowledge The one built module — a block editor + workspace knowledge store. Your reference for how a module is structured
Desktop The window environment — drag, snap, dock, wallpapers
Terminal A real PTY terminal into your local machine (Local mode)
Optimal Engine hookup Connect your own engine as the shared brain (see below)
Design system The dark, Linear/Resend-grade component standard every module follows

You build these (and anything else)

Projects, Tasks, CRM, Calendar, Agents, Inbox, Tables, Finance, Content — none of these ship in the open-source edition. They're yours to build for your domain.

How to build a module

A module is just a page in the workspace shell wired to a backend endpoint:

  1. Create the route — add frontend/src/routes/(app)/<your-module>/+page.svelte. Copy the Knowledge module as a template; use the design tokens (--dt, --dbg, --dbd) so it matches the standard.
  2. Add it to the sidebar — drop an entry into navGroups in frontend/src/routes/(app)/+layout.svelte.
  3. Wire a backend endpoint — add a handler in desktop/backend-go/internal/handlers/ and register it; or call the Optimal Engine directly from the frontend.
  4. Scope it by role — module data is gated by workspace_roles.permissions, so your module respects who can see what out of the box.
  5. Put its settings in Settings — module configuration goes in the Settings module (a new tab/section), not a separate admin module.

Every module gets full access to the workspace context — the same org, workspace, team, and knowledge data every other module sees. No silos.


Why BusinessOS

Without BusinessOS With BusinessOS
Your agents have no home. They live in chat windows and forget everything between sessions. A full system — projects, CRM, docs, calendar, knowledge base — agents operate inside it natively.
Context is scattered across 8 tools. You spend more time wiring integrations than doing work. One platform. Your AI sees everything — projects, clients, docs, team capacity — no context lost.
You babysit every AI interaction. Nothing runs without you. Agents operate autonomously with Signal Theory routing — noise filtered, work prioritized.
You're building tools for your agents from scratch every time. Pre-built modules your agents can use immediately — CRM, project tracking, scheduling, knowledge retrieval.
Vendor lock-in. Your data on someone else's servers. Self-hosted. Your infrastructure. Your data. Fork it, modify it, own it.

Quick Start

Option 1: One command (recommended)

git clone https://github.com/Miosa-osa/BusinessOS.git
cd BusinessOS
make dev-local

This builds the Go backend, starts the Elixir OptimalEngine, SvelteKit frontend, and Electron desktop app. New installs start with an empty workspace; connect your own data sources or create modules from the app.

Open the Electron window or visit http://localhost:5273. Create an account, and you're in.

Requirements: Node.js 22+, Go 1.24+, pnpm, PostgreSQL 15+ (with pgvector), Redis 7+

Option 2: Docker

docker compose up -d    # Starts PostgreSQL, Redis, OptimalEngine, backend, frontend
open http://localhost:5173

Option 3: Manual

# Backend
cd desktop/backend-go
cp .env.example .env    # Configure your environment
go run ./cmd/server

# Frontend (separate terminal)
cd frontend && pnpm install && pnpm dev

# Electron (separate terminal, optional)
cd desktop && npm install && npm start

Run as native desktop app

Works on macOS, Windows, and Linux.

cd desktop
npm install
npm run make            # Build native app → .dmg / .exe / .deb

First Boot

BusinessOS does not seed mock customer, CRM, project, or knowledge data. After creating an account, add your own records, connect providers, or point OptimalEngine at a workspace directory you control.

Run the preflight before opening the app:

make doctor

See docs/development/DEVELOPER_QUICKSTART.md for the full setup guide.


Connect your Optimal Engine

The Optimal Engine is the shared brain behind a workspace — search, memory, and context that your modules (starting with Knowledge) read from. BusinessOS ships the hookup; you bring your own engine. The connection is per workspace and shared by the whole team.

  1. Run an Optimal Engine. Locally it serves on http://localhost:4200, or point at a hosted one. (See OptimalEngine below.)
  2. Open Settings → Optimal Engine in the app.
  3. Fill in the connection:
  4. Engine URL — e.g. http://localhost:4200 or your hosted URL
  5. API key — the engine's key (stored server-side, shared by the workspace)
  6. Engine workspace — which workspace inside the engine backs this one
  7. Test Connection, then Save. The whole team on that workspace now shares the same brain.

Only workspace owners/admins/managers can change the connection; everyone else just uses it. No engine configured? The Knowledge module still works locally — the engine adds search, memory, and AI context on top.


MIOSA — Optimal Systems for AI Agents

MIOSA builds optimal systems and interfaces that reduce cognitive load — for humans and AI agents alike. Each MIOSA template is a complete Optimal System (OS) — not an operating system, but a purpose-built environment where agents have everything they need to operate autonomously in a specific domain.

Every OS ships with OSA (the Optimal System Agent), Foundation (124-component design system), and Signal Theory (intelligent message routing) out of the box.

Optimal Systems

OS Domain Description
BusinessOS Operations This repo. Projects, CRM, docs, calendar, team, AI chat — the home base for running a business
ContentOS Content & Media AI-powered content creation, publishing pipelines, editorial workflows, multi-channel distribution
AgencyOS Client Services Client management, project delivery, time tracking, invoicing, team utilization for agencies and studios
CustomOS Build Your Own Blank template — OSA + Foundation + Signal Theory pre-wired. Build the optimal system for your domain

More at miosa.ai.

What every OS ships with

  • OSA — The Optimal System Agent. Multi-agent orchestration with Signal Theory for intelligent routing, noise filtering, and cost-optimized model selection
  • Foundation — 124-component design system. Dark glassmorphic UI with design tokens, accessibility, and theming
  • Signal Theory — Every message classified into a 5-tuple before processing. Noise filtered before it hits the LLM. Cheap models for simple tasks, powerful models for complex ones
MIOSA
│
├── Optimal Systems
│   ├── BusinessOS    → ★ This repo — run a business
│   ├── ContentOS     → Create & publish content
│   ├── AgencyOS      → Deliver client work
│   └── CustomOS      → Build your own
│
├── Core
│   ├── OSA           → Optimal System Agent (Elixir/OTP + Rust, 1,108 tests)
│   ├── Foundation    → 124-component design system
│   └── Signal Theory → Message classification & intelligent routing
│
└── miosa.ai

What makes an Optimal System

  • A complete environment where AI agents can operate — not just tools, but the system they live in
  • Ships with OSA embedded for multi-agent orchestration
  • Uses Foundation design system for consistent, accessible UI
  • Follows MIOSA architectural patterns — signal-based routing, clean architecture, multi-tenant ready
  • Self-hosted. Open-source. Your data stays yours

Deploy at scale with MIOSA Platform

Run BusinessOS self-hosted, or deploy many instances at scale on MIOSA Platform. The platform gives you a command center to manage all your Optimal Systems and agents from one place:

  • Multi-OS management — Deploy and monitor multiple BusinessOS, ContentOS, or AgencyOS instances from a single dashboard
  • Agent-agnostic — Manage OSA agents, OpenClaw, NanoClaw, Claude, or any agent that can receive a heartbeat. If it can take instructions, it works here
  • Centralized control — Budgets, governance, audit logs, and cost tracking across all your systems and agents
  • Scale horizontally — One command center, unlimited Optimal Systems. Run one business or a portfolio of them

Self-hosted works out of the box. The platform is for when you need to orchestrate across multiple systems.

OptimalEngine — The Second Brain of Your Business

[OptimalEngine](https://githu

Extension points exported contracts — how you extend this code

AgentTool (Interface)
AgentTool defines the interface for all agent tools [35 implementers]
desktop/backend-go/internal/tools/tools_registry.go
AgentTool (Interface)
(no doc) [35 implementers]
optimal-engine/sdks/typescript/src/adapters/openai-agents.ts
Skill (Interface)
(no doc) [2 implementers]
frontend/src/lib/types/skills.ts
DbResult (Interface)
(no doc)
desktop/src/preload/index.ts
TestUser (Interface)
(no doc)
frontend/tests/e2e/fixtures/testUsers.ts
StatusPayload (Interface)
(no doc)
optimal-engine/desktop/src/lib/api.ts
RequestOptions (Interface)
(no doc)
optimal-engine/apps/mcp/src/client.ts
Workspace (Interface)
(no doc)
optimal-engine/extensions/browser/src/lib/types.ts

Core symbols most depended-on inside this repo

JSON
called by 2071
desktop/backend-go/internal/logging/logger.go
Scan
called by 1876
desktop/backend-go/internal/database/sqlc/models.go
Info
called by 1210
desktop/backend-go/internal/logging/sanitizer.go
QueryRow
called by 1134
desktop/backend-go/internal/database/sqlc/db.go
make
called by 1014
optimal-engine/sdks/typescript/src/adapters/openai-agents.ts
Query
called by 952
desktop/backend-go/internal/database/sqlc/db.go
Run
called by 899
desktop/backend-go/internal/agents/agent.go
Close
called by 807
desktop/backend-go/internal/sorx/engine.go

Shape

Function 6,431
Method 5,678
Struct 2,796
Interface 1,121
Class 135
TypeAlias 83
FuncType 14

Languages

Go74%
TypeScript24%
Python2%
Rust1%

Modules by API surface

desktop/backend-go/internal/database/sqlc/models.go296 symbols
desktop/backend-go/internal/database/sqlc/workspaces.sql.go111 symbols
desktop/backend-go/internal/database/sqlc/microsoft.sql.go98 symbols
desktop/backend-go/internal/database/sqlc/crm.sql.go98 symbols
desktop/backend-go/internal/signal/signal_test.go80 symbols
desktop/backend-go/internal/database/sqlc/osa.sql.go78 symbols
frontend/src/lib/api/integrations/integrations.ts70 symbols
desktop/backend-go/internal/database/sqlc/integrations.sql.go66 symbols
desktop/backend-go/internal/database/sqlc/imports.sql.go66 symbols
desktop/backend-go/internal/handlers/crm_deals_test.go64 symbols
desktop/backend-go/internal/database/sqlc/custom_modules.sql.go62 symbols
desktop/backend-go/internal/database/sqlc/flexible_tables.sql.go61 symbols

Datastores touched

business_osDatabase · 1 repos
businessos_testDatabase · 1 repos
dbDatabase · 1 repos
businessosDatabase · 1 repos
postgresDatabase · 1 repos
dbnameDatabase · 1 repos
(mongodb)Database · 1 repos
businessos_stagingDatabase · 1 repos

For agents

$ claude mcp add BusinessOS \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact