Skip to content

Jawahars07/webforge

Repository files navigation

WebForge 🛠️

An AI agent that generates and deploys complete websites from a one-line brief — driven through a Telegram bot.

Send a brief over Telegram → get back a live, deployed website.

How it works

A staged, multi-model pipeline built on the Anthropic API:

brief ──▶ expand_brief (Claude Haiku)  ──▶  generate_website (Claude Sonnet, cached)  ──▶  deploy (Playwright/Surge)
  1. Expand brief — Claude Haiku turns a short brief into a full creative spec (cheap, fast).
  2. Generate — Claude Sonnet generates the full site. The large static prompt is sent with cache_control.
  3. Deploy — the generated site is shipped live.

Why it's built this way

  • Right model for each job — Haiku for cheap expansion, Sonnet for heavy generation.
  • Prompt caching — large static prompts are marked ephemeral → ~70–90% input-token savings on repeated calls.
  • Agentic structure — an orchestrator coordinating tools (scraper, deployer), prompt files, and usage tracking.

Stack

Python · anthropic · python-telegram-bot · playwright · python-dotenv

webforge/
├── bot.py            # Telegram interface
├── orchestrator.py   # the pipeline
├── config.py         # env-based config (no secrets in code)
├── prompts/          # generate.md, expand_brief.md
├── tools/            # scraper.py, deployer.py
└── usage.py          # token/cost tracking

Run it

pip install -r requirements.txt
playwright install
cp .env.example .env        # then fill in your keys
python bot.py

Configuration

Copy .env.example.env and set:

Var Purpose
TELEGRAM_TOKEN bot token from BotFather
ANTHROPIC_API_KEY your Anthropic API key
SURGE_TOKEN optional — leave empty if logged in via Surge CLI

🔒 .env is git-ignored. Never commit real keys. See SECURITY.md.


Built by Jawahar Naidu.

About

AI agent that generates & deploys websites from a one-line brief — Claude Haiku→Sonnet pipeline with prompt caching, via Telegram.

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages