Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘” CEO Agent System β€” v0.5

LangGraph-powered multi-agent AI platform β€” Prompt Expert β†’ CEO/CTO β†’ 6 Domain Directors β†’ 7 Execution Specialists, with a full artifact pipeline and real-time dashboard.

v0.5 β€” Dynamic artifact generation Β· Brand palette from live agent output Β· Security + Social Media domain artifacts Β· Scenario defaults versioning Β· Payload validation hardening

Python LangGraph Flask License: MIT


πŸš€ Quick Start

git clone https://github.com/0xwaya/ceo-agent-system.git
cd ceo-agent-system
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # add OPENAI_API_KEY / ANTHROPIC_API_KEY
python3 app.py

# Dashboards
open http://localhost:5001/        # Main dashboard
open http://localhost:5001/admin   # Admin / agent runner
open http://localhost:5001/graph   # LangGraph live view

πŸ—οΈ Architecture β€” 3-Tier Agent Hierarchy

User Input
    β”‚
    β–Ό
[Node 0]  Prompt Expert ─── parses intent β†’ routing signals
    β”‚
    β–Ό
[Tier 1]  CEO ──────────── builds dispatch_plan, orchestrates
[Tier 1]  CTO ──────────── architecture review, tech-stack decisions
    β”‚
    β”œβ”€β–Ά [Tier 2] CFO          Finance, budget, projections
    β”œβ”€β–Ά [Tier 2] Engineer     Architecture, delegates to Tier 3
    β”œβ”€β–Ά [Tier 2] Researcher   Market & competitive intelligence
    β”œβ”€β–Ά [Tier 2] Legal        Compliance & regulatory
    β”œβ”€β–Ά [Tier 2] Martech      Marketing strategy, delegates to Tier 3
    └─▢ [Tier 2] Security     Threat model, audit, compliance gaps
          β”‚
          β”œβ”€β–Ά [Tier 3] UX/UI Designer
          β”œβ”€β–Ά [Tier 3] Web Development
          β”œβ”€β–Ά [Tier 3] Software Engineering
          β”œβ”€β–Ά [Tier 3] Branding & Identity
          β”œβ”€β–Ά [Tier 3] Content Strategy
          β”œβ”€β–Ά [Tier 3] Campaign Execution
          └─▢ [Tier 3] Social Media
Tier Count Role
Node 0 1 Prompt Expert β€” intent parsing & routing
Tier 1 2 CEO + CTO β€” strategic orchestration
Tier 2 6 Domain directors β€” delegation & subgraph execution
Tier 3 7 Execution specialists β€” deliverables & artifact output
Total 16 agents

🎯 What It Does

Given a company description, budget, and goals the system:

  1. Parses intent β€” Prompt Expert converts natural language into structured routing
  2. Builds strategy β€” CEO constructs a dispatch_plan across relevant domains
  3. Executes in parallel β€” Domain directors spawn execution agents concurrently
  4. Generates artifacts β€” Every agent persists reviewable output files:
    • Branding: SVG logo proposals (4 directions), social avatars, dynamic brand palette CSS, moodboard SVG
    • Web Dev: architecture diagram (Mermaid), homepage wireframe HTML, implementation timeline MD
    • CFO: financial report JSON, action plan MD
    • Security: audit report MD, vulnerability checklist MD, security report JSON
    • Social Media: content calendar MD, campaign ideas MD, community playbook MD
    • Legal / Martech / Content / Campaign: domain-specific MDs
    • All agents: metadata.json, result.json, summary.md, deliverables.md
  5. Renders in report UI β€” Every report shows a πŸ“Ž artifact grid with clickable file links

πŸ“Š Dashboard Features

Main Dashboard (/)

  • Live Feed β€” animated progress/success/error cards as agents run
  • Agents Tab β€” run any of the 14 specialists individually
  • Reports Tab β€” full agent report with πŸ“Ž artifact preview panel
  • Tasks Tab β€” execution task tracker
  • Log Tab β€” raw execution log

Admin Dashboard (/admin)

  • Scenario builder: company info, budget, objectives
  • Run individual agents and view structured output
  • Artifact browser β€” browse and open all generated files

Graph Dashboard (/graph)

  • Real-time LangGraph execution view
  • Node state inspector
  • Approval / human-in-the-loop controls

Real-Time Chat (embedded)

  • Per-agent conversational memory
  • SocketIO ai_chat_request/response + REST /api/chat/message
  • Strategic Debate Mode β€” devil's advocate persona toggle

πŸ—‚οΈ Artifact Pipeline

Every agent run persists files at:

