Skip to content
xuancanhPublic

About

No description, website, or topics provided.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

466 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAAP — Yet another agent platform

An open platform for running an autonomous company of AI agents, with you as the owner. You write a paragraph of intent: a vision, a budget, your rules. A Chief of Staff turns it into objectives and key results, hires function heads and specialists from a catalog, and runs the company's operating system: the board, the cadences, the meetings, the brief. Every agent is a durable identity with its own model, memory, home folder, tools and heartbeat. They work in channels and on a shared board, write their work as versioned files, and act on the outside world only as far as they have earned. You open Home to see what needs you, what happened while you were away and whether the company is on track. You decide through one-line decision cards that say what happens if you stay silent.

The company runs on explicit mechanisms rather than prompt text alone: processes (versioned procedures, strict or agent-chosen, whose steps are tasks), services between departments with SLAs, CEO alignment before direction, strategy and OKRs turn into work, quality standards and policies checked as data, evidence-gated claims, capped improvement proposals instead of retro task floods, and limits on work agents start for themselves. Agents can pick their model per task by complexity and split a big task across several sessions.

It is a NestJS API and a React SPA over Postgres and S3-compatible storage, provider-neutral (Anthropic, OpenAI and the OpenAI-compatible family), and built so that the owner can look away: actions are classed by reversibility, trust is earned per action class, an independent reviewer checks risky calls, incidents contain themselves, and what the company may change about itself is one table. Capabilities beyond the core (source control, CI, support desks, CRM, accounting and more) arrive as plugins, bundled into kits for a use case and blueprints for a whole company, all from Foundry.

Home: the owner's mission control

Inbox Inbox: one feed with the bell; a list and a reading pane Direction Direction: vision, goals, the roadmap and the program matrix
Operations Operations: the board, pulse, brief, meetings, processes, improvements and incidents People People: the org chart, named departments and who serves which project
Channel Channels: #company, its meetings, and a file opened from chat in the side panel Meeting Meeting room: an ended retro as a record: agenda, decisions, actions, attendance
Agent Agent page: what it is doing, its decisions, queue, activity and team Artifacts Artifacts: the workspace filesystem with versions and history
Alignment Alignment: what needs your sign-off, with the owner's brief and reasoning Improvements Improvements: capped proposals and where the company's work comes from
Foundry Foundry: blueprints, kits, agents and plugins

Contents

What you can do

