Easy Agent banner
zcaceres zcaceres

Easy Agent

AI community

Description

A very easy framework to make and use tool-wielding AI Agents in Typescript

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

easy-agent

![easy-agent logo](logo.jpg)

![NPM Version](https://img.shields.io/npm/v/easy-agent)

What?

A very simple Typescript framework to build tool-wielding AI Agents.

`easy-agent` is a powerful, lightweight TypeScript framework designed for building AI agents with tool-use capabilities and prompt-caching. It supports Anthropic's Claude family of models.

Why?

  • Simple: There's too much plumbing and setup in vanilla AI SDKs. You spend more time parsing JSON than iterating on your agent.
  • Typescript First: TS > Python if you're already working in web apps.
  • Minimal: You only need two concepts to make an awesome AI Agent: Agents and Tools. This package hides everything else and focuses on a good experience with those two concepts.

Features

  • Hides configuration and plumbing behind two simple typesafe Agent and Tool classes.
  • Start making a custom Agent with one function call in one file: start-here.ts.
  • Sensible defaults which you can easily override
  • Automatically handles the tool request/response cycle
  • Supports message & stream modes
  • Vigorous type-safety
  • A few fun pre-baked Agents
  • Use Agents in either CLI and Server Modes
  • Prompt caching support

Setup

Make sure you have an ANTHROPIC_API_KEY key in your environment.

Install:

bun install

Run:

bun start

Usage

You can use `easy-agent` as project boilerplate or as a library.

Using As Project Boilerplate

Starting in CLI Mode

See `example.cli.ts` for a typical project setup in CLI Mode.

CLI Mode allows you to interact with your agents in a simple command-line interface.

Start it with `bun run start` or `bun run cli`.

Starting in Server Mode

Server Mode runs an Express server, allowing interaction with agents via HTTP requests.

See `example.server.ts` for a typical project setup in Server Mode.

  1. Start the server:

    bun run server
  2. The server will start on `http://localhost:3000`.