static/generated_outputs/
└── <agent_slug>/
    └── <run_id>_<company_slug>/
        β”œβ”€β”€ metadata.json
        β”œβ”€β”€ result.json
        β”œβ”€β”€ summary.md
        β”œβ”€β”€ deliverables.md
        └── <domain-specific files…>
from services.artifact_service import artifact_service

bundle = artifact_service.persist_agent_execution(
    agent_type="branding",
    agent_name="Branding Agent",
    task="Visual identity for ACME Corp",
    company_info={"company_name": "ACME Corp", "industry": "Technology"},
    result=agent_result_dict,
)
# bundle["artifacts"]  β†’ [{title, url, type, mime_type}, …]
# bundle["directory"]  β†’ relative path in static/

πŸ› οΈ Tech Stack

Layer Technology
Agent Orchestration LangGraph
LLM Backend OpenAI GPT-4 / Anthropic Claude (configurable)
Web Framework Flask + Flask-SocketIO
State Management TypedDict + LangGraph checkpointing
Frontend Vanilla JS ES6, SocketIO client
Artifact Storage Filesystem (static/generated_outputs/)
Testing pytest Β· 56 tests

πŸ“¦ Project Structure

ceo-agent-system/
β”œβ”€β”€ app.py                          # Flask app β€” all routes + SocketIO
β”œβ”€β”€ config.py                       # Settings, env, scenario defaults
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ artifact_service.py         # Artifact persistence + domain file generation
β”‚   β”œβ”€β”€ agent_service.py
β”‚   β”œβ”€β”€ orchestration_service.py
β”‚   └── report_service.py
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ base_agent.py
β”‚   β”œβ”€β”€ ceo_agent.py
β”‚   β”œβ”€β”€ cto_agent.py
β”‚   β”œβ”€β”€ specialized_agents.py       # Branding, WebDev, Legal, Martech, Content, Campaign, Social
β”‚   └── security_blockchain_agent.py
β”œβ”€β”€ graph_architecture/
β”‚   β”œβ”€β”€ main_graph.py               # Root LangGraph graph
β”‚   β”œβ”€β”€ llm_nodes.py                # All LLM node functions (Tier 1/2/3)
β”‚   β”œβ”€β”€ tools.py                    # Role-gated tool registry
β”‚   β”œβ”€β”€ schemas.py
β”‚   └── subgraphs/
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ js/app.js                   # Dashboard logic + report rendering
β”‚   β”œβ”€β”€ js/admin.js
β”‚   └── generated_outputs/          # Agent artifact output (git-ignored)
β”œβ”€β”€ templates/
β”œβ”€β”€ utils/
β”‚   └── validators.py               # Input validation + company_info allowlist
└── tests/                          # 56 pytest tests

πŸ§ͺ Testing

make test          # full pytest suite (56 tests)
make smoke         # fast dashboard render smoke check
make check         # lint + smoke + tests

πŸ”„ Version History

Version Highlights
v0.5 Dynamic artifact pipeline Β· Brand palette from live colors Β· Security & Social domain artifacts Β· Scenario defaults v2 Β· Payload validation hardening
v0.4 CTO Agent (Tier 1) Β· Real-time LLM chat Β· 3-panel dashboard Β· Live feed cards Β· SocketIO
v0.3 Prompt Expert (Node 0) Β· Conditional dispatch loop Β· 6 Tier-2 directors Β· 7 Tier-3 specialists Β· Centralised llm_nodes.py
v0.2 CFO orchestrator Β· Multi-agent graph Β· LangGraph checkpointing
v0.1 Single-domain marketing agent

πŸ“– Documentation

Doc Purpose
docs/ARCHITECTURE.md Full system design, data flow, API reference
docs/QUICK_START.md Day-to-day runbook and commands
docs/CEO_AGENT_README.md CEO-mode deep guide
graph_architecture/README.md LangGraph subgraph guide
docs/ARTIFACT_WORKFLOW.md Artifact pipeline walkthrough
docs/SECURITY.md Security posture and audit notes

🀝 Contributing

  1. Fork the repo β†’ create branch feat/<name>
  2. Add tests for new agent behavior in tests/
  3. Run make check β€” all 56 tests + smoke must stay green
  4. Open a PR

πŸ“„ License

MIT β€” built by @0xwaya / Waya Labs


Built with LangGraph Β· Flask Β· OpenAI Β· Python 3.10+ Domains Branding Β· Web Dev Β· Legal Β· Finance Β· Security Β· Martech Β· Content Β· Campaigns Β· Social Media


About

πŸ€– LangGraph multi-agent AI system β€” 16-agent hierarchy (CEO/CTO/CFO + 6 domain directors + 7 execution specialists) with real-time dashboard, artifact pipeline, and SocketIO chat

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages