This project provides an intelligent agent capable of dynamically expanding its own abilities by creating and using new tools as needed. It helps users solve problems by reasoning, acting, and adapting its functionalities in real-time, offering a flexible and self-improving problem-solving assistant.
demo.mp4
- Runtime Tool Creation: The agent can dynamically create new Python tools at runtime by generating Python code, saving it to a file, importing it as a module, and registering its entrypoint function for later use. This allows the agent to adapt and extend its capabilities on the fly.
- Dynamic Tool Execution: The agent can execute any registered tool dynamically by its name, passing arguments as needed. This enables the agent to utilize both pre-defined and newly created tools seamlessly within its workflow.
- Dependency Management: The agent includes a tool to install Python packages within its virtual environment. This ensures that any new tools created or used by the agent can have their necessary dependencies met without manual intervention.
- ReAct Agent Loop: The agent operates based on a ReAct (Reasoning and Acting) loop, where it follows a Thought → Action → Observation sequence. This structured approach guides the agent in problem-solving, tool creation, and tool usage.
- LLM Integration (LangChain): The agent leverages LangChain for integrating with Large Language Models (LLMs), specifically ChatOpenAI. This allows the agent to understand natural language prompts, reason about tasks, and generate appropriate actions, including tool creation and usage.
Prerequisites: requires Python >=3.12
Install lir-agent using one of the following methods:
Build from source:
-
Clone the lir-agent repository:
git clone https://github.com/Mawwlle/lir-agent
-
Navigate to the project directory:
cd lir-agent -
Install the project dependencies:
pip install -r requirements.txt
- Report Issues: Submit bugs found or log feature requests for the project.
This project is protected under the MIT License. For more details, refer to the LICENSE file.
If you use this software, please cite it as below.
Mawwlle (2026). lir-agent repository [Computer software]. https://github.com/Mawwlle/lir-agent
@misc{lir-agent,
author = {Mawwlle},
title = {lir-agent repository},
year = {2026},
publisher = {github.com},
journal = {github.com repository},
howpublished = {\url{https://github.com/Mawwlle/lir-agent.git}},
url = {https://github.com/Mawwlle/lir-agent.git}
}