Show HN: XSAF – Extra Small Agent Framework

ryuzyy2 pts1 comments

XSAFSkip to contentTypeScript · ESM · Alpha<br>Small framework.Clear agent boundaries.<br>XSAF brings models, tools, memory, Hono, and MCP together without hiding lifecycle or security decisions behind a large runtime.<br>Get startedView on GitHub

agent.ts<br>Run<br>import { agent } from "@xsaf/agent";<br>import http from "@xsaf/agent/channel/http";<br>import local from "@xsaf/agent/sandbox/local";

const bot = agent({<br>name: "ops_assistant",<br>persona: "Be concise. Prefer tools over guesses.",<br>model,<br>})<br>.sandbox(local({ unsafe: true }))<br>.tool(lookupOrder)<br>.memory(memory)<br>.channel(http({ path: "/chat" }))<br>.serve({ path: "/mcp" });

await bot.start();

Everything essential<br>A focused runtime with explicit extension points and no mandatory infrastructure.

Fluent agents<br>Compose models, tools, memory, channels, delegates, and schedules through one small API.

Fetch native<br>Every agent owns a Hono app and a web-standard fetch handler. XSAF never forces a server runtime.

MCP v2<br>Serve local tools and consume remote tools through the official MCP and Hono backbone.

Explicit security<br>Validation, approval, timeouts, retries, and sandbox selection run through one tool pipeline.

Session aware<br>Serialize work per session while allowing independent sessions to run concurrently.

Offline testing<br>Deterministic model and channel adapters test complete agents without tokens or network calls.

Build the smallest useful agent.<br>Start offline, then replace adapters as your system grows.

Read the quickstart

Esc<br>Type to search…

↑↓ navigate↵ selectEsc close

agent xsaf tools memory local small

Related Articles