Skip to content

Commit 037aaaf

Browse files
authored
Merge pull request #12 from jhd3197/dev
Specialist Agents, Project Guides & Usage Analytics
2 parents b09e4ab + cc26ccb commit 037aaaf

56 files changed

Lines changed: 3715 additions & 542 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,6 @@ new_templates/
213213
frontend/dist/
214214
frontend/node_modules/
215215

216-
.marketing
216+
.marketing
217+
prompture_cost_tracking.md
218+
prompture_tracking_migration.md

README.md

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/jhd3197/AgentSite)
1111
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/jhd3197/AgentSite)
1212

13-
An AI-powered website builder that uses multi-agent orchestration to generate complete, production-ready websites from a single text prompt.
13+
An AI-powered website builder that uses multi-agent orchestration to generate complete, production-ready websites from a single text prompt. Nine specialized agents — four core and five specialists — collaborate to plan, design, build, and review your site.
1414

1515
**PyPI Package:** [pypi.org/project/agentsite](https://pypi.org/project/agentsite/)
1616

@@ -20,7 +20,7 @@ An AI-powered website builder that uses multi-agent orchestration to generate co
2020

2121
Most AI website builders give you a single LLM call that dumps out a generic template. The result is usually a wall of code with no real structure, inconsistent styling, and no quality checks. You end up spending more time fixing the output than you saved by generating it.
2222

23-
AgentSite takes a different approach: **four specialized AI agents collaborate in a pipeline**, each handling what they're best at. A PM agent plans the site structure. A Designer agent defines the visual system. A Developer agent writes the actual code. A Reviewer agent evaluates quality and can send work back for revision — just like a real team would.
23+
AgentSite takes a different approach: **nine specialized AI agents collaborate in a pipeline**, each handling what they're best at. A PM agent plans the site structure and selects the build strategy. A Designer agent defines the visual system. In monolithic mode, a single Developer agent writes all the code; in specialist mode, dedicated Markup, Style, Script, and Image agents work in parallel for faster builds. A Reviewer agent evaluates quality and can send work back for revision — just like a real team would.
2424

2525
The entire pipeline is **model-agnostic**. You can use OpenAI, Claude, Google, Groq, Ollama, LM Studio, or any provider supported by [Prompture](https://pypi.org/project/prompture/). Swap models without changing anything else.
2626

@@ -73,27 +73,50 @@ agentsite serve
7373

7474
## How It Works
7575

76+
AgentSite supports two build modes, chosen automatically by the PM agent based on site complexity:
77+
78+
**Monolithic mode** — a single Developer agent handles all code:
79+
80+
```
81+
Prompt --> PM --> Designer --> Developer <--> Reviewer --> Website
82+
```
83+
84+
**Specialist mode** — dedicated agents work in parallel for faster builds:
85+
7686
```
77-
Prompt --> PM Agent --> Designer Agent --> Developer Agent <--> Reviewer Agent --> Website
78-
(plan) (style) (code) (QA)
87+
Prompt --> PM --> Designer --> Image -----> Reviewer --> Website
88+
Markup --/
89+
Style --/
90+
Script -/
7991
```
8092

93+
### Core Agents
94+
8195
| Agent | Role | Output |
8296
| --- | --- | --- |
83-
| **PM** | Analyzes the prompt, plans site structure and page hierarchy | `SitePlan` |
97+
| **PM** | Analyzes the prompt, plans site structure, selects build strategy and agents | `SitePlan` |
8498
| **Designer** | Defines colors, typography, spacing, and the visual system | `StyleSpec` |
85-
| **Developer** | Writes semantic HTML, CSS, and vanilla JS for each page | `PageOutput` |
99+
| **Developer** | Writes semantic HTML, CSS, and vanilla JS for each page (monolithic mode) | `PageOutput` |
86100
| **Reviewer** | Evaluates quality, accessibility, and correctness (score >= 7 = approved) | `ReviewFeedback` |
87101

88-
The Reviewer can trigger revision loops, sending feedback back to the Developer until quality meets the approval threshold. This runs up to two iterations per page.
102+
### Specialist Agents
103+
104+
| Agent | Role | Output |
105+
| --- | --- | --- |
106+
| **Markup** | Writes HTML/JSX markup with semantic structure and ARIA labels | `MarkupOutput` |
107+
| **Style** | Writes CSS or SCSS stylesheets with custom properties and responsive design | `StyleOutput` |
108+
| **Script** | Writes vanilla JavaScript for interactivity and animations | `ScriptOutput` |
109+
| **Image** | Generates images and manages the asset library | `ImageOutput` |
110+
111+
The Reviewer can trigger revision loops, sending feedback back to the Developer or specialists until quality meets the approval threshold. This runs up to two iterations per page.
89112

90113
---
91114

92115
## Features
93116

94117
### Multi-Agent Pipeline
95118

96-
Four agents with distinct personas coordinate through [Prompture](https://pypi.org/project/prompture/) groups. Each agent has a focused role and structured output — no single monolithic prompt trying to do everything.
119+
Nine agents with distinct personas coordinate through [Prompture](https://pypi.org/project/prompture/) groups. Four core agents handle planning, design, development, and QA. Five specialist agents (Markup, Style, SCSS, Script, Image) can run in parallel for faster builds. Each agent has a focused role and structured output — no single monolithic prompt trying to do everything.
97120

98121
### Real-Time Progress
99122

@@ -176,8 +199,10 @@ Provider API keys (`OPENAI_API_KEY`, `CLAUDE_API_KEY`, `GOOGLE_API_KEY`, etc.) a
176199
```
177200
agentsite/
178201
agents/ # Agent factories, Prompture personas, orchestration
179-
personas.py # PM, Designer, Developer, Reviewer persona definitions
180-
orchestrator.py # Pipeline wiring and group configuration
202+
personas.py # All agent persona definitions (core + specialists)
203+
orchestrator.py # Pipeline wiring, dynamic mode selection, parallel groups
204+
registry.py # Centralized agent registry with auto-discovery
205+
specialists/ # Specialist agents (markup, style, script, image)
181206
api/ # FastAPI application
182207
routes/ # REST endpoints (projects, generate, models, assets, preview)
183208
websocket.py # WebSocket manager for real-time progress

agentsite/agents/__init__.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,32 @@
33
from .designer import create_designer_agent
44
from .developer import create_developer_agent
55
from .orchestrator import create_pipeline
6-
from .personas import DESIGNER_PERSONA, DEVELOPER_PERSONA, PM_PERSONA, REVIEWER_PERSONA
6+
from .personas import (
7+
ACCESSIBILITY_PERSONA,
8+
ANIMATION_PERSONA,
9+
COPYWRITER_PERSONA,
10+
DESIGNER_PERSONA,
11+
DEVELOPER_PERSONA,
12+
PM_PERSONA,
13+
REVIEWER_PERSONA,
14+
SEO_PERSONA,
15+
)
716
from .pm import create_pm_agent
17+
from .registry import AgentCategory, AgentDescriptor, AgentRegistry
818
from .reviewer import create_reviewer_agent
919

1020
__all__ = [
21+
"ACCESSIBILITY_PERSONA",
22+
"ANIMATION_PERSONA",
23+
"COPYWRITER_PERSONA",
1124
"DESIGNER_PERSONA",
1225
"DEVELOPER_PERSONA",
1326
"PM_PERSONA",
1427
"REVIEWER_PERSONA",
28+
"SEO_PERSONA",
29+
"AgentCategory",
30+
"AgentDescriptor",
31+
"AgentRegistry",
1532
"create_designer_agent",
1633
"create_developer_agent",
1734
"create_pipeline",

agentsite/agents/designer.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
from __future__ import annotations
44

5+
import json
6+
57
from prompture import AsyncAgent as Agent
68

79
from ..engine.capabilities import supports_structured_output
810
from ..models import StyleSpec
911
from .personas import DESIGNER_PERSONA
12+
from .tools import designer_tools
1013

1114

1215
def create_designer_agent_auto(model: str) -> Agent:
@@ -26,6 +29,7 @@ def create_designer_agent(model: str) -> Agent:
2629
model,
2730
system_prompt=DESIGNER_PERSONA,
2831
output_type=StyleSpec,
32+
tools=designer_tools,
2933
name="designer",
3034
description="Defines visual design system (colors, fonts, spacing)",
3135
output_key="style_spec",
@@ -42,12 +46,12 @@ def create_designer_agent_plain(model: str) -> Agent:
4246
json_schema = StyleSpec.model_json_schema()
4347
return Agent(
4448
model,
45-
system_prompt=(
46-
DESIGNER_PERSONA.system_prompt
47-
+ "\n\nIMPORTANT: You MUST respond with ONLY a valid JSON object matching this schema:\n"
48-
+ f"```json\n{__import__('json').dumps(json_schema, indent=2)}\n```\n"
49+
system_prompt=DESIGNER_PERSONA.extend(
50+
"IMPORTANT: You MUST respond with ONLY a valid JSON object matching this schema:\n"
51+
f"```json\n{json.dumps(json_schema, indent=2)}\n```\n"
4952
"Do NOT include any text before or after the JSON. Return ONLY the JSON object."
5053
),
54+
tools=designer_tools,
5155
name="designer",
5256
description="Defines visual design system (plain text mode)",
5357
output_key="style_spec",

agentsite/agents/developer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from ..engine.capabilities import supports_tools
88
from .personas import DEVELOPER_PERSONA
9-
from .tools import list_files, read_file, write_file
9+
from .tools import dev_tools
1010

1111

1212
def create_developer_agent_auto(model: str) -> Agent:
@@ -32,11 +32,11 @@ def create_developer_agent(model: str) -> Agent:
3232
return Agent(
3333
model,
3434
system_prompt=DEVELOPER_PERSONA,
35-
tools=[write_file, read_file, list_files],
35+
tools=dev_tools,
3636
name="developer",
3737
description="Generates HTML/CSS/JS files for each page",
3838
output_key="page_output",
39-
options={"max_tokens": 16384, "timeout": 900},
39+
options={"max_tokens": 65536, "timeout": 900},
4040
)
4141

4242

@@ -78,5 +78,5 @@ def create_developer_agent_plain(model: str) -> Agent:
7878
name="developer",
7979
description="Generates HTML/CSS/JS files for each page (plain text mode)",
8080
output_key="page_output",
81-
options={"max_tokens": 16384, "timeout": 900},
81+
options={"max_tokens": 65536, "timeout": 900},
8282
)

0 commit comments

Comments
 (0)