How aravind-hub/screenshot2codeagent works
Screenshot2CodeAgent is an ADK pipeline that turns a user-provided webpage screenshot into a clean React/Tailwind component. The root agent orchestrates screenshot analysis, prompt construction, code drafting, and output cleanup, then returns the cleaned code. The README confirms the product goal; the sampled agent source documents the stage order and tool usage. Model calls are shown as external dependencies; no separate persistence or deployment subsystem is present in the provided tree.
Main entry points: agent.py Root agent
Components 7
Pipeline orchestration
- Root agent
my_agent/agent.py
UI analysis
- UI analyst
my_agent/agent.py
Code generation
- Prompt builder
my_agent/agent.py - Code drafter
my_agent/agent.py - Code cleaner
my_agent/agent.py
Other components
- User
- Gemini service
Connections 13
- User → Root agent: submits screenshot
my_agent/agent.py - Root agent → UI analyst: invokes analysis
my_agent/agent.py - UI analyst → Root agent: returns description
my_agent/agent.py - Root agent → Prompt builder: builds prompt
my_agent/agent.py - Prompt builder → Root agent: returns prompt
my_agent/agent.py - Root agent → Code drafter: invokes drafting
my_agent/agent.py - Code drafter → Root agent: returns draft
my_agent/agent.py - Root agent → Code cleaner: cleans draft
my_agent/agent.py - Code cleaner → Root agent: returns clean code
my_agent/agent.py - Root agent → User: returns component
my_agent/agent.py - Root agent → Gemini service: requests generation
my_agent/agent.py - UI analyst → Gemini service: requests analysis
my_agent/agent.py - Code drafter → Gemini service: requests drafting
my_agent/agent.py