Lemon Agent helps you build powerful AI assistants in minutes and automate workflows by allowing for accurate and reliable read and write operations in tools likeSee full docs here. Most connectors available today are focused on read-only operations, limiting the potential of LLMs. Agents, on the other hand, have a tendency to hallucinate from time to time due to missing context or instructions. WithAirtable
,Hubspot
,Discord
,Notion
,Slack
andGithub
.
Lemon AI
, it is possible to give your agents access to well-defined APIs for reliable read and write operations. In addition, Lemon AI
functions allow you to further reduce the risk of hallucinations by providing a way to statically define workflows that the model can rely on in case of uncertainty.
Quick Start
The following quick start demonstrates how to use Lemon AI in combination with Agents to automate workflows that involve interaction with internal tooling.1. Install Lemon AI
Requires Python 3.8.1 and above. To use Lemon AI in your Python project runpip install lemonai
This will install the corresponding Lemon AI client which you can then import into your script.
The tool uses Python packages langchain and loguru. In case of any installation errors with Lemon AI, install both packages first and then install the Lemon AI package.
2. Launch the Server
The interaction of your agents and all tools provided by Lemon AI is handled by the Lemon AI Server. To use Lemon AI you need to run the server on your local machine so the Lemon AI Python client can connect to it.3. Use Lemon AI with LangChain
Lemon AI automatically solves given tasks by finding the right combination of relevant tools or uses Lemon AI Functions as an alternative. The following example demonstrates how to retrieve a user from Hackernews and write it to a table in Airtable:(Optional) Define your Lemon AI Functions
Similar to OpenAI functions, Lemon AI provides the option to define workflows as reusable functions. These functions can be defined for use cases where it is especially important to move as close as possible to near-deterministic behavior. Specific workflows can be defined in a separate lemonai.json:Include Lemon AI in your LangChain project
Load API Keys and Access Tokens
To use tools that require authentication, you have to store the corresponding access credentials in your environment in the format"{tool name}_{authentication string}"
where the authentication string is one of [“API_KEY”, “SECRET_KEY”, “SUBSCRIPTION_KEY”, “ACCESS_KEY”] for API keys or [“ACCESS_TOKEN”, “SECRET_TOKEN”] for authentication tokens. Examples are “OPENAI_API_KEY”, “BING_SUBSCRIPTION_KEY”, “AIRTABLE_ACCESS_TOKEN”.
4. Gain transparency on your Agent’s decision making
To gain transparency on how your Agent interacts with Lemon AI tools to solve a given task, all decisions made, tools used and operations performed are written to a locallemonai.log
file. Every time your LLM agent is interacting with the Lemon AI tool stack a corresponding log entry is created.