I've been hacking on a lightweight TypeScript framework that simplifies the creation and management of tool-wielding AI agents. There's so much boilerplate and plumbing involved in setting up agents, tools, defining input schemas etc. What I want it to just say "Here's an agent! And here's what it can do."
I ended up with a declarative-ish API like this:
import { EasyAgentCLI, Agent } from "easy-agent";
EasyAgentCLI.start([
Agent.create({
name: "MyAgent",
prompt: "I am a helpful assistant that...",
tools: [MyCustomTool],
}),
]);
The mode (CLI) takes in an Agent
which can take in prompts and Tool
s. Each primitive is a straightforward abstraction around that layer.
The above code creates an agent and launches it in CLI mode, ready for interaction with a tool.
I bundled a bunch of sample agents in with the library.
Check out the GitHub repository for full documentation and examples.