Skip to content

Latest commit

 

History

History
293 lines (237 loc) · 14.1 KB

File metadata and controls

293 lines (237 loc) · 14.1 KB

AgentForge — Product Requirements Document (PRD)

Version: 1.0 Status: Draft Last Updated: June 2026 Author: AI Engineer (Portfolio Project)


1. Executive Summary

AgentForge is a self-hosted, open-source platform that enables developers and teams to visually design, deploy, execute, and monitor multi-agent AI workflows. It provides a drag-and-drop DAG (Directed Acyclic Graph) editor for composing agent pipelines, a real-time execution engine powered by LangGraph, and built-in observability for tracing, cost tracking, and debugging.

The product targets the gap between "building agents in notebooks" and "running agents in production." Most developers today struggle to move beyond single-agent prototypes. AgentForge makes multi-agent orchestration accessible, observable, and production-ready — without writing orchestration boilerplate.

Tagline: "Design agent workflows visually. Run them reliably. Monitor everything."


2. Problem Statement

The Pain

  1. Multi-agent orchestration is hard to build from scratch. Developers spend 60%+ of AI engineering time on orchestration plumbing — state management, error handling, retry logic, context passing — instead of agent logic.
  2. No visual tooling exists for agent composition. Unlike CI/CD (GitHub Actions UI) or data pipelines (Airflow UI), agent workflows are still composed entirely in code. Debugging requires printf-ing through LLM calls.
  3. Cost visibility is near-zero. Teams running multi-agent systems have no idea which agent consumed how many tokens, which workflow step is the most expensive, or when they'll hit budget limits.
  4. Agent templates are not reusable. Every team rebuilds the same "summarizer agent" or "router agent" from scratch. There's no marketplace or registry for sharing battle-tested agent components.
  5. Execution debugging is painful. When an agent workflow fails at step 7 of 12, developers have no way to replay execution, inspect intermediate state, or understand why a specific decision was made.

The Opportunity

  • 57% of organizations now deploy multi-step agent workflows (2026 data)
  • 90% of engineers are shifting toward AI orchestration roles
  • No dominant open-source visual orchestrator exists for multi-agent systems
  • MCP (5,000+ servers) and A2A protocols create a natural integration surface

3. Target Users

Primary: Solo Developers & Small Engineering Teams

  • Building AI-powered products or internal tools
  • Need multi-agent workflows but don't want to build orchestration infrastructure
  • Comfortable with Docker, APIs, and YAML configuration
  • Use case: "I want to build a customer support pipeline with 4 specialized agents but I don't want to write 2,000 lines of LangGraph boilerplate."

Secondary: AI/ML Teams in Mid-Size Companies

  • Already using LangGraph or CrewAI in code
  • Want visibility, cost tracking, and team collaboration on top of existing agents
  • Need RBAC for multi-person teams
  • Use case: "Our team of 6 runs 15 agent workflows. We need a control plane."

Tertiary: Technical Product Managers & Analysts

  • Non-coders who want to understand and modify agent workflows
  • Use the visual editor to inspect and tweak existing workflows
  • Use case: "I want to see why the sales agent escalates so many leads to the human reviewer."

4. Product Goals & Success Metrics

Goal Metric Target
Reduce time-to-first-workflow Time from install to running first agent workflow < 15 minutes
Make orchestration visual % of workflows created via visual editor vs code-only > 60%
Provide full cost visibility % of workflows with active cost tracking 100%
Enable community reuse Number of community-contributed agent templates 50+ within 3 months of launch
Production reliability Workflow execution success rate on deployed workflows > 95%
Open-source traction GitHub stars within 6 months of public release 2,000+

5. Core Features (MVP Scope)

F1: Visual DAG Workflow Builder

  • Drag-and-drop canvas for composing agent workflows
  • Node types:
    • Agent Node — Executes an LLM-powered agent with configurable system prompt, tools, and model
    • Tool Node — Calls an external tool (MCP server, HTTP API, database query)
    • Router Node — Conditional branching based on agent output (if/else, switch)
    • Evaluator Node — Runs quality checks on agent output (schema validation, LLM-as-judge)
    • Human-in-the-Loop Node — Pauses execution for human review/approval
    • Input/Output Nodes — Define workflow inputs and outputs
  • Edge connections define data flow between nodes
  • Each node has a configuration panel (prompt editor, model selector, tool bindings, timeout settings)
  • Workflow validation before execution (cycle detection, missing connections, type mismatches)

F2: Workflow Execution Engine

  • Powered by LangGraph under the hood
  • Each workflow compiles to a LangGraph state graph at runtime
  • Supports all 4 orchestration patterns:
    • Sequential — Linear chain of agents
    • Parallel — Fan-out/fan-in for independent agents
    • Hierarchical — Planner agent delegates to worker agents
    • Conditional — Router-based branching
  • Execution modes:
    • Run — Execute the full workflow
    • Step — Execute one node at a time for debugging
    • Resume — Continue from a paused human-in-the-loop node
  • State persistence across execution (PostgreSQL-backed)
  • Timeout and retry configuration per node

F3: Real-Time Execution Monitoring

  • Live visualization of workflow execution on the DAG canvas
    • Nodes light up as they execute (color-coded: running/success/failed/paused)
    • Data flow animation along edges
  • Execution timeline view:
    • Each node shows: start time, end time, duration, token usage, cost
    • Click any node to inspect: input state, output state, LLM prompts used, tool calls made
  • Error inspection:
    • Full stack trace on failure
    • Agent "thought process" (reasoning trace) visible
    • Retry button on individual failed nodes

F4: Cost Tracking & Budget Management

  • Per-node token counting (input tokens + output tokens)
  • Per-workflow cost aggregation
  • Per-run cost breakdown (which node was most expensive)
  • Budget alerts: set max cost per workflow run, get notified or auto-pause
  • Cost dashboard:
    • Total spend over time (daily/weekly/monthly)
    • Cost per workflow
    • Cost per agent template
    • Projected monthly spend based on current usage

F5: Agent Template Registry

  • Built-in library of pre-configured agent templates:
    • Summarizer, Classifier, Extractor, Translator, Router, Code Generator, etc.
    • Each template includes: system prompt, recommended model, tool bindings, example usage
  • Community contribution system:
    • Users can publish their agents as templates
    • Templates are versioned (semver)
    • Review/approval workflow for community templates
    • Signed/verified badge for trusted contributors
  • Template marketplace UI with search, categories, ratings, download count

F6: MCP Server Integration

  • MCP server registry within the platform
  • Users register MCP servers by providing connection config (URL, auth, capabilities)
  • Registered MCP servers appear as available tools in the Tool Node configuration
  • MCP server health monitoring (connection status, latency, error rate)
  • Built-in support for common MCP servers:
    • File system, HTTP client, PostgreSQL, MongoDB, web search, code execution

F7: API & Webhook Triggers

  • Every workflow exposes a REST API endpoint for programmatic execution
  • Webhook support: trigger workflows from external events (GitHub push, Stripe payment, Slack message)
  • API key management per workflow
  • Rate limiting and throttling per API key
  • Webhook payload automatically injected as workflow input

F8: Authentication & RBAC

  • Email/password + OAuth (GitHub, Google) authentication
  • Workspace-based team management
  • Roles:
    • Owner — Full access, billing, workspace settings
    • Admin — Manage workflows, templates, team members
    • Editor — Create and edit workflows, execute
    • Viewer — View workflows and execution logs, read-only
  • Audit log of all actions (who edited what, who triggered which workflow)

6. Out of Scope (Post-MVP)

These features are explicitly deferred to future versions:

Feature Reason for Deferral
A2A protocol support Complex to implement, low initial demand
Kubernetes operator / Helm chart Docker Compose sufficient for MVP
Visual model fine-tuning Out of orchestration scope
On-premise enterprise edition Requires sales/licensing infrastructure
Mobile app Desktop-first for DAG editing UX
Workflow versioning with diff view Complex UI, simple versioning in MVP
Multi-cloud deployment wizard Docker Compose covers initial deployment

7. User Flows

Flow 1: First-Time Setup

Install via Docker Compose
  → Open browser to localhost:3000
  → Create account (or OAuth login)
  → Onboarding wizard: "Create your first workflow"
  → Template picker: select "Customer Support Pipeline" template
  → DAG editor loads with pre-configured agents
  → User customizes prompts and tool connections
  → Click "Run" → watch execution animate on canvas
  → View cost breakdown and execution timeline

Flow 2: Building a Workflow from Scratch

Dashboard → "New Workflow" → Empty canvas
  → Drag Agent Node onto canvas → Configure (name, prompt, model, tools)
  → Drag Router Node → Connect from Agent → Set conditions
  → Drag another Agent Node → Connect from Router branch A
  → Drag Tool Node → Connect from Router branch B
  → Connect all outputs to Output Node
  → Validate (green check) → Save → Run

Flow 3: Debugging a Failed Execution

Dashboard → Workflow → "Executions" tab → Select failed run
  → DAG canvas shows red on failed node
  → Click failed node → Inspector panel opens
  → Shows: input state, LLM prompt sent, LLM response, error message
  → User identifies issue → Edits node configuration
  → Click "Re-run from this node" → Execution resumes from that point

Flow 4: Publishing a Template

Workflow → Select agent node → "Publish as Template"
  → Template editor: name, description, category, version
  → Configure which parameters are user-customizable vs locked
  → Submit for review → Template appears in registry after approval

8. Non-Functional Requirements

Requirement Target
Latency Workflow compilation < 500ms; single node execution < 30s (LLM-dependent)
Concurrency Support 10 concurrent workflow executions per instance
Reliability Workflow state survives process crash (PostgreSQL persistence)
Scalability Single instance handles 50 active users; horizontal scaling via multiple workers
Security OWASP AST10 compliant; secrets encrypted at rest; API keys hashed; sandboxed agent execution
Browser Support Chrome 90+, Firefox 90+, Edge 90+, Safari 15+
Accessibility WCAG 2.1 AA for core workflows
Deployment Single Docker Compose command; < 5 minutes to running state

9. Competitive Landscape

Product Overlap Differentiator for AgentForge
n8n Visual workflow automation n8n is for traditional automation (APIs, webhooks). AgentForge is purpose-built for AI agent orchestration with LLM-native concepts.
LangFlow Visual LangChain builder LangFlow focuses on chain composition. AgentForge adds production features: cost tracking, RBAC, execution replay, template marketplace.
Dify Visual AI workflow builder Dify is more chatbot-focused. AgentForge targets multi-agent orchestration with full observability.
LangGraph Studio LangGraph visualization LangGraph Studio is a debugger, not a builder. AgentForge combines visual building + execution + monitoring.
CrewAI Enterprise Agent orchestration CrewAI is code-first. AgentForge adds a visual layer on top of orchestration engines.

10. Open-Source Strategy

  • License: Apache 2.0 (permissive, enterprise-friendly)
  • Monetization path (future): Managed cloud hosting (AgentForge Cloud), enterprise features (SSO, audit compliance, priority support)
  • Community features from day one:
    • GitHub Discussions for support
    • Contribution guide for agent templates
    • "Good first issue" labels for onboarding contributors
    • Template marketplace as community hub

11. Risks & Mitigations

Risk Impact Mitigation
LangGraph API changes break compilation High Abstract orchestration behind an adapter layer; pin LangGraph version
LLM API costs make platform expensive for users Medium Cost tracking + budget alerts + model routing (cheap models for simple tasks)
DAG editor UX too complex for non-developers Medium Template-first onboarding; progressive disclosure of advanced features
Agent execution security (sandbox escape) High Container-based sandboxing per agent; network egress controls; OWASP AST10 review
Community template quality varies Medium Review/approval workflow; automated testing of templates; verified badges
Competing with well-funded alternatives Medium Open-source community + production features that demos lack

12. Release Criteria (MVP)

The MVP is considered shippable when:

  • Docker Compose installs and runs successfully on Linux, macOS, and Windows (WSL)
  • User can create an account and log in
  • User can build a 3-node workflow via the visual editor
  • User can execute the workflow and see real-time animation
  • User can inspect execution details (input/output per node)
  • Cost tracking displays token usage and estimated cost per run
  • At least 5 built-in agent templates are available
  • At least 2 MCP servers can be registered and used as tools
  • Workflow API endpoint accepts POST requests and returns results
  • Basic RBAC (owner/editor/viewer) functions correctly
  • No critical or high-severity security vulnerabilities (OWASP scan)
  • Documentation covers: installation, quickstart, architecture, API reference