Rafal Zawadzki

Founder of Spell

Next step for AI Agents: introducing the Plan-and-Execute framework

I'm happy to introduce you to one of the recent additions we've made here at Spell: the Plan-and-Execute framework for AI agents.

Consider the approach you take when cooking a meal. You start with a recipe, plan out your steps, gather your ingredients, and then start the actual cooking. It's a methodical process, isn't it? Now, imagine if our AI could function in a similar way - planning ahead and then executing the planned actions. This is precisely the concept behind the newly launched Plan-and-Execute framework.

Picture of app interface

The essence of the Plan-and-Execute framework

All types of AI agents available at Spell until now (eg. AutoGPT), adhered to a step-by-step framework for accomplishing their goals. This means they take actions one step at a time: think, act, think again.

While efficient for straightforward tasks, these 'Action Agents' encounter difficulties when the tasks become more complex or require high reliability. The Plan-and-Execute framework aims to resolve these issues.

The Plan-and-Execute framework, just as its name implies, segregates the planning phase from the execution phase. It's like your daily routine where you first plan your day (perhaps, decide to complete your pending work), and then carry out the plan.

This novel framework is inspired by the innovative BabyAGI project and the Plan-and-Solve paper and is implemented using the amazing LangChain library. Its primary purpose is to enhance the AI agents' functioning.

Decoding the process

It boils down to two key parts: the planner and the executor.

The Planner: This component acts as the operation's intellectual hub. Here, the language model processes your task, reasons, and formulates a plan. The output is a list of steps, akin to a Google Maps route planner.

The Executor: Once the planner completes its work, the executor comes into play. This agent focuses on carrying out the plan, deciding on the necessary plugins to achieve the desired goal.

Technical considerations

This approach has both benefits and downsides. Here are the key takeaways:

  1. Planning and execution are separated, and this leads to improved focus on each stage - which further leads to improved reliability of the agent.
  2. It paves the way for easy replacement or improvement of the subcomponents in the future, similar to a system upgrade.
  3. Although it may require more model calls for completion, it potentially allows for the use of smaller, faster, and more economical models.

Looking forward

The innovative Plan-and-Execute framework is a significant next step in the AI agent space. I am excited that Spell can make this bleeding-edge technology accessible to everyone, with no coding skills required!