AgentLite Is A Lightweight Framework for Building AI Agents

OpenSourced By Salesforce

5 min readSep 23, 2024

--

Some Initial Thoughts

  1. I’ve written extensively on this before, but the core architecture of AI agents is beginning to stabilise. Organisations and developers are converging on what appears to be emerging as best practices.
  2. AI agents are set to expand their capabilities, particularly in areas like visual exploration, web browsing, and integration within mobile operating systems.
  3. Salesforce seems to be making a strong push to highlight its advancements in AI agent research, particularly focusing on Large Action Models and their development frameworks.
  4. Comparing development frameworks is inherently challenging, as it depends heavily on specific use cases, the expertise within an organisation, and the preferences of the technical teams involved.
  5. A trend I’ve noticed, particularly with companies like Microsoft (Autogen & Bot Framework Composer), is the open-sourcing of development frameworks as a way to attract builders to their cloud platforms — an understated but effective form of marketing.
  6. Knowledge is power. A solid understanding of existing frameworks and best practices is invaluable in navigating this evolving landscape.

Introduction

Salesforce is making a clear commitment to AI agents. This began with their research and open-sourcing of a family of large action models, and now continues with the release of AgentLite, an open-source framework designed to build AI agents.

The study further highlights a comparison of AgentLite’s features with other agent-building libraries.

The study states that unlike many existing tools, which can be complex or rigid in their agent creation processes, AgentLite simplifies the task, offering flexibility and ease of customisation for researchers developing new agent reasoning types and architectures.

Criticism of LangChain

The study also states that LangChain is a popular library for developing applications with large language models (LLMs), offering built-in tools to create various agent types.

But says it tends to be overly complex for researchers who want to design new types of agent reasoning and architectures. Modifying LangChain for specific research needs can be difficult due to the high overhead in agent creation.

While Autogen has succeeded in building LLM agents, its agent interfaces have fixed reasoning types, making it hard to adapt for other research tasks. Additionally, its architecture is limited to multi-agent conversation and code execution, which may not fit all new scenarios or benchmarks.

Below is a recorded demonstration of the AgentLite User Interface…

Source

AgentLite Individual Agent

In AgentLite, the Individual Agent serves as the foundational agent class, built on four core modules:

  1. PromptGen,
  2. Actions,
  3. LLM, and
  4. Memory

PromptGen

PromptGen is responsible for constructing the prompts that the agent sends to the LLM to generate actions.

These prompts are made up of several components, such as the agent’s role description, instructions, constraints, actions, and relevant examples.

AgentLite includes default methods to combine these elements but also provides flexibility for developers to create custom prompts for specific tasks.

Actions

Actions represent the tasks that an agent can autonomously perform.

AgentLite includes a BaseAction class that developers can extend to define custom actions, allowing agents to perform various automated tasks seamlessly.

This modular design ensures that researchers can easily build, customize, and extend their agents to fit specific needs.

LLM

The framework includes a BaseLLM wrapper class, which takes an input string and returns the corresponding output generated by the LLM.

Memory

The Memory module stores the agent’s past actions and observations.

During execution, the agent retrieves its action-observation history, which is then fed into the PromptGen module to help generate the next action.

All actions and their resulting observations are saved immediately in memory, allowing the agent to reference its previous decisions during ongoing tasks.

✨ ✨ Please follow me on LinkedIn for updates ✨✨

I’m currently the Chief Evangelist @ Kore.ai. I explore and write about all things at the intersection of AI & language; ranging from Language Models, AI Agents, Agentic Applications, Development Frameworks, Data-Centric Productivity Suites & more…

LinkedIn

--

--