An always-on teammate built around OpenCode v2. OpenCode stays the runtime for
agents, sessions, providers, tools, skills, and permissions. aivi adds what a
team needs around it: a shared knowledge server, scheduled work, and channels
such as Discord and Slack, all started by one aivi serve. Ordinary OpenCode
installs reach the knowledge server through a small native plugin.
Warning
This project is under active development and it will be at least until OpenCode v2 is released. Don't use it. Or do, and suffer lol. Also this project is being used to build itself using exclusively local models because I am insane.
Node 26 and npm, from the repository root:
npm ci
npm run check
npm run aivi -- servenpm run aivi uses example/, a complete home with everything enabled; it
builds first (incremental, TypeScript 7) and runs the compiled dist/ — the
same artifact npm publishes. From here on: getting started
(searching, the librarian in OpenCode, a project, a chat channel).
| Package | Responsibility |
|---|---|
@aivi/cli |
The thin CLI: installs the server into <home>/app (server create), forwards every command to it, runs it in the background (service), updates it (update/upgrade) |
@aivi/app |
aivi CLI; composes configured modules and launches the host |
@aivi/core |
Config and access-policy schemas, knowledge kinds, contracts, logger |
@aivi/host |
Lifecycle, API, scheduler, SQLite store, capacity leases, OpenCode connection, session driver, dreaming, the channel module contract with the shared inbox, engine and turn runner, report routing |
@aivi/knowledge |
QMD-backed document indexing and scoped keyword search |
@aivi/browser |
Chrome DevTools MCP, persistent profile, session-owned tabs |
@aivi/channel-discord |
Discord channel module: gateway, DM/thread routing, sending, slash commands, report threads |
@aivi/channel-slack |
Slack channel module: Socket Mode, DM/thread routing, sending, manifest slash commands, report threads |
@aivi/linear |
Linear module: one app receiving every webhook, the assistant for people, workers in git worktrees, the Linear MCP proxy (linear) |
@aivi/opencode |
OpenCode plugin: knowledge_search, knowledge_projects, aivi_sources, aivi_status, aivi_context, aivi_jobs, aivi_browser |
Modules and jobs call shared services in-process. The plugin reaches the same services over the authenticated host API. Linear will be another in-process module with webhook routes on the same listener.
- Live-verified against OpenCode 2.0.3 and a Discord test server on the target Mac: discovery and auth, plugin tools, the session driver (jobs, dreaming, Discord turns all end in a verified final answer), Discord DMs/channels/ threads with slash commands and job reports.
- Browser control: live-verified against headless Chrome on the target Mac
(
npm run smoke:browser); login takeover and extensions still to exercise. - Knowledge: core and per-project sources with kinds (
doc,decision,memory,conversation); scope never widens on unknown IDs. Projects are clean checkouts under<home>/projects/, described from the home by adocs/convention (docs/projects.md). - Jobs: definitions (cron or one-off
at) and their runs in SQLite, Croner as the calendar,shellandprompttasks plus claimed system operations (invocation), dedupe, pools and leases, restart recovery, missed-run accounting, retention, reports. - Dreaming: a scheduled agent maintains
facts.mdand proposals from conversations since its last run (docs/dreaming.md).
Next, in order: next channels, installation on other machines, the Linear
live gate. Details and milestone status: docs/roadmap.md;
unscheduled ideas: docs/backlog/.
npm run agentic:verify runs Biome and npm run check (build, tests against
real SQLite, real QMD and the real v2 client on a mock server, schema check,
CLI and daemon smoke). Live gates: npm run live:opencode, npm run smoke:browser.
Versions are independent per package, managed with
Changesets: run npx changeset in a PR that changes a
package, describe the change and the bump level. Merging to main opens a
Version PR; merging that publishes the changed packages to npm with
provenance — no tags, no manual publishing.
New here? Getting started to run it, operations to keep it running, configuration for every field. Working on it? Start with CONTEXT.md, then architecture decisions, OpenCode integration, channel modules, projects, knowledge search, dreaming, Discord, Slack, browser, and roadmap.