ax-llm/ax/ax-agent-rlm

Claude Code and agent skill by ax-llm/ax

Trust tier 2
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

This skill helps an LLM generate correct AxAgent RLM/runtime code using @ax-llm/ax. Use when the user asks about RLM code execution, AxJSRuntime, contextFields, contextPolicy, liveRuntimeState, promptLevel, stage prompt controls, executorModelPolicy, maxRuntimeChars, agent.test(...), llmQuery(...), recursionOptions, or long-running agent runtime behavior.

Install

npx vskill@latest install ax-llm/ax/ax-agent-rlm

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as ax-llm/ax/ax-agent-rlm.

AxAgent RLM Runtime Rules (@ax-llm/ax)

Use this skill for code-runtime agents and llmQuery(...) semantic-helper behavior. For ordinary agent setup, child agents, tool namespaces, clarification, and bubbleErrors, use ax-agent. For callbacks and logs, use ax-agent-observability. For memories and skill loading, use ax-agent-memory-skills.

Use These Defaults

  • Use agent(...), not new AxAgent(...).
  • Save and inspect new tool results on a fresh model turn. Use batch([{ name, args }, ...]) for independent tool calls whose arguments are already known; deterministic computation and tools explicitly marked resultPolicy: 'data' may also be chained.
  • Rely on autoUpgrade (ON by default) for oversized inputs you did not declare in contextFields: any input value over ~8k serialized chars is kept runtime-only automatically, with a 1,200-char prompt preview plus a contextMetadata line, while the full value stays live in the runtime as inputs.<field>. Declare a field in contextFields only when you want a specific inline policy (promptMaxChars / keepInPromptChars) or need a large required non-string field kept out of the prompt (those are left inline by auto-upgrade).
  • Default to contextPolicy: { preset: 'checkpointed', budget: 'balanced' } for most RLM tasks.
  • Prefer contextPolicy: { preset: 'adaptive', budget: 'balanced' } when older successful turns should collapse sooner while live runtime state stays visible.
  • Use contextMap for recurring long-context corpora when the distiller should start future runs with a small persisted orientation cache.
  • Prefer promptLevel: 'default' for normal use.
  • Use promptLevel: 'detailed' when you want extra anti-pattern examples and tighter teaching scaffolding in the actor prompt.
  • Prefer executorModelPolicy when the actor may need to upgrade after repeated error turns or discovery in specific namespaces without also upgrading the responder.
  • Use explicit child agents in functions: [...] when the task needs specialist agents with their own tools/runtime.
  • Use llmQuery(...) only for focused semantic questions over narrowed context; it does not spawn a tool-using child AxAgent.
  • Prefer maxSubAgentCalls only when you need an explicit cap on llmQuery(...) sub-query usage.

Mental Model

AxAgent is a three-stage pipeline. Each forward() call walks the stages in order:

text
distiller (RLM actor) -> executor (RLM actor) -> responder (synthesizer)
  • distiller always runs first. It sees all original inputs so it can understand and normalize the task; declared contextFields stay runtime-only when present. It distils relevant evidence by writing runtime-language code in a multi-turn loop, then calls the runtime-exposed final(request, evidence) primitive. The request becomes the executor's inputs.executorRequest; it must be self-contained and restate the concrete action, target, and constraints, not vague wording like "do it". The distiller should expand the original user task only with facts found in context, including follow-ups like "yes, do it"; it keeps the user's own instructions and conditions in their original wording and does not add steps, checks, deliverables, reporting, or completion requirements the user did not state. When no contextFields are configured, it still performs request normalization over the original inputs with contextFields: []. The distiller has no tools and is not a capability gate.
  • executor runs unless the distiller skipped it (below). It receives non-context inputs plus inputs.executorRequest, a compact distilledContextSummary prompt field, and the real evidence live as inputs.distilledContext from the distiller's final(request, evidence) payload. Declared or auto-promoted context fields stay runtime-readable as inputs.<field> when contextMetadata lists them, but their raw contents are not pasted into the executor prompt. The executor owns tool use, decides whether to call its available functions or finish directly from distilled evidence, and reports actual tool results or failures. The user's own task inputs remain the authority on what was asked: where executorRequest adds or leaves out steps, deliverables, or conditions, the executor follows the task inputs.
  • A distiller or executor reply that is cut off at the output limit (no usable code, or a truncated tool-call payload) does not end the run: nothing has executed, so the same turn asks again, up to three extra model calls, first unchanged and then with a short note asking for a smaller step. The original error surfaces only when every retry is cut off too.
  • responder always runs last. It synthesizes the user's output signature from whichever upstream actor finished the run and must not contradict tool evidence gathered upstream.
Direct respond (executor skip)

