-
Notifications
You must be signed in to change notification settings - Fork 656
Description
The current "agents" in this repository function primarily as single-call LLM wrappers. This proposal outlines three key enhancements to introduce more complex, autonomous, and stateful agentic behavior, moving beyond the current linear execution model.
- Implement a True Agentic Loop (ReAct Agent)
Problem: Agents currently lack a continuous reasoning loop. They process an input once and return, without the ability to iteratively use tools or reason through multi-step problems.
Recommendation: Introduce a ReActAgent wrapper that implements a "Reason-Act" cycle.
How it works: An LLM "brain" (like AnthropicAgent) is guided by a system prompt to Think about a problem, decide on an Action (like a tool call), and then process the Observation (the tool's result) to continue the loop until a final answer is reached.
Benefit: Enables agents to autonomously handle complex tasks that require multiple steps and tool interactions.
- Introduce a Planner Agent with Filesystem Integration
Problem: The framework lacks a mechanism for long-term planning and task tracking. Complex workflows cannot be easily managed, and state is not persisted.
Recommendation: Create a PlannerAgent that uses the filesystem to manage a task list.
How it works:
The PlannerAgent receives a high-level goal and generates a todo.md file with a checklist of sub-tasks.
It delegates each sub-task to a specialized "worker" agent.
Upon completion, the worker agent updates the todo.md file (e.g., - [x] Research topic A).
The PlannerAgent reads the plan to determine the next step, creating a persistent and auditable workflow.
Benefit: Allows the system to handle complex, multi-step projects and recover state, acting as an automated project manager.
- Enable Agent-Specific Context via Filesystem
Problem: Passing the entire conversation history to every agent in a chain clogs the context window, increases costs, and provides irrelevant information to specialized agents.
Recommendation: Equip agents with filesystem tools (read_file, write_file) to manage their own private, persistent context.
How it works: An agent can write its detailed findings or intermediate thoughts to a file (e.g., research_notes_for_agent_A.md). Instead of passing this large block of text to the next agent, it can pass a brief summary and the file path. The next agent can choose to read the file only if it needs the extra detail.
Benefit: Drastically reduces context length, saves costs, and allows for more efficient and focused agent collaboration. Each agent maintains its own "scratchpad," sharing information intentionally rather than by default.