This repository contains an AI coding agent that can interact with the file system and execute Python code restricted to the directory set by a hardcoded constant WORKING_DIRECTORY variable.
Follow the steps below to install and run the AI Coding Agent.
uv is a fast Python package manager and build tool.
If you don't have it installed yet, run:
Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"git clone https://github.com/HunterX405/agentic-coding-ai
cd agentic-coding-aiSimply run:
uv syncThis will:
- Create a
.venvvirtual environment - Install all project dependencies
- Ensure the correct Python version is installed (based on
pyproject.toml)
You can run the project without manually activating the environment:
uv run main.py "Message prompt" [--verbose]Or activate the environment manually:
Linux/macOS
source .venv/bin/activateWindows
.\.venv\Scripts\activateThen run:
python main.py "Message prompt" [--verbose]This is the main entry point for the AI coding agent. It handles user prompts, interacts with the Gemini API, manages the conversation history, and calls various tools (functions) based on the AI's decisions. It also includes argument parsing for user input and verbose output.
This file defines the SYSTEM_PROMPT which provides the initial instructions and context for the AI agent, guiding its behavior and capabilities.
This file contains a suite of test cases for the functions available to the AI agent. It demonstrates how to use the run_python_file, write_file, get_file_content, and get_files_info functions by attempting various operations, including valid and invalid file interactions.
This directory contains a separate calculator application. It has its own main.py for the calculator's logic, tests.py for testing the calculator, and a README.md describing the calculator project.
This directory holds the implementations of the tools (functions) that the AI agent can call. These functions include:
get_files_info: To list files and directories.get_file_content: To read the content of files.run_python_file: To execute Python scripts.write_file: To create or overwrite files.