An Agent Is Just a Python Object - Introducing Object Oriented Agents
Most agent frameworks split the system across prompt templates, tool schemas, callback code, and workflow graphs. The result is fragile and hard to reason about.
A simpler model is possible. Treat the agent as an ordinary Python object. Its methods are the actions the model can take. Its fields hold state. Its docstrings serve as prompts. Its type annotations act as contracts. Methods whose body is an ellipsis are completed at runtime by an LLM-driven loop. Methods with normal bodies remain ordinary deterministic Python.
