Agent Runtime — AI skill for Claude Code
Provider-agnostic LLM agent loop for Node: bounded tool calling with validated inputs, token-budget memory, tracing with cost, fallback chains, SSE.
How to install Agent Runtime
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open tientran1234/agent-runtime and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Agent Runtime does
Provider-agnostic LLM agent loop for Node: bounded tool calling with validated inputs, token-budget memory, tracing with cost, fallback chains, SSE. Anthropic adapter on the official SDK; scripted fake for offline tests.
Alternatives in AI
- Axonhub — ⚡️ Open-source AI Gateway — Use any SDK to call 100+ LLMs 3.2k ★
- Vllm Mlx — High-performance OpenAI and Anthropic compatible LLM inference server for Apple Silicon 1.5k ★
- Engage.Scorecard — Calibrate model verdict trust (Wilson-bounded miss-rate) to short-circuit re-validation 348 ★
README
agent-runtime
The part of an LLM agent that is not the model: a bounded tool loop, memory that fits a token budget, a trace of what happened and what it cost, and a fallback chain for when a provider is down. Provider-agnostic by construction — the Anthropic adapter is one file on the official SDK, and a scripted fake runs the whole thing offline in tests.
import { runAgent, defineTool, Tracer, ConsoleExporter } from "agent-runtime";
import { AnthropicProvider } from "agent-runtime/anthropic";
import { z } from "zod";
const getOrder = defineTool({
name: "get_order",
description: "Look up an order by id",
input: z.object({ orderId: z.string() }),
execute: async ({ orderId }) => db.orders.find(orderId),
timeoutMs: 5_000,
});
const result = await runAgent({
provider: new AnthropicProvider({ model: "claude-opus-5", effort: "high" }),
system: "You are a support agent. Use tools; do not guess order details.",
tools: [getOrder],
input: "Where is order ord_42?",
maxIterations: 8,
tracer: new Tracer({ exporters: [new ConsoleExporter()] }),
});
result.status; // "completed" | "max_iterations" | "refused" | "truncated" | "aborted"
result.text; // the final answer
result.usage; // tokens across every model call
What the loop guarantees
- It ends.
maxIterationscaps model calls. A model that never stops calling tools getsstatus: "max_iterations", not an infinite bill. - No tool runs on bad input. Every tool input is validated against its Zod schema first. Invalid input becomes an error result the model can read and correct — not an exception, and not a side effect on garbage.
- No tool runs after a refusal or a truncated turn. A
refusalcan cut atool_useoff mid-input; amax_tokensstop can leave input that parses but is incomplete. Both end the run with a named status. - No tool hangs the agent, and no tool floods the context. Per-tool timeout (default 30 s) and result cap (default 16
Related Skills
Typed Agent Service
Typed AI agent service (TypeScript): Zod 4 tool schemas as the single source of truth (runtime validation, inf
WayFinder Agent
AI-powered microservice that turns trip filters (budget, pacing, vibe, accessibility) into a structured, real-
AI Workforce
Multi-tenant enterprise AI automation platform. Claude-powered agents with tool calling, RAG knowledge bases,
Abs Zalo Bot
ABS Zalo Bot — Zalo channel adapter (Personal QR + Official Account) cho AI agent. Node.js, khong phu thuoc di
Tauri Plugin MCP
Allows AI agents (e.g., Cursor, Claude Code) to debug within Tauri apps via screenshot capture, window managem
Sim Plugin Autodeskfusion
Use AI coding agents with Autodesk Fusion 360 via sim-cli: live-session bridge, model inspection, scripted ope
Related Agents
Browser Testing
Browser automation and testing specialist. Uses playwright-cli (stateful Bash CLI) for deterministic scripted
LLM Integrator
LLM integration specialist who connects to OpenAI/Anthropic/Ollama APIs, designs prompt templates, implements
LLM Provider Compat Reviewer
SkillForge LLM provider 兼容性专项 reviewer。对 skillforge-core/llm/ / ClaudeProvider / OpenAiProvider / ProviderProt