Skip to content

HunterX405/agentic-coding-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Coding Agent

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.

Getting Started

Follow the steps below to install and run the AI Coding Agent.

1. Install uv (if not already installed)

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 | sh

Windows (PowerShell)

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Clone the repository

git clone https://github.com/HunterX405/agentic-coding-ai
cd agentic-coding-ai

3. Create virtual environment & install dependencies

Simply run:

uv sync

This will:

  • Create a .venv virtual environment
  • Install all project dependencies
  • Ensure the correct Python version is installed (based on pyproject.toml)

4. Run the agent

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/activate

Windows

.\.venv\Scripts\activate

Then run:

python main.py "Message prompt" [--verbose]

Files

main.py

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.

prompts.py

This file defines the SYSTEM_PROMPT which provides the initial instructions and context for the AI agent, guiding its behavior and capabilities.

tests.py

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.

Directories

calculator/

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.

functions/

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages