Understand the Tyler agent processing loop
Tyler uses an iterative loop to process messages and execute tools. When agent.go() or go_stream() is called, the system follows these steps:
- Message Processing: Loads the conversation thread, processes attached files, and ensures the system prompt is set.
- Step Execution: Makes an LLM call with current context and processes the response for content and tool calls.
- Tool Execution: If tool calls are present, they are executed in sequence, results are added back to the conversation, and the loop returns to Step Execution if more tools are needed.
- Completion: Saves the final thread state and returns the processed thread and new messages.