Open-source harness engineering toolkit for AI coding agents
The frontier isn't the model — it's the harness: loop, context, tools, hooks, memory, observability. dtoolkit is a family of composable products that make your coding agents smarter, faster, and observable.
Each product has one job, works standalone, and composes with the rest via a neutral ContextBlock[] contract. No vendor lock-in — works with Claude Code, OpenCode, Cursor, Codex, and any tool that speaks MCP or CLI.
| Package | Version | Description |
|---|---|---|
@dtoolkit/core |
Shared types and Zod schemas (Adapter, ContextBlock, Fact, Entity, Tier) |
|
@dtoolkit/sdk |
Typed HTTP clients for dtoolkit services (dbrain + dproxy + dwork) | |
@dtoolkit/adapter-claude |
Adapter for Claude Code CLI | |
@dtoolkit/adapter-codex |
Adapter for Codex CLI | |
@dtoolkit/adapter-gemini |
Adapter for Gemini CLI | |
@dtoolkit/adapter-opencode |
Adapter for OpenCode CLI |
| Package | Version | Description |
|---|---|---|
@dtoolkit/dbrain |
Persistent memory server — SQLite + FTS5, MCP, REST API, federation, dashboard | |
@dtoolkit/dcontext |
Hooks for AI coding CLIs — injects dbrain context at session start, saves transcripts pre-compaction |
| Package | Version | Description |
|---|---|---|
@dtoolkit/dwork |
AI-native project manager — Markdown as source of truth, kanban dashboard, MCP, REST API |
| Package | Version | Description |
|---|---|---|
@dtoolkit/dproxy |
Universal adapter for invoking models — CLI and REST API |
| Package | Version | Description |
|---|---|---|
@dtoolkit/dstream |
— | Daily digest — what each agent learned, decided, or blocked today |
@dtoolkit/dreplay |
— | Session browser for the team (privacy-aware) |
@dtoolkit/dpair |
— | Real-time pair-programming with a shared agent |
| Package | Version | Description |
|---|---|---|
@dtoolkit/dops |
— | Agent observability — tokens, cost, tools, success rate, errors |
@dtoolkit/dpolicy |
— | Policy-as-code for the team harness |
@dtoolkit/dguard |
— | Pre-commit for agents — validate LLM output before applying |
| Package | Version | Description |
|---|---|---|
@dtoolkit/dforge |
— | Internal marketplace for skills, hooks, and slash commands |
@dtoolkit/droute |
— | Model router (Haiku/Sonnet/Opus) + cost tracking |
@dtoolkit/dcouncil |
— | Multi-agent debate for architecture decisions |
graph TB
subgraph Agent["Your Agent"]
CC["Claude Code / OpenCode / Gemini / ..."]
end
CC -- "ContextBlock[]" --> dcontext
CC -- "ContextBlock[]" --> dproxy
CC -- "MCP / REST" --> personal
CC -- "MCP / REST" --> dwork
subgraph Harness["dtoolkit harness"]
dcontext["dcontext<br/><small>hooks + briefing</small>"]
dproxy["dproxy<br/><small>transport</small>"]
end
subgraph Memory["Memory layer"]
personal["dbrain <small>(personal)</small><br/><small>identity + memory + knowledge</small>"]
shared["dbrain <small>(shared / team)</small><br/><small>team knowledge + API keys</small>"]
end
subgraph Projects["Project management"]
dwork["dwork<br/><small>tasks + docs + kanban</small>"]
end
dcontext -- "search / save" --> personal
personal -- "federated recall<br/>share facts" --> shared
subgraph Adapters["Provider adapters"]
ac["adapter-claude"]
ax["adapter-codex"]
ag["adapter-gemini"]
ao["adapter-opencode"]
end
dproxy --> ac & ax & ag & ao
style Agent fill:#1a1a2e,color:#fff,stroke:#16213e
style Harness fill:#0f3460,color:#fff,stroke:#16213e
style Memory fill:#533483,color:#fff,stroke:#16213e
style Projects fill:#0f3460,color:#fff,stroke:#16213e
style Adapters fill:#1a1a2e,color:#fff,stroke:#16213e
style personal fill:#e94560,color:#fff,stroke:#533483
style shared fill:#7c3aed,color:#fff,stroke:#533483
style dwork fill:#e94560,color:#fff,stroke:#533483
Design principle: one layer, one responsibility. If two products need to sync to function, it's wrong.
The examples/ directory contains ready-to-run TypeScript examples for the @dtoolkit/sdk clients:
| Example | Client | What it covers |
|---|---|---|
dbrain.ts |
DBrainClient |
Health, entity CRUD, facts, search, memory summary, conversations, federation |
dproxy.ts |
DProxyClient |
Batch ask, streaming, system prompts, file attachments, history, memory |
dwork.ts |
DWorkClient |
Projects, tasks, docs, search, overview |
demo.ts |
All | Combined smoke test |
cd examples
npm install
npm start # init + start servers + run demo + teardownNo configuration needed — the setup script creates a temporary brain, starts dbrain and dproxy, runs the demo, and cleans up. See the examples README for details.
# Install dependencies
pnpm install
# Build all packages (dependency-ordered)
pnpm build
# Run tests
pnpm test
# Lint
pnpm lintPer-package:
pnpm --filter @dtoolkit/dbrain dev # watch mode
pnpm --filter @dtoolkit/dwork dev # watch mode
pnpm --filter @dtoolkit/dproxy build # single buildThis is a pnpm workspace monorepo using Turborepo for task orchestration and Changesets for versioning.
pnpm changeset # describe your change
git push # CI runs lint + test + build
# release workflow creates a version PR
# merging publishes to npm