DEV Community

Cover image for Building an AI Agent for Django with Zero-Token AST Intelligence: My 8-Month Journey
VebGen Official
VebGen Official

Posted on

Building an AI Agent for Django with Zero-Token AST Intelligence: My 8-Month Journey

Building an AI Agent for Django with Zero-Token AST Intelligence

I'm Ramesh, a 20-year-old self-taught developer from India. I spent 8 months building VebGen - an AI agent for Django that works on free-tier APIs.

The Problem

Cursor and Copilot are great, but they're expensive. Every code analysis sends your entire codebase to an LLM, burning through API tokens fast.

I had limited internet (9 AM-7 PM at my cousin's house) and zero budget. I needed something that works on free-tier APIs.

The Solution: Zero-Token AST Parsing

VebGen uses Python's ast module to understand Django code locally - without consuming any API tokens.

When you ask "add user authentication":

  1. Parses project structure via AST (zero tokens!)
  2. Identifies 5 relevant files
  3. Only sends those to the LLM (not all 50!)

Result: Works on free-tier Gemini/OpenRouter!

Architecture

Dual-agent system:

  • TARS: Plans features, breaks down complexity
  • CASE: Executes code changes, self-heals bugs

Plus:

  • Multi-tier patching (3 fallback methods)
  • 2,700 lines of security code
  • 5 rolling backups
  • Built-in Django code review

The Stats

After 8 months:

  • 500KB Python code
  • 319 tests (99.7% passing)
  • 95+ Django constructs parsed
  • $0 spent

What I Learned

Technical:

  • AST parsing is powerful for code intelligence
  • Multi-tier fallbacks are essential
  • Security requires paranoia

Personal:

  • You don't need a degree
  • Limited internet forced better planning
  • Launching is scary but necessary

Try It

GitHub: https://github.com/vebgenofficial/vebgen
git clone https://github.com/vebgenofficial/vebgen.git
cd vebgen
pip install -e .
vebgen

Requirements: Python 3.10+, Free API key

Questions

  1. Is AST parsing the right approach?
  2. What frameworks next? (Flask, FastAPI, React?)
  3. Any security concerns I missed?

Feedback welcome! First major open source project.

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.