Lemon Agent is a standalone, supervised Plan-and-Solve agent based on the ACL 2023 paper "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models," designed to enable accurate, reliable, and reproducible workflow automation.
Purpose: To let users interact with tools such as Airtable, HubSpot, Discord, Notion, GitHub, and others through natural language, and to build powerful workflow automation so that LLMs can reliably perform read and write operations.
Key capabilities:
- Task separation and human-in-the-loop: Lemon Agent includes a Planner Agent and a Solver Agent to keep the agent focused and improve accuracy; it requests user approval during relevant workflow steps to ensure the intended actions are performed.
- Unlimited configuration options: It provides unlimited configuration options when defining workflows, such as requiring permission before executing a workflow step, or having the model tell a joke each time it executes a step.
- UI flexibility: You can build any UI on top of it, or interact with Lemon Agent through the built-in CLI.
- Model- and framework-agnostic operation (coming soon): Lemon Agent is a standalone agent, but it can be easily integrated into frameworks such as LangChain and used with any model.
- Analytics visualization: Through analytics visualization, you can better understand tool usage frequency and order, thereby identifying weaknesses in the agent's decision-making ability and achieving more deterministic behavior through further configuration of Lemon Agent workflows (an .html file that runs without additional installation).
How to use:
- Architecture: A session is initiated by the user, who chats directly with the Planner Agent through the UI to define how to solve a given task; once the solution is defined, the Planner Agent communicates with the Solver Agent, and the Solver Agent uses the multiple tools available to Lemon Agent to execute the given workflow step.
- Quick start:
- Prerequisites: Node.js 18.x or above; the example requires an OpenAI API key and a GitHub personal access token; clone the repository locally and open it in an IDE. In this projectclone it locally, and run in the project root directory
pnpm i. - Start Lemon Agent: In the project root directory, run
cp .env.example .env.developmentto create a new environment file; store your OpenAI (as AUTH_TOKEN_OPENAI) and GitHub (as AUTH_TOKEN_GITHUB) authentication tokens in.env.development. - Unix and Unix-like systems: In the project root directory, run
pnpm exec turbo devto start. If that does not work, in the root directory runpnpm exec turbo build, thencd apps/clito enter the CLI client, and finally runpnpm run dev. - Windows: In the project root directory, run
pnpm exec turbo dev-winto start. If that does not work, in the root directory runpnpm exec turbo build, thencd apps/clito enter the CLI client, and finally runpnpm run dev-win. - At this point, Lemon Agent should already be running and waiting for tasks.
- Prerequisites: Node.js 18.x or above; the example requires an OpenAI API key and a GitHub personal access token; clone the repository locally and open it in an IDE. In this projectclone it locally, and run in the project root directory
- Simple example: Similar to OpenAI functions, Lemon Agent provides the option to define workflows as reusable functions. It can be defined in
data/workflow.jsonto define and configure any workflow, including different tools and adding additional fields to further configure the workflow. For example,userPermissionRequiredThe field is interpreted by the model as a precondition for execution, asking the user whether to execute the workflow step. To run the above workflow, simply tell Lemon Agent "get information about a repository", and then approve with "yes, do this for the repository lemon-agent and the owner felixbrock".
Use cases: Workflow automation scenarios that require reliable read and write operations between LLMs and tools such as Airtable, HubSpot, Discord, Notion, GitHub, etc.
Limitations: This repository is currently not actively maintained and unexpected issues may occur. There are more than 120 supported tools, covering services such as Google Calendar, Google Cloud Realtime Database, etc.
Additional information: Contributions are welcome. For more information, see CONTRIBUTING.md. If you have questions, you can contact us via Discord.