Skip to content

Repository files navigation

Cohort — One idea. A whole cohort.



License: MIT Rust Platform Status

A local-first, multi-agent AI collaboration platform in Rust — you're the boss.

Cohort is built around a "chat app + office" metaphor: you (the boss) hire, direct, and monitor a team of AI employees, each driven by a different underlying tool.

The platform is a thin core. It only does process/session orchestration, message routing, state aggregation, archival, and metering — it never implements agent intelligence itself. That is delegated to each employee's underlying form: an in-process api agent loop today, with claude_code, codex, and opencode adapters layered on top.

Status

Pre-release and macOS-first. The current milestone ships a single-user path: chat → monitor → basic gate → archive → usage. External CLI employees (claude_code, codex) run through the adapter boundary; an in-process api loop is built in.

This release prevents accidental model actions on macOS. It does not claim protection against actively malicious CLI agents, dependencies, or build scripts — that residual risk stays visible in the UI.

Design principles

  • Daemon / client splitcohort-core is a headless daemon; the GPUI app is just one client. They talk over a Unix domain socket with NDJSON-framed JSON-RPC 2.0.
  • Chat ⊥ Monitor — the chat view never shows tool calls or streaming tokens; tool streams live only in the monitor view.
  • Local-first — raw sessions stay in each tool's own directory; Cohort only indexes and symlinks, never copies or rewrites.
  • Fail-closed gate & sandbox — when the sandbox is unavailable, shell execution is disabled rather than run unsandboxed; the permission gate denies on any malformed or unreachable check.

Workspace

Crate Responsibility
cohort-proto Shared wire types: JSON-RPC frames, error codes, domain types
cohort-data SQLite store, data-dir layout, archive index
cohort-gate Five-layer permission gate rule engine
cohort-agent The api employee agent loop, providers, tools, sandbox
cohort-adapters The EmployeeAdapter boundary + api/claude_code adapters
cohort-gate-bridge stdio MCP permission bridge for external CLIs
cohort-core The daemon binary that assembles everything behind the socket
cohort-ui GPUI desktop client (depends only on cohort-proto)

Build & run

cargo build --workspace
cargo test --workspace

cargo run -p cohort-core    # headless daemon
cargo run -p cohort-ui      # desktop client (auto-spawns the daemon if absent)

Toolchain is pinned in rust-toolchain.toml (Rust 1.94.1, edition 2024). unsafe_code is forbidden workspace-wide.

LLM config comes from the environment or a .env file (LLM_API_KEY, LLM_BASE_URL, LLM_MODEL, with OPENAI_* fallbacks). Copy .env.example to .env to get started; defaults target OpenAI, and DeepSeek/Ollama/Claude are drop-in via LLM_BASE_URL.

Cohort stores its data under ~/Library/Application Support/Cohort/.

Documentation

The design specs (0012, in Chinese) live under specs/ and are the authoritative description of scope and architecture; specs/12-第一版实施清单.md tracks what is actually built versus specified. docs/RUST_CODING_GUIDELINES.md covers Rust style.

License

Cohort is released under the MIT License.

About

🦀 One idea. A whole cohort. — a local-first Rust platform where you're the boss: hire, direct & monitor a team of AI employees (api · claude_code · codex) from one chat-app office.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages