This is the architecture of a typical AI Agent. There is a user operating the agent in order to get his/her task done. There is some local state which the agent can read and write. The agent itself has the following components:
- The control loop or the agentic loop allows the user to interact with agent. It also orchestrates the complete user interaction flow. Along with this it also handles compaction behaviour, hooks, etc.
- The system prompt, other prompts and skills comprise the instructions and code needed for the agent to work.
- Together the above two sets of components can be called the “harness”.
- Code sandbox allows execution of code generated by the LLM. Tools allow various kinds of processing. MCP server and client allow connecting to various sources of data.