Home and Inbox

  • Home is mission control (docs/home.md). One request (GET /api/workspaces/:id/home) composes: Needs you (decision cards, held or staged actions, incidents, warnings), Since you were last here (tasks done or blocked, what was decided without you, files changed, the pulse), Goals, Team (each agent's state, current work and heartbeat), Activity (routine loop runs collapsed per agent and day), Spend and health, Coming up (meetings, cadences in words, deadlines) and Recent files. Each section fails on its own; the rest still renders.
  • The top bar (docs/home.md) sits over every screen: the workspace switcher (each company's run state and what needs you), the company at a glance (Running or Paused with the owner's confirmed Pause / Resume, spend against the envelope, agents working and failing, the turns running now, the next meeting), a command palette (⌘K / Ctrl+K: places, agents, chats, task keys, files, actions), quick create, the notifications bell and the account menu.
  • Inbox and the bell are one feed (docs/owners-seat.md): one server-side list, so their contents and counts agree. Tabs are Needs you (decisions, escalations, keys, pending changes, things blocked on you), Mentions, Updates and Done. On a wide screen a list sits beside a reading pane that says what is asked in plain words, what happens if you do nothing and by when, the facts, the route the card climbed and each manager's recommendation; you approve or reject with a note, or answer an escalation and unblock its task. Titles read as sentences ("Head of Marketing wants to hire a Content Marketer"), repeated updates group, informational types can be switched off per workspace, and j/k, Enter and e work from the keyboard. Everything I follow shows the threads and tasks you follow (docs/follows.md).
  • Addresses you can share (docs/routes.md): every place is a path under its company, e.g. /acme-3f9a2c/channels/company, /acme-3f9a2c/tasks/ENG-12, /acme-3f9a2c/meetings/<id>, /acme-3f9a2c/inbox/needs/<item>. Reload returns to the same company and view, Back and Forward work, and older links redirect.
  • Notifications reach you outside the tab through Telegram, email and web push, inside quiet hours you set (docs/channels.md).

Company

Switch a workspace into organization mode (supervised or autonomous) and it becomes a company (docs/group-chat.md §5, docs/company-vision.md), and Inbox and the company's five sections join the main menu: Direction (vision, alignment, goals, roadmap, decisions), Operations (board, pulse, brief, meetings, processes, improvements, incidents), People (org chart, teams, services), Money (spend, capital) and Oversight (audit, quality, replay). Each opens on a dashboard that summarises its pages; what waits on you stays in the Inbox, and company settings in Settings › Company.

  • Chief of Staff (docs/chief-of-staff.md): derives the company's operating system from your values, culture and stage (cadences, templates, thresholds, how much it may act as your proxy), runs the rituals and keeps the source of truth. It hires, reorganizes and moves budget: in supervised mode each change is a card you decide; in autonomous mode it acts inside hard caps and a veto window.
  • Function heads and specialists: 13 function heads and 39 specialists plus an Auditor in the Business catalog (docs/agent-catalog.md, docs/autonomous-skills-review.md). Every head runs a department with its own name (derived from the head's title, e.g. Engineering and #engineering, and renamable by the CEO, the board, the chief or its head without breaking task keys or old links), board, channel and goal subtree. A human can hold a role too. Heads hire into their own departments.
  • Program management as a matrix (docs/work-tracking.md): heads own people and capacity; Program Managers own goals and projects. A PM asks a head for a share of a member's time; the head approves, adjusts, declines or hires, and disagreements climb to the chief, then you. Each goal and project has its own rhythm (a goal review, a milestone review, the project's sync) run as a meeting by its PM. Members see both their line manager and their project seats; over-allocation is flagged to both. With no PM yet the chief acts as one and is prompted to hire.
  • Roadmap and projects: bets and projects with keys (P-3), appetite, health updates and cross-functional project teams; tasks carry Jira-style keys (ENG-12, docs/tasks-keys.md) and can @mention agents and people.
  • Services (docs/services.md): each department's catalog of what it offers the others — the fields a request needs, who answers, accept and resolve SLAs derived from the company's culture. A request naming a service is routed with no model and run as a process; the provider accepts with a date, declines or negotiates, and silence climbs the provider's line to its head, the chief, then your Inbox.
  • Processes (docs/processes.md): the company's standing procedures (release checklist, incident response, request intake, the chief's daily sweep, …) as versioned graphs. A model-free engine turns each step into an ordinary task with a step card; strict stages follow the graph, dynamic ones let the performer choose; MUST items gate the review, deviations are logged or waived. Steps can be tasks, approvals, timers, sub-processes or meetings, and a step with a side effect can name an undo step that runs if the run fails. The chief and the heads change them from what the runs show, every edit a new version you can roll back; a new version can ramp on a share of runs and is compared with the old one before it is promoted. Conformance (were the steps followed) is measured apart from outcomes, and work the company keeps doing by hand is suggested as a new process.
  • Improvements (docs/improvements.md): retros, postmortems and process reviews raise capped, evidenced proposals on a process, policy, standard, playbook, cadence, charter or tunable instead of tasks; standard changes apply at once, normal ones go to the owner, emergency ones are reviewed after; every change is verified against its metric and reverted when it misses. Admission control caps self-started work and agent-to-agent wakes, and Work sources shows where work comes from.
  • CEO alignment (docs/alignment.md): what needs you before work starts — direction, strategy, OKRs, bets, money beyond the plan, external commitments, organisation design, values and policy, one-way doors — is data, not a fixed list. The owning agent decides whether an item needs you against six criteria (reversibility, blast radius, cost, external commitment, novelty, conflicts) and records why; a supervised company keeps a floor of classes that always do. You get a brief (why, options, trade-offs, measures, cost, what it unlocks) with a thread to the owner and approve, approve with changes, send back or reject; no task is created under an item until it is aligned. What agents chose not to escalate is listed so you can pull it in, and the chief spot-checks both misses and noise. Autonomous companies align automatically or through the chief, logged for you to review.
  • Goals and OKRs: vision → objectives → key results with metric, target, owner and due date. A model-free sweep flags key results at risk, and any task can show its why chain. Key results can be measured from metric sources (HTTPS JSON, webhooks, Gmail/Calendar/Drive counts, attestation) rather than typed in (docs/sensing.md).
  • The board: tasks with one owner, atomic claiming, four-field briefs, dependencies, deadlines, WIP limits, review rounds and model-free done_when checks. Each task has a deep link.
  • Meetings and cadences (docs/meetings.md): standups, reviews and retros run as bounded rituals in their own sub-channel; the parent channel keeps a link and the minutes line. A full-screen meeting room shows the agenda, turns, proposals and attendees live, and an ended meeting as a record. Minutes, a calendar per company and channel, and a decision log follow. Every cadence and threshold is a per-company tunable with a bound.
  • Decisions: every card carries a recommendation, alternatives, reversibility and what happens at its deadline if you say nothing. Kinds of card can be delegated to a person or a role (docs/owners-seat.md).
  • Incidents: breaker trips, failed checks, budget stops and critical audit findings are contained by severity (note, pause the member, freeze an action class, drop to supervised) and major ones get a postmortem (docs/incidents.md).
  • Quality and policies (docs/quality.md): quality standards give each kind of deliverable criteria and a pass bar; handing work to review needs evidence per criterion (tool calls, files, fetched pages, checks), verified without a model, and the reviewer is never the maker (another model family when the company asks). First-pass yield, rework and escapes are tracked per member, and accepted work is spot-checked. Policies are enforceable data — checked before every outward or mutating action and again at review, blocking, warning or logging with the fix to make; an agent can ask you for a one-time exception.
  • Evidence-gated claims (docs/evidence.md): a claim written into shared state — a key-result check-in, a project update, "sent 40 emails", a decision, a step output, a lesson — must cite evidence that exists; counts are checked against the record. Depending on the company's setting an unproven claim is refused, or lands marked unverified and does not move progress; invented evidence is a fabrication signal and, repeated, an incident. Badges show what is verified.
  • Audit: an append-only, hash-chained log of every change, an auditor role whose own precision is spot-checked, and any day can be replayed.
  • Spend: USD envelopes reserved before every run (80% warning, 100% hard stop), cost per outcome rolled up to key results, a burn forecast, and model routing by task class.
  • Improvement: changes run as experiments with predictions that are scored (docs/experiments.md); charter, playbook and routing changes are replayed against a role's golden set before rollout (docs/evals.md). A company exports as a blueprint, COMPANY.json (docs/blueprints.md).

