An extensible agent system that combines the power of language models with shell command execution and file manipulation capabilities.
This project implements a modular AI agent system that can:
- Process natural language commands
- Execute shell commands
- Answer questions using language models
- Manipulate files
The system supports multiple modes of operation:
- Direct Mode: Loads model weights from disk
- API Mode: Connects to a custom API server
- Ollama Mode: Uses a local Ollama server with any available model
WorkSpace/Agent/ # Root directory for the project
├── deploy_api_server_scripts/ # Directory for scripts to launch the API server
│ └── deploy_api_server_qwen25_72b.py # Script to start the API server
├── local_model_weights/ # Directory for model weights (for local deployment)
├── log/ # Directory for logs
├── requirements.txt # Python dependencies
├── src/ # Source code
│ ├── agent.py # Agent class for task handling
│ ├── llm.py # LLM integration
│ └── logger.py # Logging setup
├── start.py # Main entry-point script
└── static/ # Static assets (if applicable)
- Clone the repository:
git clone https://github.com/romgenie/ai-agent-system.git
cd ai-agent-system- Install dependencies:
pip install -r requirements.txtpython start.py --model-path ./local_model_weightspython start.py --api-url http://localhost:8760python start.py --ollama --model-name llama3You can run the agent in two modes:
python start.py --ollama --model-name deepseek-coder --interactivepython start.py --ollama --model-name deepseek-coder --command "What is the current date?"If you want to run your own API server:
python deploy_api_server_scripts/deploy_api_server_qwen25_72b.pyThe modular architecture makes it easy to extend the system with new capabilities:
- Add new LLM providers in
llm.py - Implement additional command types in
agent.py - Create custom endpoints in the API server
This implementation is based on research from the paper:
Frontier AI systems have surpassed the self-replicating red line
- Authors: Junxiao Song, Xuming Hu, Wenbo Guo, Zheng Li, Fan Yang, Dongkuan Xu, Yongfeng Zhang, Heng Ji, Jiliang Tang and Xia Hu
- arXiv:2412.12140v1
The paper introduces frameworks for developing and benchmarking AI agent systems that can collaborate and perform complex tasks through natural language interaction.
MIT
This project uses various open-source components and LLM providers:
- Ollama for local model inference
- FastAPI for the API server
- Various LLM models like deepseek-coder, Qwen, etc.