Hasty Briefsbeta

Bilingual

Show HN: NanoAgent, zero-dependency 1k-LOC AI-agent runtime

a year ago
  • #LLM
  • #AgentFramework
  • #TypeScript
  • NanoAgent is a micro-framework for running LLM-powered agents in pure TypeScript with zero runtime dependencies outside of bun.
  • It focuses on the control loop, leaving RAG, vector search, databases, and cloud calls to MCP-compatible tools.
  • Key features include pure functions, deterministic stepping, built-in stuck detection, halting reasons, multi-stage workflows, and JSON-Schema tools.
  • NanoAgent supports first-class Bun, provides a tiny MCP server helper, and allows tools to live outside the agent process.
  • It enables RAG anywhere, horizontal scaling, and polyglot tooling without bloating the TS runtime.
  • The package is published as ES 2020 modules with type-definitions included and supports OpenAI and local models like Ollama.
  • Debugging is supported with a debug flag or custom logger.
  • Contributions are welcome under the MIT license, with a focus on maintaining no dependencies.