Agents

  • Model selection (docs/agent-types.md): Claude and OpenAI are supported out of the box (a type is created from ANTHROPIC_API_KEY / OPENAI_API_KEY, or with Add Claude / Add OpenAI in Settings), each with a cheap / standard / strong tier map. An agent set to Auto gets a tier per task run and chat turn from the work's complexity and risk (class, brief, criteria, quality bar, risky actions, scope, process-step hints), escalates after a failed attempt, steps down when the envelope is tight but never below a floor for risky work, and may ask for a stronger or cheaper model within limits. It can run on either provider by your preference order and provider health, and a reviewer prefers another model family. Every decision and its reasons show in the Work log; outcomes per tier tune the thresholds.
  • Big tasks across sessions (docs/task-execution.md): an agent can split a task into a plan of steps with dependencies and run it in one session, as a relay of fresh sessions joined by handoff packets, or with a master session that runs steps in clean worker sessions — parallel for research, one at a time for writes — checks each result against its exit criteria and integrates them under a shared decision log. Caps on sessions, workers, depth and spend come from the company's settings, simple work is not allowed to fan out, and a restart resumes the plan. The plan, the session tree and folded worker transcripts show on the task, in the Work log and in chat.
  • Durable identities: each agent has its own provider and model, charter, sessions, memory (LESSONS, JOURNAL, profile entries it reads back each turn; docs/agent-memory.md), home folder and tools, plus a company briefing of what every member knows without asking.
  • A human voice (docs/agent-writing.md): one voice section in every agent's system prompt (lead with the point, everyday words, no filler), with a register per place: Slack-short in channels and meetings, conversational in a direct chat, and no length cap in task work. Each agent gets one of ten personalities at hire (dry and matter-of-fact, warm, blunt pragmatist, skeptical reviewer…), changeable in its settings; it colours tone, never accuracy.
  • Chat and the Work log (docs/work-log.md): a person's chat with an agent is kept apart from the agent's own work sessions, which appear in the chat rail with the same UI and can be stepped into and rerun. Agents can message you directly.
  • A heartbeat: every agent wakes on a gated heartbeat that runs only when something changed (quiet otherwise), plus cron loops and event triggers: new mail, calendar changes, assigned tasks, webhooks (docs/triggers.md).
  • Tools: workspace files, web search and fetch, a credential-free browser (docs/browser-tool.md), sandboxed run_js / run_python (docs/code-execution.md), skills, MCP servers, Google and Microsoft connections (docs/integrations.md), mini apps (docs/miniapp-capabilities.md), voice notes (docs/voice.md), coding harnesses (Claude Code, Codex, Pi and DeepSeek through code_agent, docs/coding-harnesses.md), every workspace record as a read tool (docs/agent-data-access.md) and, through a paired companion, your own desktop (docs/computer-control.md). A turn has no tool-round cap: the loop breaker, budgets and Stop end a runaway turn.
  • Channels and @mentions (docs/group-chat.md): Slack-style channels and threads where people and agents talk. A mentioned agent replies in its own per-channel session and behaves exactly as it does in a private chat. Unprompted replies pass a relevance check and hard rate bounds, and agent-to-agent chains stop after three rounds.
  • Following: agents and people follow the threads and tasks they take part in; an agent hears about changes in its heartbeat, a person in the Inbox.
  • Portability: AGENT.json v2 export and import, memory import from other assistants, and SKILL.md skills in the agentskills.io format.

