You might not need an AI Framework

You might not need an AI Framework

Say you have a manual, but useful, AI workflow and feel it's time to release it from your local machine and deploy it. "What AI Agent Framework should I use?" is a question often asked, and considering the current trajectory of both software development and AI tech the answer is of course: it depends.

Anthropic has published an excellent post on building effective agents. The post not only illustrates the difference between workflows and agents (and why you probably just need workflows), but also suggests avoiding frameworks. They recommend:

that developers start by using LLM APIs directly: many patterns can be implemented in a few lines of code.

This video discusses the post and raises an important point for experienced developers: the abstractions that frameworks provide can make it harder to understand the basic building blocks of AI application development. To better learn this new development approach, developers might want to avoid tools like AutoGen and LangChain.

This video describing the Atomic Agents framework even goes as far as saying:

LangChain is not made by or for experienced developers.

I like a more minimalist approach that helps me to understand the cause and effect of changes I'm making whether it be model, data or prompt. However, going as bare-bones as the Anthropic article suggests and developing directly against an API still has some drawbacks. Things like switching providers, generating structured responses and implementing retries don't come for free.

Instructor is an approach that focuses on "simplicity, transparency, and control", and the typescript + zod example on its homepage checks a number of boxes for me. Here's a good overview article that argues for instructor over other frameworks.

Photo by Nick Fewings on Unsplash