lemmy

Stale
GitHub TypeScript No License

Description

Lemmy is a lightweight TypeScript library that wraps LLM tool calls into a simple, consistent workflow interface, ideal for rapidly building multi-step agent tasks.

Key Features

  • Lightweight LLM tool wrapper in TypeScript that unifies tool calling across models
  • Multi-step workflows that simplify agent task orchestration
  • Easy to embed with zero dependencies, importable as a library
  • Model-agnostic abstraction that hides differences between LLM providers
  • OpenAI-compatible, supports OpenAI, Anthropic, and other compatible APIs

Use Cases

💡 Quickly add LLM tool calling to TypeScript / Node projects
💡 Use as the scaffold and dependency for small agent projects
💡 Wrap LLM calls behind a unified interface to decouple business code
💡 Run lightweight agent flows in the browser or Deno environment

Quick Start

# Install lemmy
npm install lemmy

# Create a tool
import { Lemmy, tool } from "lemmy"
const agent = new Lemmy({ model: "gpt-4o" })

agent.addTool(tool({
  name: "get_weather",
  description: "Look up the weather for a city",
  run: async ({ city }) => fetch(`https://wttr.in/${city}`).then(r => r.text())
}))

# Let the agent orchestrate
await agent.run("Is Beijing cold today?")

Related Projects