This project is a self-contained system that emulates an LLM operating autonomously: it continuously generates prompts for itself, plans required sub-tasks, executes them, and iterates.
The Autonomous LLM Simulator is designed to simulate an autonomous Large Language Model (LLM) agent. Its core capabilities include:
- Self-Prompting: Generates its own prompts based on an initial objective.
- Task Planning: Creates a plan of tasks to achieve the goal of a prompt.
- Sandboxed Execution: Executes tasks in a simulated environment.
- Iterative Loop: Observes results and continues to self-prompt and execute until a completion condition is met.
- Safe & Observable: Ensures safe execution and provides clear, structured logging.
This project is currently in a mock phase, using a MockLLMClient to simulate LLM interactions without needing an actual API key.
To get a local copy up and running, follow these simple steps.
- Python 3.10+
- Clone the repo
git clone https://github.com/your-org/autonomous-llm-simulator.git cd autonomous-llm-simulator - Create and activate a virtual environment
python -m venv venv source venv/bin/activate - Install dependencies
(Note: Currently, no external dependencies are required for the mock version.)
pip install -r requirements.txt
The simulator is run from the command line. You must provide a high-level objective for the agent to accomplish.
python -m src.cli.run_simulator "Develop a plan to learn a new programming language"objective(required): The high-level objective for the simulator.--max-iterations(optional): The maximum number of tasks to execute. Default:5.--llm-provider(optional): The LLM provider to use. Default:mock.
To run the test suite, use pytest:
pytestThe project is organized as follows:
.
├── docs/ # Documentation and architectural diagrams
├── src/ # Source code
│ ├── cli/ # Command-line interface
│ ├── error_handling/ # Global error handling
│ ├── llms/ # LLM client integrations (currently mock)
│ ├── models/ # Database schemas
│ ├── workflow/ # Core simulation logic
│ └── logger.py # Centralized logging configuration
├── tests/ # Unit and integration tests
├── requirements.txt # Python dependencies
└── README.md # This file
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Project Link: https://github.com/your-org/autonomous-llm-simulator