This project is an automation agent that executes plain-English tasks by leveraging a Large Language Model (LLM). The agent processes log files, reports, and other structured/unstructured data to automate routine tasks within the Continuous Integration (CI) pipeline of DataWorks Solutions. The agent exposes an API that enables users to run specific tasks and retrieve output files.
- Supports multiple deterministic and non-deterministic automation tasks.
- Integrates an LLM (GPT-4o-Mini) for task interpretation and execution.
- Provides API endpoints to execute tasks and read output files.
- Ensures security by restricting data access to the
/datadirectory and preventing file deletion. - Packaged as a Docker image for easy deployment.
Endpoint: POST /run?task=<task description>
Description: Executes a plain-English task by parsing and performing the required steps.
- Success (200 OK): Task executed successfully.
- Client Error (400 Bad Request): Invalid task description.
- Server Error (500 Internal Server Error): Internal error in execution.
Endpoint: GET /read?path=<file path>
Description: Retrieves the content of the specified file.
- Success (200 OK): Returns the file content.
- Not Found (404 Not Found): File does not exist.
- A1: Install
uv(if required) and rundatagen.pywithuser.emailas an argument. - A2: Format
/data/format.mdusingprettier@3.4.2. - A3: Count the number of Wednesdays in
/data/dates.txtand write to/data/dates-wednesdays.txt. - A4: Sort contacts in
/data/contacts.jsonbylast_nameandfirst_name. - A5: Extract the first line from the 10 most recent
.logfiles in/data/logs/. - A6: Index Markdown files in
/data/docs/by extracting H1 titles. - A7: Extract sender’s email address from
/data/email.txtusing an LLM. - A8: Extract credit card number from
/data/credit-card.pngusing an LLM. - A9: Find the most similar pair of comments in
/data/comments.txtusing embeddings. - A10: Calculate total sales for "Gold" ticket type from
/data/ticket-sales.db.
- Clone the repository:
git clone https://github.com/mohitrajrathor/AutoLLM-Agent.git cd AutoLLM-Agent - Install dependencies:
pip install -r requirements.txt
- Run the application:
python main.py
- Set the environment variable for AI Proxy:
export AIPROXY_TOKEN=your-token-here - Run the application with Docker:
docker run --rm -e AIPROXY_TOKEN=$AIPROXY_TOKEN -p 8000:8000 user-name/repo-name
This project is licensed under the MIT License - see the LICENSE file for details.