- Bun 1.3.0+
- Node.js 22.0.0+
- Git
git clone https://github.com/Deepractice/AgentX.git
cd AgentX
bun install
bun run buildVerify everything works:
bun test bdd/AgentX/
├── packages/ # Publishable library packages
│ ├── core/ # Types, interfaces, base classes
│ ├── agentx/ # Unified SDK (main entry for developers)
│ ├── server/ # WebSocket server
│ ├── mono-driver/ # Multi-provider LLM driver
│ ├── claude-driver/ # Claude-native driver
│ ├── node-platform/ # Node.js runtime (storage, events)
│ └── devtools/ # Testing utilities (BDD tools)
├── apps/ # Deployable applications
│ ├── portagent/ # Web app (Next.js)
│ └── cli/ # Terminal UI
└── bdd/ # Root-level Living Documentation
└── journeys/ # Feature files organized by role
Build order follows the dependency graph (handled automatically by Turbo):
@agentxjs/core,@agentxjs/devtools@agentxjs/node-platform,@agentxjs/claude-driver,@agentxjs/mono-driver@agentxjs/server,agentxjs@agentxjs/cli,@agentx/portagent
| Command | Purpose |
|---|---|
bun dev |
Start dev environment with hot reload |
bun run build |
Rebuild all packages |
bun test bdd/ |
Run BDD tests |
bun run bdd:ui |
Run UI tests (requires browser) |
bun run bdd:docs |
Run documentation quality tests |
Iron Law: No feature = no code.
Every change starts with a .feature file. Follow the 4-step process:
| Step | Action |
|---|---|
| 1 | Write .feature file describing the goal |
| 2 | Write .steps.ts with test definitions |
| 3 | Implement the code |
| 4 | Run bun test bdd/ until all pass |
| What you're working on | BDD location |
|---|---|
| A specific package | packages/<name>/bdd/ |
| A specific app | apps/<name>/bdd/ |
| Monorepo-wide norms | bdd/ (root) |
Each bdd/ directory has:
run.test.ts— BDD runner entry (uses@deepracticex/bddconfigure())journeys/— Feature files organized by rolesteps/— Step definitionssupport/— World class and hooks
| Variable | Purpose | Required |
|---|---|---|
ANTHROPIC_API_KEY |
Anthropic API access | Yes |
DEEPRACTICE_API_KEY |
Deepractice API access | Alternative |
DEEPRACTICE_BASE_URL |
Custom API base URL | No |
DEEPRACTICE_MODEL |
Override default model | No |
Tests using VCR can run without an API key (replays recorded fixtures).
We use Conventional Commits:
type(scope): description
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code change that neither fixes a bug nor adds a feature |
test |
Adding or updating tests |
chore |
Maintenance tasks |
Scope uses package name: core, agentx, server, mono-driver, node-platform, claude-driver, devtools, portagent, cli.
We use Changesets with fixed versioning — bumping any package bumps all of them.
Before creating a PR with user-facing changes:
bun changesetSelect affected packages, choose bump type (patch/minor/major), and write a summary.
- Create a feature branch:
feat/short-descriptionorfix/short-description - Follow BDD-first workflow (feature file → steps → implementation → tests pass)
- Add a changeset if applicable
- Push and create PR against
main - Wait for CI, address feedback, squash and merge
- English for all code, comments, and documentation
- ESM modules (
"type": "module") - Use
commonxjs/loggerinstead ofconsole.log - Use
commonxjs/sqliteinstead of direct SQLite bindings - See
CLAUDE.mdfor full conventions
- Open a GitHub Issue