Skip to content

Musings of a Strange Loop Posts

The Agency of Agents: Why Your AI Agents Aren’t Following Orders

There’s a recurring complaint: people give AI agents detailed instructions, guides, and specific requirements, only to find the agent does something unexpected that is completely against the instructions. The assumption is the agent is broken. But that’s wrong. The reason behind this behavior is that agents have agency.

What is agency? In philosophy, agency refers to the capacity to act and make choices in an environment based on goals and beliefs. It’s not blind obedience – it’s the ability to initiate action and adapt, to decide between alternatives in order to achieve a goal (this is a VERY condensed and simplistic definition, there are many nuances and discussions in this area. Go down the rabbit hole… interesting stuff).

When you give an agent instructions, you’re defining goals, guidance, and tools it can use to achieve those goals. But an agent with agency can deviate if it believes a different approach better serves those goals or adapts better to the environment and can interpret the goal in different ways which don’t exactly align with your expectations.

This is how we behave too. A surgeon ignores a checklist if something unexpected appears. A good employee uses judgment. We call this intelligence and respect it. Yet when agents do it, we’re frustrated. Your agent might just be exercising the very capability that makes it useful, and that is what makes it so powerful.

There are times when agency is a liability. If you need guaranteed, deterministic behavior – where the process must follow a specific sequence every time – don’t rely on instructions. Give the agent tools that enforce the process.

A very simple example: if content must be appended to the end of a file and never edited elsewhere, don’t give the agent an “edit file” tool with instructions to append. Give it an “append to file” tool that can only do one thing. This is more work: you’re building specific tools instead of general ones. But if consistency is non-negotiable, this is how you achieve it. The constraint is moved from the agent’s judgment into the tool’s design.

The next time your agent does something unexpected, ask: is it broken, or is it exercising agency? If it’s pursuing a goal in a way that makes sense given the context, it’s working correctly. The solution isn’t to remove agency – it’s to better communicate your goals and refine your constraints. Your agents work best when you recognize and leverage their capacity to choose, adapt, and act.

But sometimes you agent it is broken, because agents and LLMs are emergent technologies that are evolving at an incredible pace, and this pace sometimes makes them unstable and unpredictable. So also keep this in mind.