Artifacts

  • One filesystem per workspace (docs/filesystem.md), laid out like a Linux box: agents/<handle>/ homes, org/, channels/<slug>/, uploads/ and any shared folder.
  • Versioning and collaboration: every write records a version and an author, conflicting writes get a 409 with the current version, History shows past revisions, and agent homes keep read-only checkpoints.
  • Company records as files: playbooks, experiments, evals, outcomes and metrics are mirrored as markdown under /org/ and read in Artifacts.
  • Markdown, HTML, images, PDFs and slide decks preview in place. HTML runs in a sealed, network-denied iframe.
  • Paths are links: a file path an agent writes in chat, a channel or minutes (/org/marketing/waitlist/GO-LIVE.md) opens the file in the side panel, with Open in Artifacts one click away.

Trust and safety

  • Self-modification boundary (docs/boundary.md): one table says what the company may change alone, only through an experiment, only as a proposal to you, or never.
  • Permissions (docs/permissions.md): three gates for anything an agent builds (apps, skills, tools); Ask/Auto approvals per chat.
  • Actions and the trust ledger (docs/actions-and-trust.md): every tool call is classed by reversibility (read, internal write, external reversible, external irreversible, money) and logged with an idempotency key. Each agent earns a trust level per class; sends it may not yet make alone are staged as drafts for you.
  • Independent reviewer: a second model call with no tools checks risky actions before they run.
  • Prompt-injection defences: untrusted content is framed as data, and a scheduled red-team run tries a canary injection against record-only tools (docs/security.md, docs/incidents.md).
  • SSRF guard on every outbound URL, sealed tokens at rest, account-scoped queries and workspace access guards.

