@adecore/agents
A host for agent chats in Node, Bun or an Electron utility process. It runs Claude Code and Codex as chat backends, keeps every thread on disk, streams it to its clients, and manages the CLIs' accounts and usage. It answers the requests of @adecore/agent-contracts over a port you hand it, and registers no channel of its own.
Install
bun add @adecore/agents @adecore/agent-contracts
The package brings no CLI. Install Claude Code or Codex and sign in with it.
Use
import { AgentHost } from '@adecore/agents/host';
const host = await AgentHost.open({ dataDir });
const disconnect = host.connect(port);
// later
disconnect();
await host.close();
The root holds the file, process and error helpers; /host, /chat, /providers, /usage, /coordination, /context and /testing hold the rest. A module that no entry exports is internal. A new chat runs in full-access unless it names a runtime mode, so name one.
Documentation
| Page | What it covers |
|---|---|
| Getting started | A whole turn against a fake CLI, in one file |
| Host | AgentHost, its options, wireAgents, the hooks of ChatCore and Electron |
| Chats and turns | Sending, queuing, approvals, stopping and restarts |
| Providers | The CLIs, their model catalogs and the runtime modes |
| Accounts and usage | Config folders, secrets, the environment and usage |
| Coordination | The outbox, tasks between chats, lineage and messages |
| Tools | Tools your agents call back into |
| Storage | What is written where, and the file helpers |
| Testing | The fakes and the error codes |
| Exports | Every entry point and its exports |
License
FSL-1.1-MIT. See LICENSE.