Skip to content
will4shortPublic

About

A simple autonomous coding agent built from first principles in Python that can inspect, edit, run, and verify code using tool-calling AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Agent 002 — Coding Agent

A small autonomous coding agent built from first principles in Python using the OpenAI Responses API.

What it can do

Agent 002 accepts a coding goal and autonomously decides which tools to use to complete it.

Its current tools are:

  • list_files — inspect the project workspace
  • read_file — read source code
  • write_file — modify source code
  • run_python — execute Python files and observe the result

Agent Loop

The core architecture is:

Goal → Decide → Act → Observe → Decide Again → Complete

For example:

User goal:

Find the bug, fix it, and verify that the fix works.

Agent 002 can autonomously perform:

  1. List project files
  2. Choose a relevant file
  3. Read its source code
  4. Identify a bug
  5. Modify the code
  6. Execute the program
  7. Observe stdout, stderr, and the return code
  8. Decide whether the task is complete

The sequence is not hard-coded. The model chooses tools based on the goal and observations it receives.

Safety Boundaries

Agent 002 includes several basic controls:

  • File access restricted to the configured workspace
  • Python-only execution
  • 10-second execution timeout
  • Maximum 10-step agent loop
  • API key stored outside source code using .env

Example

Given a program containing:

return total / 0

About

A simple autonomous coding agent built from first principles in Python that can inspect, edit, run, and verify code using tool-calling AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages