Skip to content

anthonyoccelli33480-ctrl/flash-agents

Repository files navigation

⚡ Flash Agents

40 one-shot AI agents on Cerebras Inference — sub-second UX, zero chat overhead.

MIT License Agents Python React Cerebras FastAPI

Flash Review — paste code, get JSON in milliseconds

Paste → Run → Structured JSON. One call. No agent loops.

Quick Start · Example · Benchmarks · Architecture · vs LangChain


📋 Example input / output

Agent: Flash Review (GLM 4.7) · Latency: ~2.5s end-to-end (see benchmarks)

Input

function divide(a, b) {
  return a / b;
}
// no zero check

Output

{
  "summary": "Division sans garde — risque de crash runtime.",
  "score": 62,
  "critical": [
    {
      "line": "divide",
      "issue": "Division par zéro non gérée",
      "fix": "if (b === 0) throw new Error('Division by zero')"
    }
  ],
  "warnings": [],
  "positives": ["Fonction concise, lisible"],
  "verdict": "fix_first"
}

Same pattern for all 40 agents: one input → one JSON object → done.


🎯 What is this?

Flash Agents is an open-source showcase for ultra-fast LLM inference on Cerebras. Each agent does exactly one job with the best model for that job:

Model Use case Agents
GLM 4.7 (zai-glm-4.7) Code, debug, regex, secrets 13
GPT OSS 120B (gpt-oss-120b) Reasoning, product, career, security 20
Gemma 4 31B (gemma-4-31b) Vision — screenshots, OCR, UI audit 7

Built for developers who want instant task completion without building a chatbot.

📊 Benchmarks

Measured on Flash Review (zai-glm-4.7), local Mac, Cerebras free tier, 5 runs with 15s rate-gate:

Metric Flash Agents Typical multi-agent chain
P50 2.6s 15–45s (plan → tool → synthesize)
P95 3.6s 30–90s
API calls 1 5–50+
Output Valid JSON Markdown + parsing needed
Run 1: 3621 ms  (cold)
Run 2: 2610 ms
Run 3: 2717 ms
Run 4: 2388 ms  ← P50 neighborhood
Run 5: 2543 ms

Reproduce: ./scripts/benchmark.sh (requires running backend + CEREBRAS_API_KEY).

Why not 300ms? Cerebras inference is fast; end-to-end includes network + JSON generation. The win is 1 call vs 10 — not raw token speed alone.

🏗 Architecture

flowchart LR
    A[Request] --> B[FastAPI Router]
    B --> C[Agent Registry]
    C --> D[Rate Gate]
    D --> E[Cerebras API]
    E --> F[JSON Response]
    F --> G[Guide + Latency ms]

    style A fill:#1a1a24,stroke:#2a2a38,color:#e8e8f0
    style E fill:#ff6b2c22,stroke:#ff6b2c,color:#ff6b2c
    style F fill:#3dd68c22,stroke:#3dd68c,color:#3dd68c
Loading
Layer Role
Request Text or image (vision agents) from React UI
Router POST /api/run → picks agent by agent_id
Agent System prompt + model + JSON schema
Cerebras OpenAI-compatible inference (GLM / 120B / Gemma)
JSON Parsed result + how_to + next_steps + latency_ms

✨ Highlights

  • One task = one API call — no multi-turn chat, no agent loops
  • 📊 Structured JSON outputresponse_format: json_object, ready to pipe into tools
  • 🖼️ Vision agents — upload PNG/JPEG, get UX audits, OCR, diagram explanations
  • 🛡️ Rate-safe — built-in 15s gate for Cerebras free tier (~5 req/min)
  • 🔐 Local secrets — API key in .env on your machine, never sent to the browser
  • 🧭 Onboarding built-in — explains the app + validates your Cerebras key on first run
  • 🍎 macOS launcher — double-click .command on Desktop to start everything

🚀 Quick Start

1. Get a free Cerebras API key

cloud.cerebras.ai (models: zai-glm-4.7, gpt-oss-120b, gemma-4-31b)

2. Install & run

git clone https://github.com/anthonyoccelli33480-ctrl/flash-agents.git
cd flash-agents
cp .env.example .env   # add CEREBRAS_API_KEY=csk-...

make install           # Python 3.12 venv + npm
make backend           # http://127.0.0.1:8787
make frontend          # http://127.0.0.1:5173

Or on macOS: double-click ⚡ Lancer Flash Agents.command from the Desktop folder.

3. Try an agent

Try this Input Output
Flash Review Paste a code diff Score, critical issues, verdict
Flash Fix Stack trace + code Root cause + patch
Flash UI Review Screenshot PNG UX critique JSON
Flash MVP Vague startup idea Scoped MVP plan

🤖 Agent Catalog

Dev (11) — GLM 4.7
Agent One-liner
Flash Review Code review → structured score + fixes
Flash Fix Stack trace → root cause + patch
Flash Commit Git diff → Conventional Commits + PR
Flash Regex Natural language → tested regex
Flash Test Function → unit tests
Flash SQL Question + schema → SQL query
Flash Explain Code → clear explanation
Flash Refactor Code smell → clean version
Flash Docker Stack → minimal Dockerfile
Flash OpenAPI Endpoints → OpenAPI spec
Flash Migrate Framework A → migration plan B
Career (5) — 120B + README on GLM

Flash JD · Flash STAR · Flash LinkedIn · Flash Email · Flash README

Product (6) — GPT OSS 120B

Flash MVP · Flash Decision · Flash Pitch · Flash Competitor · Flash Pricing · Flash Onboarding

AI / ML (5) — 120B + Router on GLM

Flash Eval · Flash Prompt · Flash Dataset · Flash Rubric · Flash Router

Content (3) — GPT OSS 120B

Flash TL;DR · Flash Compare · Flash Outline

Security (3) — 120B + Secret on GLM

Flash Threat · Flash Secret · Flash RGPD

Vision (7) — Gemma 4 31B + image upload

Flash UI Review · Flash Diagram · Flash Wireframe · Flash OCR · Flash A11y · Flash Chart · Flash Mockup

Full reference → docs/AGENTS.md

🆚 Why Flash Agents instead of LangChain / CrewAI / OpenAI Agents?

Flash Agents LangChain CrewAI OpenAI Agents SDK
Mental model One-shot task Chains & graphs Multi-agent crew Tool loop
Calls per task 1 3–20+ 10–50+ 5–30+
Output format Forced JSON Usually text Markdown reports Tool results + text
Latency (typical) 2–4s 10–60s 30–120s 5–40s
Infra required FastAPI + React LangSmith, vector DB… Roles, tasks, memory OpenAI + tools setup
Inference Cerebras (GLM, 120B, Gemma) Provider-agnostic Provider-agnostic OpenAI only
Best for Dev tools, quick JSON tasks Complex pipelines Autonomous teams OpenAI ecosystem
Learning curve Clone & run Steep Medium Medium

Use Flash Agents when: you want a code review, SQL query, MVP scope, or UI audit in one click — not a research project.

Use LangChain/CrewAI when: you need multi-step autonomy, RAG, or agents that collaborate over minutes.

Complement, not competitor — Flash Agents is what Cerebras feels like without the framework tax.

➕ Add an agent

Edit backend/app/agents/registry.py:

_register(AgentDef(
    id="my_agent",
    name="Flash My Agent",
    tagline="Input → output in one shot",
    model="zai-glm-4.7",  # or gpt-oss-120b, gemma-4-31b
    category="dev",
    icon="⚡",
    placeholder="Paste your input…",
    system="""Respond ONLY in JSON: { "result": "..." }""",
))

🤖 Machine-readable

Agents, API, stack, and ecosystem for LLM crawlers and tooling:

🔑 Keywords

cerebras · llm-agents · ai-agents · inference · fastapi · react · vision-llm · gemma · glm-4 · code-review · developer-tools · one-shot-agents · structured-output · open-source

📜 License

MIT — see LICENSE


If Flash Agents saved you time, a ⭐ helps others find it.

Built to show what Cerebras Inference feels like when you don't slow it down.

About

40 one-shot AI agents on Cerebras Inference — sub-second JSON tasks, vision, rate-safe

Topics

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors