Base Harness — AI skill for Claude Code
A minimal, reliable, provider-agnostic AI agent harness in TypeScript — the agentic loop, tools, permissions, memory and verification around an LLM.
How to install Base Harness
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open pedrovelasquez9/base-harness and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Base Harness does
A minimal, reliable, provider-agnostic AI agent harness in TypeScript — the agentic loop, tools, permissions, memory and verification around an LLM. Works with the Anthropic API or a local, free model via Ollama.
Alternatives in AI
- Anthropic SDK TypeScript — Access to Anthropic's safety-first language model APIs in TypeScript 2.1k ★
- My Free Code — Open-source multi-provider AI gateway for Claude Code and other coding agents, with model routing, streaming 633 ★
- Unreal Agent Harness — AI agents building cities in Unreal Engine 5.8 via the Unreal MCP — free City Sample base + PCG + custom Blend 194 ★
README
base-harness
A minimal, reliable, **provider-agnostic AI agent harness** in TypeScript.
The language model is just the "brain". Everything that makes it useful — memory, tools, permissions and a verification loop that doesn't call anything _done_ until the tests pass — is the **harness** you build around it. This repo is a small, readable, didactic implementation of exactly that, meant to be read end to end.
It runs against the **Anthropic API** or a **local, free model via Ollama** by editing a single file. It ships with the local (Ollama) option active, so you can try it with no API key and no cost.
Didactic base, not a production tool. See [Limitations](#limitations).
What's inside
- The agentic loop (
runAgent) — the ReAct cycle: send context + tools → the model decides → the harness runs the tool → observe → repeat until the model is done. An agent is just model + harness. - Tool registry — one place where every tool registers its schema (what the model sees) and its handler (what runs). Importing the barrel wires them up.
- File and terminal tools — read / write / edit files, and run shell commands.
- Guardrails — a workspace path guard (the agent can't escape
./workspace) and a permission guard that blocks destructive commands and asks a human to confirm. Whatever the agent reads is treated as data, never as instructions. - Memory — working memory trimmed to fit the context window, plus
cross-session progress persisted to disk (
PROGRESS.md). - System prompt from the repo — the agent's rules live in
AGENTS.md, not in a buried constant. - Verification — the source of truth is running the tests, not the model's word. A layered ladder (unit → integration → E2E) stops at the first red layer.
- Feature list (WIP=1), maker-checker graph, observability (a JSONL event stream) and a clean session handoff.
Requirements
- Node.js 20+ (uses the built-in test runner and
tsx). - O
Related Skills
Typed Agent Service
Typed AI agent service (TypeScript): Zod 4 tool schemas as the single source of truth (runtime validation, inf
Agent Runtime
Provider-agnostic LLM agent loop for Node: bounded tool calling with validated inputs, token-budget memory, tr
Agent Rs
Pure-Rust async runtime for LLM agents. Multi-provider (Anthropic/OpenAI/Ollama), tool-capable end-to-end, str
Agent Starter Kit
A minimal, working Claude-powered AI agent, structured to stay maintainable as tools, memory, APIs, and tests
Machine Forensics Loop
Troubleshooting memory for AI coding agents: a persistent, per-machine knowledge base of what broke, what fixe
Recovery Classification
Enforces Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. After any failure in the verifi
Related Agents
Merchandiser
Owns BlushTip's product line and launch calendar: sets and bundles, the price ladder around the $50 free-shipp
Pi Implementer
Implementation lane driven by the pi CLI (a local multi-provider coding agent, distinct from omp). Model-agnos
LLM Expert
Use this agent for AI SDK integration, LLM provider configuration, prompt template management, error handling