Agents, agents, better agents…

Image by Aberrant Realities from Pixabay

Introducing smolagents: simple agents that write actions in code.

In the work with generative AI, there is a constant temptation to let the AI take over and do most of the jobs. There are even ways to do that in software engineering, for example by linking the code generation with testing.

In this HuggingFace blog, the authors provide a description of an autonomous agent framework that can automate a lot of tasks. They provide a very nice description of the levels at which these agents operate, here is the table, quoted directly from the blog:

Agency LevelDescriptionHow that’s calledExample Pattern
☆☆☆LLM output has no impact on program flowSimple processorprocess_llm_output(llm_response)
★☆☆LLM output determines basic control flowRouterif llm_decision(): path_a() else: path_b()
★★☆LLM output determines function executionTool callrun_function(llm_chosen_tool, llm_chosen_args)
★★★LLM output controls iteration and program continuationMulti-step Agentwhile llm_should_continue(): execute_next_step()
★★★One agentic workflow can start another agentic workflowMulti-Agentif llm_trigger(): execute_agent()
Source: HuggingFace

I like the model and I’ve definitely done level one and two, maybe parts of level three. With this framework, you can do level three very easily, so I recommend to take a look at that.

Maybe, this will be the topic of the next Hackathon we do at Software Center, who knows… there is one coming up on March 20th.

Author: Miroslaw Staron

I’m professor in Software Engineering at Computer Science and Engineering. I usually blog about interesting articles (for me) and my own reflections on the development of Software Engineering, AI, computer science and automotive software.