With directResponse: 'auto' (the default), the distiller can end the run with the respond(task, evidence) primitive when the task needs no executor authority — the executor stage is skipped entirely (zero executor model calls) and the responder synthesizes straight from the distiller's evidence. Unlike final, whose evidence stays live in the shared session by reference, respond's evidence crosses into the responder prompt (budgeted by maxEvidenceChars), and the distiller's runtime variables are exported as the cross-run state exactly as the executor's would have been.

  • Static agents (no functions, child agents, or native MCP/UCP operations) run respond-only: final is not offered to the distiller and every run is distiller → responder.
  • Agents with executor authority from functions, child agents, or native MCP/UCP operations get respond alongside final under a conservative covenant: only for tasks answered purely by reading/synthesizing provided context, never when a listed function/module domain covers the need, never for current/live/fresh-state asks (context may be stale — tools are the source of truth for "now"), never for side effects. Landing-gate eval (both pinned models, 3 repeats): 0 false skips on tool-required tasks including a stale-context trap, 100% skip recall on pure context Q&A.
  • directResponse: 'off' removes the primitive from the prompt and the runtime, and the pipeline rejects a respond payload outright.

Treat both actor stages as long-running code runtime sessions that the actor steers over multiple turns, not as fresh script generators on every turn. AxJSRuntime is the default; custom runtimes set language so the actor code field becomes <language>Code such as pythonCode while JavaScript keeps the legacy javascriptCode.

  • Successful code leaves variables, functions, imports, and computed values available in the runtime session.
  • The actor should continue from existing runtime state instead of recreating prior work.
  • actionLog, liveRuntimeState, and checkpoint summaries only control what the actor can see again in the prompt.
  • Rebuild state only after an explicit runtime restart notice or when you intentionally need to overwrite a value.

RLM Actor Code Rules

Use these rules when generating actor JavaScript for RLM in AxJSRuntime stdout mode. For custom runtimes, follow the runtime's getUsageInstructions(), primitive overrides, and callable formatter instead.

  • Treat each actor turn as work up to the next decision requiring new information. Local deterministic computation may contain multiple steps.
  • Inspect what already exists before recomputing it. If a prior turn successfully created a value, prefer reusing that runtime value.
  • Tool results that require inspection appear in the action log automatically. For a local value, log a compact projection when the next model decision needs it. There is no required number or spelling of console.log(...) calls.
  • On the next turn, continue from the existing runtime state and use the logged result from Action Log only as evidence for what happened.
  • If the prompt contains Live Runtime State, treat it as the canonical view of current variables.
  • Errors from child-agent or tool calls appear in Action Log; inspect them and fix the code on the next turn.
  • Use compact console.log(...) output for inspection; logging itself is not a yield primitive.
  • Complete with await final(outputGenerationTask, context) or await askClarification(...) only after reviewing pending tool observations.
  • Do not prewrite actions that require interpreting a new result. Independent tool calls can use batch(...); local deterministic transformations and data-tool chains can share one turn.
  • Logging and completion may share a turn for deterministic work, but an inspection result blocks completion until the next model turn.
  • Inside actor-authored JavaScript, await final(...) and await askClarification(...) end the current turn immediately; code after them is dead code.
  • Do not re-declare or recompute values just because older turns are summarized; only rebuild after an explicit runtime restart or when you intentionally want a new value.
  • Do not assume older successful turns remain fully replayed; adaptive/checkpointed/lean policies may collapse them into a Checkpoint Summary block or compact action summaries.

Small reuse example:

Turn 1:

javascript
const customers = await kb.findCustomers({ segment: 'active' });
console.log(customers.length);

Turn 2:

javascript
const topCustomers = customers.slice(0, 3);
console.log(topCustomers);

Reason: turn 2 reuses customers from the persistent runtime. Live Runtime State or summaries may change how turn 1 is shown in the prompt, but they do not remove the value from the runtime session.

Observation Boundaries in Generated Packages

The embedded JavaScript engines for Python, Go, Rust, Java, and C++ pause after discovery or recall and require another model turn before acting on inspection results. An inspection result is shown within the runtime output budget and the complete value remains in its saved binding. Independent calls can share a turn through batch, which preflights discovery for every member and returns outcomes in input order. These adapters invoke batch members in order through synchronous host callbacks.

Use result_policy("data") on Python, Rust, and C++ tool builders, WithResultPolicy("data") in Go, or resultPolicy("data") in Java when the result can be consumed deterministically. Custom runtimes retain their own execution behavior.

Enforced Observation Boundaries (TypeScript)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2,957
Repository forks
194
7-day trend score
40

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ax-llm/ax/ax-agent-rlm/badge)](https://verified-skill.com/skills/ax-llm/ax/ax-agent-rlm)

Something wrong with this skill or its page? Tell us.