Lab

This is a working notebook of experiments, models, and observations.


Agents as Instructions you can Afford to Forget

Agents are Instructions you can afford to Forget

What exactly is an Agent anyway? We hear "agentic" and "agent" frequently in media coverage and it's very seldom explained. There's a general sense that an "AI agent" is some kind of AI entity that can act on its own. This makes sense because that's exactly what the etymology of the word means. However, in the case of AI discussions it's a little simpler than that.

Broadly there are maybe three types of digital constructs with respect to AI, but lots of variation within those three types. The model or "weights" is just a bunch of math. You can get an imperfect idea by thinking of it as a big table or spreadsheet, but just the data. The controls at the top of your spreadsheet program are "tools" in the AI world. And the prompt is the final component. "Prompt" is often framed as "what the user types in to the box". You may also hear "prompt" referred to as "context". So when using an AI chatbot, you type a question (prompt) into an input box (tool) and it's interpreted by the math (model). The interpretation spits an answer out and the input box/history (tool) gives the information to the user.

So how do Agents fit into this? They're just a permanently saved version of a prompt (sometimes with a few extra tools like a web browser, calculator or file reader).

You can write a prompt: "Answer like a pirate: How many pieces of eight in a dubloon?" The chatbot will respond something like "Yarr, eight matey" You can also write an agent with the instruction "Answer like a pirate", and then the user enters the prompt: How many pieces of eight in a dubloon?" You'll still get a response like "Yarr, eight matey"

So at its core an agent is a set of instructions you can afford to forget. Once you're positive you want to keep those instructions and apply them to all future prompts, you can set it up as an "Agent" and offload the generic instruction there. That means you don't have to remember to tell the system "Talk like a pirate" every time you type a prompt. It also has the benefit that the "agent instructions" stay top-of-mind for the agent. Your prompt and the chat history are both part of the context that the AI uses to generate/roll the dice on the next token, but if your chat history gets very long there's a lot for the AI to pay attention to. The agent instructions and your current prompt remain at the top of the pile, and whatever else it can afford to pay attention to is secondary to those two.

If you start using more customizable tools you'll find more "instructions" fields similar to "agent instructions", but they all work in a similar way. In storytelling software for instance, you may have "instructions" for the hero, the villain, and "instructions" for the city. If your story is in the city and involves the villain but not the hero, the AI will read the city and the villain instructions, but not the hero instructions. it saves the AI's "attention" for the subject at hand.