Skip to content

initialcapacity/agent-orange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Orange 🤖🍊

An AI coding agent that builds applications from natural language requirements. Built for the IC Hackathon 2026 🏆

What is Agent Orange? 🎯

Agent Orange is a mini version of Claude Code that uses OpenAI's Responses API with gpt-5-mini to autonomously:

  • ✍️ Write code files
  • 🖥️ Execute shell commands
  • 📦 Install dependencies
  • 🧪 Run tests
  • 🔄 Iterate on errors
  • 🚀 Build complete full-stack applications

Setup ⚙️

  1. Install dependencies:
uv sync
  1. Add your OpenAI API key:
echo 'export OPENAI_API_KEY=your_key_here' > .env
source .env

Usage 💻

Clean Mode (Start Fresh) 🆕

uv run -m agent_orange --clean "your requirements here"

Iterative Mode (Build on Existing Code) 🔧

uv run -m agent_orange "add a new feature"
uv run -m agent_orange "fix the validation error"
uv run -m agent_orange "add dark mode"

Hackathon Challenge: Todo Application 📝

Use this prompt to build the complete todo app for the hackathon:

uv run -m agent_orange --clean "Build a todo application with FastAPI backend and HTML/CSS/JS frontend. Core Features: user can create, view, update, delete, complete todos, view completed todos, mark completed as incomplete. Authentication: sign in, sign out, users cannot see other users todos. Collaboration: share todos with other users. Organization: reorder todos with drag and drop. Bonus Features: 1) AI-powered feature using OpenAI API for smart suggestions or natural language processing 2) productivity enhancement like time tracking, analytics dashboard, or habit streaks 3) delightful UX with animations, emoji reactions, and personality. Technical: FastAPI app factory, SQLite, domain-driven architecture, unittest tests, make sure app runs without errors."

What this will build:

  • ✅ Full CRUD for todos
  • 🔐 User authentication and isolation
  • 🤝 Todo sharing between users
  • 🔄 Drag and drop reordering
  • 🤖 AI-powered smart features
  • 📊 Productivity tracking
  • 🎨 Delightful, colorful UI with personality

Running the Generated App 🏃

cd output
uv run -m app

Then open http://localhost:8000 in your browser 🌐

How It Works ⚡

graph TD
    A[👤 User Input<br/>Requirements] --> B{🗂️ Existing Code?}
    B -->|Yes| C[📚 Read Files<br/>Build Context]
    B -->|No| D[🆕 Fresh Start]
    C --> E[🧠 Agent Core<br/>gpt-5-mini]
    D --> E

    E --> F{🤔 Next Action?}

    F -->|Write Code| G[✍️ write_file]
    F -->|Read Code| H[📖 read_file]
    F -->|List Files| I[📋 list_files]
    F -->|Run Command| J[🖥️ run_command]
    F -->|Done| K[✅ Complete]

    G --> L[💾 Save to output/]
    H --> M[📄 Return Content]
    I --> N[📂 Return File List]
    J --> O[⚙️ Execute & Capture]

    L --> P{🧪 Test Results}
    M --> E
    N --> E
    O --> P

    P -->|❌ Errors| Q[🔍 Analyze Error]
    P -->|✅ Success| E
    Q --> E

    K --> R[🎉 Generated App<br/>in output/]

    style A fill:#e1f5ff
    style E fill:#fff3cd
    style K fill:#d4edda
    style R fill:#d1ecf1
    style P fill:#f8d7da
Loading

The Agent Loop:

  1. 🧠 Agent Core - Uses OpenAI Responses API with tool calling
  2. 🛠️ Tools - File operations (write, read, list, append) and command execution
  3. 🔁 Iterative Loop - Agent plans, codes, tests, and fixes errors autonomously
  4. 📚 Context Aware - Reads existing code before making changes in iterative mode

Examples 💡

Start a New Project 🎨

uv run -m agent_orange --clean "build a simple blog with user authentication"

Improve Existing Code 🔨

uv run -m agent_orange "add input validation to all forms"
uv run -m agent_orange "fix the CORS error on the API"
uv run -m agent_orange "add rate limiting to prevent abuse"

Add Features ✨

uv run -m agent_orange "add a search feature that filters todos by title"
uv run -m agent_orange "implement todo tags and filtering by tag"
uv run -m agent_orange "add due dates with calendar picker"

Tips for Best Results 💯

  1. 🎯 Be specific - "Add dark mode with toggle button" vs "make it look better"
  2. 🎪 One thing at a time - Iterative mode works best with focused requests
  3. 🧪 Let it test - The agent will run commands to verify code works
  4. 🔄 Fix errors iteratively - If something breaks, ask the agent to fix it
  5. 👀 Review the output - Check output/ directory to see what was built

Architecture 🏗️

agent-orange/
├── agent_orange/
│   ├── __init__.py
│   ├── __main__.py      # CLI entry point
│   ├── agent.py         # Core agent logic with OpenAI Responses API
│   └── tools.py         # File and command execution tools
├── output/              # Generated applications go here
├── pyproject.toml
└── README.md

Hackathon Scoring 🏆

Your agent will be scored on:

  • ✅ Feature completeness (all core features work)
  • 💎 Code quality (follows best practices, well-organized)
  • 🔒 Authentication & privacy (proper user isolation)
  • 🎨 UX/UI (clean, functional interface)
  • 🌟 Bonus features (creativity and implementation)
  • 🧪 Testing (app runs without errors)

License 📄

MIT


Made with 🤖 and ☕ for IC Hackathon 2026

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages