Developer tool

Lemon AI Agent

Delegate specialist agents from your API

Step 1 of 4Create agent — createLemonAgent + lemonTool
app/api/agent/route.ts
import { createLemonAgent, lemonTool, z }

const agent = await createLemonAgent({
  model: 'gpt-4o-mini',
  tools: [lemonTool({ name: 'search_docs', ... })],
});

LemonGrove

orchestrator

research_agent

Research tasks

writer_agent

Writing tasks

SSE stream
Waiting for grove.run()…
Multi-agent delegation from your server—no workflow canvas.
Multi-agent SDKStreaming invokeTool callingnpm install

Why Lemon AI Agent

Plant seeds—don't wire graphs

No workflow canvas

Register specialist agents as tools; LemonGrove delegates—no graph editor or engine lock-in.

API-first

Built for Next.js routes, Express handlers, and background jobs on your server.

Single ESM bundle

One npm install—compiled artifact in node_modules, not a sprawling source tree.

Bundled providers

OpenAI, Anthropic, and Gemini adapters included—your keys, your endpoints.

What you get

Production-shaped agent tooling

Tool-calling loop

Automatic tool rounds with optional step tracing.

LemonGrove specialists

Child agents exposed as tools; orchestrator synthesizes the final answer.

Streaming

Token, tool-start, tool-end, and done chunks for live UIs and SSE.

Structured output

Zod-validated final JSON via built-in formatting tool.

Fallback model

Secondary model if the primary call fails.

Human-in-the-loop

Approve irreversible tools before they run with humanGate.

Quick start

Try it in minutes

npm install lemon-ai-agent
import { createLemonAgent, lemonTool, z } from 'lemon-ai-agent';

const agent = await createLemonAgent({
  model: 'gpt-4o-mini',
  tools: [
    lemonTool({
      name: 'search_docs',
      description: 'Search internal documentation',
      schema: z.object({ query: z.string() }),
      run: async ({ query }) => `Results for: ${query}`,
    }),
  ],
});

const result = await agent.invoke({
  input: 'Summarize what changed in our last release',
});
console.log(result.output);
  • No workflow canvas—LemonGrove coordinates specialists
  • OpenAI, Anthropic, and Gemini bundled
  • Zod-validated structured output
Install from npm

Build with Lemon AI Agent

Questions about integration, partnerships, or custom engineering?