TapeAgents
TapeAgents: Holistic Framework for Agents
Recently, Andrew NG predicted that the “Future of AI is Agentic”.
Agentic AI refers to a system or program that can autonomously perform tasks on behalf of user or another system by designing its workflow and using available tools. To catch this wave of Agentic AI several frameworks were proposed or implemented such as Langchain, LangGraph, Autogen, CrewAI and Tape agents.
Generally all those available agentic frameworks can be classified into two groups:
-
Developer focused
-
Optimisation driven
Developer focused frameworks are those that help developers quickly build an agent using low code paradigms such as prompt chaining or multi agent teams.
Optimisation driven focus on data driven optimisation of Agent performance with model fine tuning and prompt tuning algorithms.
One framework that galvanise the best of both world is TapeAgents that is developed by Service Now.
What is TapeAgents ?
TapeAgents is a holistic agent framework that supports practitioners at both the agent development and data-driven agent optimization stages, providing a granular, structured log (tape) of the agent session that facilitates all stages of the LLM Agent development lifecycle.
The uniqueness of this framework is that it is built around a granular structured log (Tape)of Agent session that also plays the role of session’s resumable state.
TapeAgents framework provides a unique combination of features, including a resumable, modular state machine with a structured configuration, granular, structured logs, and the ability to transform these logs into training text.
Agents in TapeAgents read the tape to make the LLM prompt and then process the LLM output to append new steps to the tape: thought steps to express reasoning and action steps to request external inputs. The environment then response to the action steps at the end of the tape with observation steps that it like wise append to the tape. The orchestrator invokes the agent and the environment in a alternative fashion and maintains full control over the interactions but can also resume from any intermediate tape, which enable session persistence and step by step debugging.
Also, Tape record the attribution of each step to the respective part of the agent configuration which facilitates training data generation and automatic prompt tuning that is helpful for data driven algorithms
How tape agent is different from other agentic frameworks ?
-
Fine tuning data from sementic level logs (Tapes) : A unique characterstic of TapeAgents framework is using Tape as a sementic level representation of the agent session that the agent can convert into low level training text for LLM fine tuning.
-
Structured log and Agent configuration could be utilise for data driven Optimisation in agents.
-
TapeAgents implements state-machine agent pattern that facilitate it having a well defined state machine for the agent. The advantage of this state machine pattern is that it can resume from frequent state checkpoints and can stop it anytime.
Why use TapeAgents ?
-
Agent Distillation: A larger Teacher agent is utilised to distill a much smaller Student model using a TapeAgents framework.
-
Auditing and debugging: As stated earlier, TapeAgents implement state-machine agent pattern that facilitates auditing and debugging.
To know more about TapeAgents framework refer this technical report : https://rdi.berkeley.edu/llm-agents-mooc/assets/tapeagents.pdf
To Learn more about Agents and Responsible, Trustworthy issues realated with them go through this wonderful MOOC by University of California, Berkeley https://llmagents-learning.org/f24 or this YouTube playlist https://www.youtube.com/@BerkeleyRDI