Faithful Agent is an experiment exploring how we could make an LLM model smarter by harnessing the power of a language's Language Server Protocol (LSP). It's a test to see how far we can push the boundaries of intelligent planning and execution.
- Interpretability: The model generates plans that are not only actionable but also easily readable. This ensures that every step of the plan is transparent and understandable, enhancing trust in the agent's decision-making process.
- Reliable Execution: The agent is committed to executing the plan as formulated, reflecting the project's dedication to dependability.
- TypeScript for Formal Verification: TypeScript is key in thoroughly evaluating plans before they're put into action, ensuring high-quality execution.
TypeScript is chosen for its strict type system, offering a level of formal verification that's hard to achieve with more flexible languages like Python. This robustness is vital in ensuring plan accuracy and reliability.
- Plan Generation: The model, specifically OpenHermes2.5, initiates the planning process.
- Verification: TypeScript rigorously checks the plan for errors and inconsistencies.
- Iterative Improvement: If any issues arise, the plan is revised until it meets all criteria.
- Execution: The agent, along with any sub-agents it creates, begins executing the validated plan.
Try executing a task such as:
Fix the file main.js and write the fixed code to main_fixed.js
The model will generate a plan which you can execute. Notice the plan includes spawning another Agent in this case.
The project utilizes the OpenHermes2.5 model, because it's the smallest (7B!) model I could find that is remotely good enough for experimenting with agents. I tested using both Ollama and Replicate.com.
Thanks @Teknium1, Mistral.ai.
-
Prerequisites: The easiest way to run it is with Bun but you can also use
ts-node
. -
Clone and Install:
git clone https://github.com/salamanderXing/faithful-agent cd faithful-agent bun install
-
Start Ollama (optional):
ollama serve
-
Run Faithful Agent
bun start
It will prompt you first what is its task and then again to confirm each plan before execution.
Your contributions and feedback are highly valued. If you're building upon this project, please acknowledge "Faithful Agent".
Faithful Agent is under heavy development and still unstable. Some near-term experiments include
- fixing bugs
- extensive tests
- improve docs
- testing it with larger models
If you're using or referencing Faithful Agent in your work, please use the following citation format:
Zani, G. (2023). Faithful Agent: TypeScript-powered AI planning and execution [Computer software]. GitHub. https://github.com/salamanderXing/faithful-agent
For any inquiries or collaboration interests, please refer to the contact information provided on my GitHub page.