TYPESCRIPT AI AGENT FRAMEWORK

Build AI agents.
Not scaffolding.

Decorator-based agents with tools, behaviors, and multi-agent composition.
Works with any LLM — local or cloud.

View on GitHub
agent.ts
@agent({
  name: "researcher",
  llmClient: new OllamaClient("qwen2.5:7b"),
  tools: [new WebTools()],
  behavior: "./researcher.md",
  maxSteps: 6,
})

class Researcher {}

// That's it. Run it.
const result = await runAgent(Researcher, "What's new in AI this week?");

Core Features

ƒ

Decorator-first API

Define agents and tools with @agent and @tool. Zero boilerplate, full type safety.

Multi-agent composition

Use compose() to nest agents as tools. Build orchestrator-executor patterns without custom routing code.

Behavior engine

Define personality in plain Markdown files. Hot-reload in dev. Extend and merge behaviors across agents.

Resilient runtime

Auto-retry with backoff, state persistence, middleware hooks, and streaming support — out of the box.

How it works

SINGLE AGENT
1
User prompt
2
LLM decides action
3
Tool executes
4
LLM synthesizes output
MULTI-AGENT VIA COMPOSE()
1
Orchestrator agent
2
SubAgent A (tool call)
3
SubAgent B (tool call)
4
Aggregated result

Up in 60 seconds.

Works with Ollama locally.

# install
$ npm install typed-agents reflect-metadata zod

# pull a local model
$ ollama pull qwen2.5:7b

# run your first agent
$ npx tsx agent.ts