Deploy AI teams that run your workflows & learn non-stop.

If your language model can write JSON, it can build complex agent workflows and execute them securely.

Auto-installs Claude & Codex Skills MCP Server Support 15+ LLM Providers
$ npm install @amitdeshmukh/ax-crew @ax-llm/ax @ax-llm/ax-tools

The old way vs. the AxCrew way

Without AxCrew

  • Weeks wiring providers, state, and tools
  • Agents can't share context or learn
  • No cost visibility until the bill arrives
  • Locked into one provider
  • Every new agent = more code to maintain

With AxCrew

  • 500 lines of glue → 20 lines of JSON
  • Shared state, sub-agents, ACE learning
  • Real-time cost tracking per agent
  • Swap providers in one line — 15+ supported
  • New agent = new JSON block. Ship in minutes.
crew.ts
// Example: Customer support crew with ACE learning.
// SupportAgent delegates policy questions to
// PolicyLookup and learns from supervisor feedback.

import { AxCrew } from '@amitdeshmukh/ax-crew';
// ACE is optional. Without it, agents
// work perfectly — they just don't
// learn between sessions.

const crew = new AxCrew({
  crew: [{
    name: "PolicyLookup",
    description: "Finds relevant company policies",
    signature: "issue:string -> policy:string",
    provider: "openai",
    providerKeyName: "OPENAI_API_KEY",
    ai: { model: "gpt-5.4" },
    functions: ["SearchKnowledgeBase"]
  }, {
    name: "SupportAgent",
    description: "Resolves support tickets",
    signature: "ticket:string -> response:string",
    provider: "anthropic",
    providerKeyName: "ANTHROPIC_API_KEY",
    ai: { model: "claude-sonnet-4-6" },
    agents: ["PolicyLookup"],
    functions: ["CreateTicket", "SendEmail"],

    // Optional: ACE makes agents learn
    ace: {
      persistence: {
        playbookPath: "./playbook.json"
      }
    }
  }]
});

await crew.addAllAgents();
const support = crew.agents.get("SupportAgent")!;
await support.initACE(); // optional

// Resolve a ticket
const { response } = await support.forward({
  ticket: "Charged twice for my sub"
});

// Teach it — remembers next time
await support.applyOnlineUpdate({
  example:    { ticket: "charged twice" },
  prediction: { response },
  feedback:   "Always offer a refund"
});
That's it. Your crew is ready.
playbook.json auto-generated by ACE
// ACE learns rules from human feedback
// and persists them across sessions.
// This file is auto-managed.

{
  "sections": {
    "billing": {
      "bullets": [
        {
          "text": "Always offer a
            refund for billing
            errors",
          "source": "feedback"
        },
        {
          "text": "Escalate repeat
            billing issues to
            finance team",
          "source": "feedback"
        }
      ]
    },
    "tone": {
      "bullets": [
        {
          "text": "Use empathetic
            language for
            frustrated customers",
          "source": "feedback"
        }
      ]
    }
  }
}

What you get

Everything you need to ship multi-agent systems. Nothing you don't. Built with AxLLM.

Config-First

Define your entire crew in JSON. Agents, providers, tools, sub-agents — all config.

ACE Learning

Agents learn from feedback. Playbooks persist and improve over time.

Sandboxed Code Execution

Agents write and run code in AxJSRuntime. Permission-controlled, data never leaves your environment.

Shared State

Agents read and write to a shared key/value store. Coordinate without ceremony.

MCP Support

Connect any MCP server. STDIO, HTTP SSE, Streamable HTTP — all three transports.

Cost Tracking

Per-agent and crew-level metrics. Tokens, requests, estimated USD — always visible.

Works with every major provider

OpenAI Anthropic Google Gemini Azure Groq Together Mistral Cohere Ollama DeepSeek Perplexity Grok

Your AI already knows how to use this.

16 skill files auto-install into Claude Code & Codex.
Ask your AI to build an agent crew. It just works.

Get Started

Up and running in 60 seconds.

1

Install

terminal
$ npm install @amitdeshmukh/ax-crew @ax-llm/ax @ax-llm/ax-tools
2

Create crew.ts

crew.ts
// Example: RLM data analyzer with sandboxed code execution.
// Agent writes JS to analyze your data locally —
// your data never leaves your environment.

import { AxCrew } from '@amitdeshmukh/ax-crew';
import { AxJSRuntime, AxJSRuntimePermission } from '@ax-llm/ax';

// AxJSRuntime: sandboxed code execution.
// The agent writes JS to analyze your data,
// but runs it locally in a controlled sandbox.
// Your data never leaves your environment.
// Permissions control what code can access.
const runtime = new AxJSRuntime({
  permissions: [
    AxJSRuntimePermission.TIMING,
    // No network, no filesystem, no eval
    // — only what you explicitly allow.
  ]
});

const crew = new AxCrew({
  crew: [{
    name: "Analyzer",
    description: "Analyzes data with code execution",

    // DSPy signature: typed inputs → typed outputs
    signature: "data:string, query:string -> answer:string",

    provider: "anthropic",
    providerKeyName: "ANTHROPIC_API_KEY",
    ai: { model: "claude-sonnet-4-6" },

    // "axagent" = RLM mode: the agent reasons,
    // writes code, executes it, and iterates.
    executionMode: "axagent",

    axAgentOptions: {
      // "data" is treated as semantic context —
      // compressed and managed automatically,
      // never sent raw to the LLM.
      contextFields: ["data"],

      // The sandboxed runtime from above
      runtime,
      maxTurns: 20,

      // Auto-prune failed reasoning paths
      // and re-evaluate with hindsight
      contextManagement: {
        errorPruning: true,
        hindsightEvaluation: true
      }
    }
  }]
});

await crew.addAllAgents();
const analyzer = crew.agents.get("Analyzer")!;

// The agent will:
// 1. Read the data via context fields
// 2. Write JS code to analyze it
// 3. Execute in the sandbox
// 4. Iterate if errors occur
// 5. Return a typed answer
const { answer } = await analyzer.forward({
  data: salesCSV,  // your data stays local
  query: "Which region grew fastest in Q1?"
});

console.log(answer);
console.log(crew.getCrewMetrics());
3

Run

terminal
$ export ANTHROPIC_API_KEY=sk-ant-...
$ npx tsx crew.ts

No framework to learn. No boilerplate to write.

Just JSON and your imagination.™