Loading repository data…
Loading repository data…
ikwukao / repository
An AI-powered coding assistant built with Python, OpenRouter, and the OpenAI SDK. Demonstrates secure tool calling, file system operations, Python execution, and iterative agent workflows inspired by modern AI coding tools like Claude Code and Cursor.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A command-line AI coding assistant built with Python, the OpenAI Python SDK, and OpenRouter. This project demonstrates how modern AI agents such as Claude Code and Cursor work under the hood by combining large language models with secure tool calling.
The agent can inspect project files, read source code, modify files, execute Python programs, and iteratively solve coding tasks while operating within a restricted working directory for safety.
ai_agent/
├── calculator
│ ├── lorem.txt
│ ├── main.py
│ ├── pkg
│ │ ├── calculator.py
│ │ ├── morelorem.txt
│ │ ├── __pycache__
│ │ │ ├── calculator.cpython-313.pyc
│ │ │ └── render.cpython-313.pyc
│ │ └── render.py
│ ├── README.md
│ └── tests.py
├── call_function.py
├── config.py
├── functions
│ ├── get_file_content.py
│ ├── get_files_info.py
│ ├── __pycache__
│ │ ├── get_file_content.cpython-313.pyc
│ │ ├── get_files_info.cpython-313.pyc
│ │ ├── run_python_file.cpython-313.pyc
│ │ └── write_file.cpython-313.pyc
│ ├── run_python_file.py
│ └── write_file.py
├── LICENSE
├── main.py
├── prompts.py
├── __pycache__
│ ├── call_function.cpython-313.pyc
│ ├── config.cpython-313.pyc
│ └── prompts.cpython-313.pyc
├── pyproject.toml
├── README.md
├── test_get_file_content.py
├── test_get_files_info.py
├── test_run_python_file.py
├── test_write_file.py
└── uv.lock
7 directories, 32 files
The agent follows an iterative workflow:
This tool-calling loop enables the agent to inspect code, modify files, execute programs, and verify fixes before responding.
Displays the contents of directories inside the working directory.
get_files_info()
Reads the contents of project files with a configurable maximum character limit.
get_file_content()
Creates or overwrites files while preventing writes outside the allowed project directory.
write_file()
Runs Python scripts with optional command-line arguments and captures both standard output and error output.
run_python_file()
Clone the repository.
git clone https://github.com/ikwukao/ai_agent.git
cd ai_agent
Create a virtual environment.
uv venv
Activate it.
Linux/macOS
source .venv/bin/activate
Windows
.venv\Scripts\activate
Install the dependencies.
uv sync
Create a .env file in the project root.
OPENROUTER_API_KEY="your_api_key_here"
Never commit this file to version control.
Run the agent with a prompt.
uv run main.py "Explain how the calculator renders results."
Enable verbose mode.
uv run main.py "Run the calculator tests." --verbose
Example requests:
List all files in the project.
Read calculator/main.py.
Run the calculator tests.
Create a README file.
Fix the bug where 3 + 7 * 2 returns 20.
The agent is intentionally sandboxed.
It cannot:
These safeguards reduce the risk of accidental or malicious file access while allowing the LLM to operate effectively within the project.
This project demonstrates practical experience with:
This project was built as part of the Boot.dev Backend Developer learning path and is inspired by modern AI coding assistants such as Claude Code, Cursor, and GitHub Copilot.
This project is intended for educational and portfolio purposes.
Watch the AI Coding Agent in action: