"An agent is just a white true loop" on a llm with some conditional tool calling if needed be. A simple a
while True: user_input = get_input() response = llm.complete(user_input) if response.wants_tool: result = execute_tool(response.tool_call) response = llm.complete(result) print(response)
A simplest way to think about it is this without the tool call, it just a chatbot and the loop termninates when the chat is closed.
while True: user_input = get_input() response = llm.complete(user_input) print(response)
The tool part makes it interesting because tooling are just function calls. A tool / function to read a file or list a directory, if you just have 4 tools / functions like read, list, update, bash you essentially have a coding agent, that's what Pi is, a minimalistic agent. The fancy stuff around this agent, like the plan mode, subagents, context window, mcp, permissioning, etc makes a harness.
But the most interesting part is you change the tooling with the system prompt for a given agent, for example instead of read, write, list, bash tool you have tools which can do take a location and geocode, and another tool put a pin on the map, you essentially created a map agent. Same thing applies if you do that for 3d visualization or a ai creatives agent, change the tooling / functions and you get the new agent. And the best part this is not some crazy lines of code and basic working one can be just around 200 lines of code. As this article pointed out: https://www.mihaileric.com/The-Emperor-Has-No-Clothes/
I guess I'm trying to define the agent itself to be wider than just the chat loop. The reason is that, when we test agents (not in production yet), the results are extremely varied depending on the model you use, the system context, what the current context holds, etc. So I guess I could replace my agent-definition with agent-harness? I also like the 'production tools' list from the bottom of the emperor has no clothes article. My main goal though remains to be able to express how the agentic system is constructed (be that the harnass, the production tooling or the agent definition) and the actual current state (that is what i defined the agent to be). And then afterwards, be able to reason about what characteristics are good for which types of agentic systems.
I don't know if that makes sense?
llm -> agentic loop -> native agent harness (inner harness) -> user harness (outer harness) -> orchestrator