- ✅ Decided to build a modular agent runtime in Rust, grounded in the Model-Context-Protocol (MCP) architecture.
- ✅ Intentionally not using LangChain or other agent wrappers; starting from first principles.
- ✅ Defined "Agent" as a composable, protocol-driven unit of autonomy.
- ✅ Committed to slow, thoughtful development in a single-threaded flow.
- ✅ Created project structure and initial trait for Agent.
- ✅ Defined
Model,Context,Plan,SimulationResult,ExecutionResult, andFeedbacktypes. - ✅ Implemented CLI-based main.rs runner.
- ✅ Added tool system:
FakeEchoTool,GitStatusTool,ReflectorTool,LLMTool - ✅ Integrated
ollamasupport for local LLMs. - ✅ Designed and enforced structured memory log with post-run reflection.
- ✅ Enabled pre-commit formatting/lint checks.
- ✅ Refactored folder structure for idiomatic modular Rust.
- ✅ Polished CLI with colored output.
- Trait-based
Agentlifecycle - Pluggable
Tooltrait with metadata - Basic
Context,Memory, andModelmodules - Manual tool registration
- Local LLM tool using Ollama
- Structured
Planwith multi-step execution - Feedback, simulation, and memory logging
- ✅ Color-coded CLI output
- ✅ Introduced LLM-based
PlannerandReplannerwith structured JSON generation - ✅ Added structured plan validation via
src/validation/plan.rs - ✅ Integrated fallback errors when plan parsing fails
- ✅ Display raw, cleaned, and error details in debug logs
- 🔄 Hot-reloading tools or modular tool registration (
fn tools::register_all(context)) - 🧱 Scaffold a lightweight plugin-style tool architecture
- 🔍 Add
--dry-run,--plan-only,--interactiveflags to CLI
- 🧠 Introduce semantic diff parsing and commit generation
- 🗂️ Define and handle user-defined goals
- 🔄 Feedback loop that updates model/goals
- 🧠 Memory queries (
agent.context.memory().query("...")) - 🧩 Dynamic sub-agent spawning
- 🗃️ Workspace-aware file tools (e.g.,
FileReaderTool,CodeSearchTool) - 🧠 Reflect on memory to generate new plans
- 🛠️ Tool scheduler with resource/time limits
- 🤖 Multi-agent runtime (Coordinator + Worker agents)
- 📎 Planning refinement loop (sim → revise → exec)
- 📟 REPL shell / interactive CLI
- 🌐 (Optional) Web dashboard for inspecting plans, logs, memory
- 📊 Metrics, debugging, and agent tracing
- 🧠 Persist memory state (e.g., JSON, SQLite)
- 🧩 Dynamic WASM plugins for portable tools
- 🧠 Swap-in different LLMs (LLaMA, deepseek-r1:7b, Claude, etc.)
- 🧬 Declarative agents / config-driven behavior
- 🪟 Native OS shell extension / terminal companion
- 🧠 Meta-cognition: self-evaluation and planning refinement
- 🌱 Self-hosting: agents building agents
- Identified current limitation: plans are static
- Goal: Add a dynamic
Plannerthat can generate steps using LLMTool and memory context - Integrated
planner.rswith raw+cleaned prompt capture and error logging - Added support for only approved
PlanSteptypes:toolandinfo - Ensured planner instructs LLM not to emit invalid JSON variants
- Introduced
replanner.rsand integrated it intomain.rs - Created
validate_plan()function and helper error types - Hooked validation into both planner and replanner flows
- Improved error reporting for missing inputs, unknown types, and unregistered tools
- Migrated planner/replanner to call
validate_plan(json_plan, tools)before execution - Ensured
serde_json::json!macro used consistently across validation hints - Decoupled validation logic into
src/validation/plan.rsfor reuse - Ready to start refining LLM prompt and plan fidelity based on validation feedback
- Rewrote
planner.rsandreplanner.rsto sanitize LLM output:- Stripped markdown/code blocks (
```,<think>, etc) - Used safe JSON extraction regex (
{"plan": [...]}) - Added structured validation warnings for:
- Unknown tool names
- Missing required fields
- Placeholder detection (e.g.
<file>,$output[...])
- Stripped markdown/code blocks (
- Both planner and replanner now successfully parse clean plans and fallback gracefully if JSON is malformed.
- Validation does not yet block execution — unsafe plans still run.
git diff <file>andgit add <file>fail silently due to unresolved placeholder<file>, but marked as successful because shell did not error fatally.
- The LLM goal was to "create one meaningful commit per file"
- The plan returned hardcoded placeholder values instead of resolving real filenames
- Replanner repeated the same invalid plan
ExecutionResult.success = trueis misleading (did not check stderr or shell return codes)
- Inject
git_statusoutput into memory and planner prompts - Block execution if unsafe placeholders are detected
- Allow validation feedback to influence replanner prompt
- Dynamic tool chaining: use outputs of one tool (e.g., git_status) to expand subplans for each file
- Plan scoring / confidence evaluation
- Tool schema registry with expected inputs, output types, and validation logic
-
Inject git_status into memory:
- Label:
[git_status] - Include in prompt context under
Modified Files:section
- Label:
-
Prevent execution of plans with placeholders:
- If validation errors include
ToolInputMismatchfor placeholder input, block plan execution - Trigger replanner with feedback like: "input contains placeholder like
<file>"
- If validation errors include
-
Improve planner feedback loop:
- Include tool validation messages in memory/context
- Summarize validation and pass to replanner if plan was structurally valid but semantically unsafe