Ax Agent

The best DSPy + RLM agent harness out there.

A production-grade agent framework for Node.js and browser runtimes. Context management, secure JS execution, typed signatures, GEPA optimization, and child agents — in one coherent substrate.

Context-managed RLM loop

Checkpointed and adaptive context policies keep long-running agents stable without turning the prompt into a landfill.

Secure JS runtime

AxJSRuntime is hardened by default and gives the agent a controlled execution layer instead of a brittle prompt-only loop.

DSPy + GEPA optimized

Write agents with typed DSPy-style signatures. Optimize end-to-end with GEPA — no prompt engineering, just declarative intent.

Core
Context Management

Use checkpointed, adaptive, lean, or full replay policies to keep long-running agents stable across hundreds of turns.

Runtime
Model Upgrading

Escalate the actor model when the run gets noisy — without upgrading the whole stack all at once.

Performance
Cache Aware

Works naturally with prompt-cache-friendly patterns instead of fighting repeated multi-turn workloads.

Optimization
DSPy + GEPA Ready

DSPy-style typed signatures, optimization workflows, and GEPA end-to-end tuning built into the Ax system.

How It Works

The RLM loop in action.

Each turn the LLM Actor generates code or tool calls. The JS Runtime executes them in a secure sandbox. Results flow into the Context Store and the loop continues until the agent calls success() or reaches maxTurns.

agent.ts
// DSPy-style typed signature
const researcher = agent(
'topic:string -> report:string',
{
runtime: new AxJSRuntime(),
contextPolicy: 'checkpointed',
functions: [searchWeb, fetchPage],
maxTurns: 8,
}
)
// Run with any LLM
const { report } = await researcher.forward(ai, {
topic: 'AI safety trends'
});
Context Policies

Choose how much the agent remembers.

Each bar represents a prior turn in the prompt. Policies let you trade recall for token efficiency — without changing agent code.

FullAll turns kept in prompt
oldestnewest
AdaptiveOld turns compressed
oldestnewest
CheckpointedCheckpoint + recent delta
oldestnewest
LeanMinimal — last turn only
oldestnewest
Ready for production

Browser-local is just the start.

The bigger story is the runtime: secure execution, context control, model policy, custom functions, child agents, DSPy compliance, and GEPA tuning for agents that need to keep working over time.

Read the Ax Agent guide
Runtime, context fields, model policy, functions, and RLM behavior.
Install
npm install @ax-llm/ax
Build once, then choose the surface that fits: browser-local, Node.js backend, or both.