OpenCorpo: Self-editing, local-first application powered by an AI operator.
Quick Start • Features • Use Cases • Installation • Architecture • Security • Roadmap
OpenCorpo is an AI-powered application you run locally.
It combines agent chat, job automation, approvals, auditing, and self-editing UI/workflow config in one desktop app.
If you are searching for:
- local-first AI automation platform
- AI workflow engine for desktop
- self-hosted AI operations tool
- AI agent with approvals and audit logs
OpenCorpo is built for exactly that direction.
OpenCorpo is a desktop-first, local AI application for all workflows.
It combines:
- an Electron desktop app for chat, approvals, audits, and operations
- a local Bun daemon for tools, jobs, policies, and agent runtime
- a declarative control plane the AI can edit safely
The design goal is simple: let AI act without making your system dangerous.
- Local-first desktop runtime (Electron + Bun daemon)
- AI chat + operations control from one app
- Scheduled and manual jobs with run history
- Control-plane driven product surface (
config/**/*.json) - Self-edit proposals with validation and approval flow
- Built-in audit logs for sensitive actions
- Policy/risk gates for tool execution
- Tool/plugin model for extensibility
- UI builder blocks (
markdown,stats,note,job_table,react_widget,web_embed,terminal_widget,html_embed) - Multi-platform packaging targets (Windows, macOS, Linux)
OpenCorpo is not just a chatbot. It can edit and evolve its own product surface through a validated control plane.
Out of the box, the AI can:
- add/edit sidebar routes and pages in
ui/desktop.json - compose new pages with markdown, notes, stats, and job-driven tables
- embed live web experiences with
web_embed(iframe-backed blocks) - render fully custom, AI-authored pages with
html_embed(raw HTML blocks) - add npm-powered
react_widgetcomponents to pages - spin up
terminal_widgetblocks for interactive command output - propose config/code changes with previews, approvals, and audit trails
Most AI products stop at chat. OpenCorpo is built for execution:
- plan and run work
- schedule recurring jobs
- reconfigure workflows through validated JSON
- keep every important action auditable
- Internal operations copilots for founder teams
- Automated trend, market, or competitor monitoring
- Agent-driven dashboards backed by recurring jobs
- Approval-gated workflow automation for sensitive tasks
- Local development sandbox for autonomous business tooling
- Queue and run jobs manually or on schedule
- Observe run states (
queued,running,completed,failed,waiting_approval) - Render job outputs directly into UI blocks
- Policy checks before tool execution
- High-risk flows can require human approval
- Capability-scoped tool access instead of unrestricted execution
- Propose and apply schema-validated config changes
- Update pages, tools, jobs, workflows, and policy with diffs
- Keep edits auditable and reversible through version control
- Onboarding + provider setup
- Chat, Jobs, Settings, and Audit views
- Built-in daemon supervision and health checks
OpenCorpo is inspired by the direction and momentum of OpenClaw, especially around practical local-first agent workflows and strong docs ergonomics.
If you like this project, you should absolutely check OpenClaw out too.
- Node.js 18+ (Node 20/22 recommended)
- Bun 1.x on your PATH
- npm (ships with Node)
npm installnpm run dev:desktopThis starts the desktop app; OpenCorpo will boot/supervise the daemon for you.
bun run dev:daemongit clone https://github.com/BagelHole/OpenCorpo.git
cd OpenCorpo
npm install
npm run dev:desktopnpm run build:desktopnpm run pack:desktopnpm run dist:desktopPackaged desktop builds can bundle Bun via apps/desktop/scripts/prepare-bun-runtime.mjs when Bun is available on the build machine.
Release artifacts are written to dist/desktop/.
Platform-specific commands:
npm run dist:desktop:winnpm run dist:desktop:macnpm run dist:desktop:linuxCross-platform note: build each target on its native OS (Windows for.exe, macOS for.dmg, Linux for.AppImage/.deb) or use CI matrix builds.
Current desktop version: 0.1.1
- Build artifacts locally:
npm run dist:desktop- Upload files from
dist/desktop/to a GitHub Release (recommended assets:.exe,.dmg,.AppImage,.deb,.zip). - To auto-build and auto-upload from CI, push a release tag:
git tag v0.1.1
git push origin v0.1.1The workflow at .github/workflows/release-desktop.yml builds macOS, Windows, and Linux packages and publishes them to that GitHub release.
| Command | Purpose |
|---|---|
npm run dev:desktop |
Run desktop app in development mode |
npm run dev:renderer |
Run React renderer only |
npm run dev:electron |
Run Electron shell only |
npm run dev:daemon |
Run daemon directly via Bun |
npm run test:smoke |
Run daemon + desktop smoke checks |
flowchart TB
UI[Desktop UI\nElectron + React] -->|localhost HTTP + SSE + token| D[Local Daemon\nBun + Elysia]
D --> CP[Control Plane JSON]
D --> DB[(SQLite)]
D --> TOOLS[Tools + Jobs + Policies]
D --> AUDIT[Immutable Audit Log]
apps/desktop: desktop shell + renderer UIapps/daemon: local API, agent runtime, orchestrationconfig/: declarative control plane (policy/tools/jobs/ui)data/: runtime mutable config and stateuserland/: workspace for explicit Tier-B code changes
OpenCorpo defaults to declarative mutation:
- AI edits JSON control-plane config first
- every change is schema-validated
- diffs can be previewed before apply
- policy checks and risk gating happen before execution
- audit records are append-only
Tier model:
- Tier A: config edits (
config/**/*.json) (default) - Tier B: code patches (rare, explicit, user-approved)
The agent does not get implicit DB or network access. It must use registered tools.
Each tool/job requires explicit capabilities that are scoped and revocable.
Risky actions can be blocked or require approval.
Important events include actor, action, policy decision, timestamps, and correlation metadata.
OpenCorpo supports pluggable providers through the AI SDK setup.
Current UX includes:
- API-key based provider setup
- Codex ChatGPT subscription OAuth path in Settings (
Codex (ChatGPT))
OpenCorpo is in very early beta.
Expect:
- breaking changes
- evolving schemas/APIs
- incomplete features
- rapidly improving docs
- production-hardening for packaged desktop runtime
- stronger long-running planner/worker behavior
- richer workspace patch previews in the desktop UI
- release channel automation (stable/beta/dev)
- version control
- centralized admin server that ingests audit logs from instances
- more models + providers
- more custom integrations/plugins
- background daemon running 24/7 - allow agent to work all day
Contributions are welcome.
- open Issues for bugs and proposals
- submit focused PRs
- prefer small, reviewable changes
- prioritize safety, auditability, and local-first behavior
MIT