Plugins, kits and Foundry

  • Plugins (docs/plugins.md): the core is domain-free (registry, binding resolver, dispatcher, a deny-by-default policy stage, change records, conformance). Interfaces such as scm, ci, support or crm are plugins themselves, as are the providers that implement them and the consumers that use them. A plugin can also bring skills for an audience, bounded and attributed guidance for agents' prompts, and declarative UI: cards and pages on the company dashboards, panels on tasks and buttons that run through the same policy stage as agents (no plugin code runs in the app). Twelve first-party plugins ship with trial providers: dev workflow, observability, feature flags, support desk, knowledge base, forms, CRM, web analytics, campaigns, accounting, recruiting and contract review.
  • Kits (docs/foundry.md): a use case packaged as interfaces, plugins, roles, playbooks and guidance: Ship Software, Support Desk, Revenue, Growth, Finance Close, Hiring and Legal Review. The install review shows every provider, plugin, seat, policy and playbook first; install is atomic, with upgrade, rollback and an uninstall plan.
  • Blueprints: whole companies as COMPANY.json, including seven first-party starters, with a dry-run plan before install.
  • Foundry is the marketplace with four shelves: Blueprints, Kits, Agents (the Business catalog of heads and specialists plus more than 50 personal packs, all authored in packs/) and Plugins (including native Google and Microsoft connectors and remote MCP servers; connecting grants nothing until an agent is given access). The chief and heads can search Foundry and propose a kit or plugin; each proposal is a card you approve. Community publishing sits behind a scan and a review (docs/registry.md).

Quick start

Requirements: Node.js 20+ and Docker.

npm install
cp .env.example .env                              # defaults match the compose file
docker compose -f docker-compose.dev.yml up -d    # Postgres :5433, MinIO :9100 (console :9101)
npm run dev                                       # API :8790 + SPA :5175 (Vite proxies /api)

Open http://localhost:5175. Add an agent type with a provider key under Settings → Providers & agent types (Anthropic or the OpenAI-compatible family; without a key, chats fall back to the Echo dev provider). Then hire an agent from Foundry, or turn the workspace into a company under Settings › Company.

  • npm run dev (scripts/dev.mjs) compiles the server with tsc --watch, runs server/dist/main.js under node --watch, and starts Vite. The server runs from compiled output because Nest's constructor injection needs emitDecoratorMetadata.
  • Migrations are idempotent and run on every boot. The S3 bucket is created on boot when the store allows it (MinIO does; on AWS, create it first).
  • Optional integrations (Google/Microsoft OAuth, Telegram, email, web push, code runner, browser, voice, registry) are configured in .env; each block in .env.example says what it enables. COMPANIES_ENABLED=false hides organization mode.
  • npm run build builds the server (tsc) and the SPA (Vite). npm run packs:build regenerates server/src/market/authored-packs.generated.ts from packs/*.md, and npm run blueprints:build re-derives the starter companies' tunables and embeds blueprints/first-party/. Production: Dockerfile, deploy/docker-compose.prod.yml and docs/environments.md.

Project layout

server/src/          NestJS API, one module per domain (see docs/architecture.md)
  chats/             sessions, the streaming turn loop, tools, compaction, heartbeat, loops
  org/               the company: units, tasks, intent, meetings, approvals, audit,
                     incidents, sensing, experiments, evals, capital, chief of staff
  agents/ ai/ actions/ review/ files/ storage/ groupchat/ follows/ home/ …
  database/          Drizzle schema.ts + idempotent boot migrations (migrator.ts)
src/                 React 19 + Vite SPA: store.tsx, components/, lib/
packs/               authored agent packs (markdown + JSON front matter)
plugins/ kits/       first-party plugin and kit manifests
blueprints/          first-party starter companies (COMPANY.json)
scripts/             dev.mjs, build-authored-packs.mjs, push-keys.mjs
tests/               backend suites: node:test via tsx over PGlite (in-memory Postgres)
web-tests/           frontend suites: vitest + jsdom
companion/           desktop companion for computer control
cloudflare/          email-worker, runner-worker
deploy/ infra/       production compose file, Cloudflare Worker for the SPA
docs/                design docs (index below)

Testing

TEST_CONCURRENCY=2 npm test           # backend: tsx --test over PGlite, no server boot
VITEST_MAX_WORKERS=2 npm run test:web # frontend: vitest + jsdom
npm run lint

Keep concurrency low: the PGlite suites are memory-hungry, and several suites often run side by side on one machine. npm test defaults to 3 concurrent files and vitest to 2 workers.

Documentation

Start with docs/architecture.md for how the system is built, and docs/company-vision.md with docs/autonomous-org-first-principles.md for why.

Architecture and operations

The company

Agents and tools

Plans and research

License

AGPL-3.0-or-later (see package.json).

About

No description, website, or topics provided.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages