Skip to content

maxxie114/paigent

Repository files navigation

🌟 Paigent Studio

Agentic Orchestration + x402 Tool Chaining on MongoDB Atlas

Paigent Studio is a workflow IDE that enables you to design and execute multi-agent workflows with automatic micropayments. Describe what you want to accomplish using voice or text, and our AI planner creates an optimal execution graph that pays for premium tools on-demand using USDC.

Next.js TypeScript MongoDB Coinbase


✨ Features

  • 🎀 Voice-First Design - Describe workflows using natural language or voice input
  • πŸ€– Multi-Agent System - Specialized agents for planning, retrieval, negotiation, execution, and QA
  • πŸ’° x402 Micropayments - Pay only for tools you use with USDC via Coinbase CDP
  • πŸ“Š Real-Time Execution - Watch workflows execute with live SSE updates
  • πŸ”’ Enterprise Security - SSRF protection, tool allowlisting, complete audit trails
  • πŸ” Smart Tool Discovery - VoyageAI embeddings + MongoDB Atlas Vector Search

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           PAIGENT STUDIO                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Voice Input    β”‚    β”‚   Text Input     β”‚    β”‚   Graph Editor   β”‚  β”‚
β”‚  β”‚  (Whisper ASR)   β”‚    β”‚   (Natural Lang) β”‚    β”‚  (React Flow)    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚           β”‚                       β”‚                       β”‚             β”‚
β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚                                   β–Ό                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                        PLANNER AGENT                              β”‚   β”‚
β”‚  β”‚                    (GLM-4.7 Thinking Model)                       β”‚   β”‚
β”‚  β”‚     Intent β†’ Workflow Graph (Nodes + Edges + Dependencies)        β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                   β”‚                                      β”‚
β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚
β”‚           β–Ό                       β–Ό                       β–Ό             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   RETRIEVER    β”‚    β”‚   NEGOTIATOR    β”‚    β”‚      EXECUTOR       β”‚  β”‚
β”‚  β”‚  (Tool Search) β”‚    β”‚ (Payment Logic) β”‚    β”‚   (Step Runner)     β”‚  β”‚
β”‚  β”‚                β”‚    β”‚                 β”‚    β”‚                     β”‚  β”‚
β”‚  β”‚ VoyageAI +     β”‚    β”‚ Budget checks,  β”‚    β”‚ tool_call,          β”‚  β”‚
β”‚  β”‚ Atlas Vector   β”‚    β”‚ approval gates, β”‚    β”‚ llm_reason,         β”‚  β”‚
β”‚  β”‚ Search         β”‚    β”‚ pay decisions   β”‚    β”‚ approval, branch,   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚ wait, merge,        β”‚  β”‚
β”‚                                               β”‚ finalize            β”‚  β”‚
β”‚                                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                   β”‚                                      β”‚
β”‚                                   β–Ό                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                         AUDITOR AGENT                             β”‚   β”‚
β”‚  β”‚              QA Review, Policy Compliance, Cost Analysis          β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                           DATA LAYER                                     β”‚
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                      MongoDB Atlas                                  β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚  β”‚  β”‚workspacesβ”‚ β”‚  runs    β”‚ β”‚run_steps β”‚ β”‚run_eventsβ”‚ β”‚ receipts β”‚ β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚ β”‚
β”‚  β”‚  β”‚  tools   β”‚ β”‚artifacts β”‚ β”‚     Vector Search Index          β”‚   β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                         PAYMENT LAYER                                    β”‚
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                   Coinbase CDP Server Wallet v2                     β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚  β”‚  β”‚ Agent Wallet β”‚  β”‚ x402 Protocolβ”‚  β”‚   Base Sepolia (USDC)    β”‚ β”‚ β”‚
β”‚  β”‚  β”‚  (Backend)   β”‚  β”‚  (Payments)  β”‚  β”‚      Testnet             β”‚ β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Agent System

Agent Role Model
Planner Converts user intent into workflow graphs GLM-4.7 Thinking
Retriever Discovers relevant tools via vector search VoyageAI + Atlas
Negotiator Makes payment decisions based on budget/reputation GLM-4.7
Executor Runs workflow steps with retry logic -
Auditor QA review and policy compliance checking GLM-4.7

Node Types

  • tool_call - External API calls (may require x402 payment)
  • llm_reason - LLM analysis, summarization, decisions
  • approval - Human approval gate
  • branch - Conditional branching
  • wait - Async polling
  • merge - Join parallel branches
  • finalize - Produce final output

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account
  • Clerk account (authentication)
  • Coinbase CDP account (payments)
  • Fireworks AI account (LLM)

Installation

# Clone the repository
git clone https://github.com/yourusername/paigent.git
cd paigent

# Install dependencies
npm install

# Copy environment template
cp env.example .env.local

# Start development server
npm run dev

Environment Setup

Create a .env.local file with the following variables:

# Clerk Authentication
# Get from: https://dashboard.clerk.com/
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxx
CLERK_SECRET_KEY=sk_test_xxx
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard

# MongoDB Atlas
# Get from: https://cloud.mongodb.com/
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/?retryWrites=true&w=majority
MONGODB_DB_NAME=paigent_studio

# Coinbase CDP Server Wallet
# Get from: https://portal.cdp.coinbase.com/
CDP_API_KEY_ID=your_api_key_id
CDP_API_KEY_SECRET=your_api_key_secret
CDP_WALLET_SECRET=your_wallet_secret

# Fireworks AI
# Get from: https://app.fireworks.ai/
FIREWORKS_API_KEY=fw_xxx

# VoyageAI (Optional - for vector search)
# Get from: https://dash.voyageai.com/
VOYAGE_API_KEY=

# Galileo (Optional - for observability)
# Get from: https://app.galileo.ai/
# See: https://v2docs.galileo.ai/sdk-api/typescript/sdk-reference
GALILEO_API_KEY=
GALILEO_PROJECT=paigent-studio
GALILEO_LOG_STREAM=production

# Cron Secret (generate a random string)
CRON_SECRET=your_random_secret_here

Database Setup

  1. Create a MongoDB Atlas cluster (M0 free tier works)
  2. Create a database named paigent_studio
  3. The collections and indexes are created automatically on first run
  4. For vector search, create an Atlas Vector Search index named tool_vector_index on the tools collection

πŸ“ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (auth)/              # Sign-in/sign-up pages
β”‚   β”œβ”€β”€ (dashboard)/         # Authenticated dashboard pages
β”‚   β”‚   β”œβ”€β”€ dashboard/       # Main dashboard
β”‚   β”‚   β”œβ”€β”€ runs/            # Workflow runs
β”‚   β”‚   β”œβ”€β”€ tools/           # Tool registry
β”‚   β”‚   β”œβ”€β”€ wallet/          # Wallet management
β”‚   β”‚   β”œβ”€β”€ analytics/       # Usage analytics
β”‚   β”‚   └── settings/        # Workspace settings
β”‚   └── api/                 # API routes
β”‚       β”œβ”€β”€ runs/            # Run CRUD + events SSE
β”‚       β”œβ”€β”€ wallet/          # Balance + faucet
β”‚       β”œβ”€β”€ asr/             # Voice transcription
β”‚       └── cron/            # Background execution
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ dashboard/           # Sidebar, header
β”‚   β”œβ”€β”€ runs/                # Graph visualization, step nodes
β”‚   └── ui/                  # shadcn/ui components
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ use-voice-input.ts   # Voice recording hook
β”‚   └── use-run-events.ts    # SSE subscription hook
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ agents/              # Multi-agent system
β”‚   β”‚   β”œβ”€β”€ planner.ts       # Intent β†’ Graph
β”‚   β”‚   β”œβ”€β”€ executor.ts      # Step execution
β”‚   β”‚   β”œβ”€β”€ retriever.ts     # Tool discovery
β”‚   β”‚   β”œβ”€β”€ negotiator.ts    # Payment decisions
β”‚   β”‚   └── auditor.ts       # QA review
β”‚   β”œβ”€β”€ cdp/                 # Coinbase CDP integration
β”‚   β”‚   β”œβ”€β”€ client.ts        # CDP SDK client
β”‚   β”‚   β”œβ”€β”€ wallet.ts        # Wallet operations
β”‚   β”‚   └── x402-fetch.ts    # Payment-aware fetch
β”‚   β”œβ”€β”€ db/                  # MongoDB
β”‚   β”‚   β”œβ”€β”€ client.ts        # Connection
β”‚   β”‚   β”œβ”€β”€ collections.ts   # Schema definitions
β”‚   β”‚   └── queries/         # Query helpers
β”‚   β”œβ”€β”€ fireworks/           # LLM + ASR
β”‚   β”‚   β”œβ”€β”€ client.ts        # OpenAI-compatible client
β”‚   β”‚   β”œβ”€β”€ asr.ts           # Speech-to-text
β”‚   β”‚   └── prompts/         # Agent prompts
β”‚   β”œβ”€β”€ voyage/              # Embeddings
β”‚   β”‚   └── embeddings.ts    # VoyageAI client
β”‚   β”œβ”€β”€ galileo/             # Observability
β”‚   β”‚   └── client.ts        # Trace logging
β”‚   └── ssrf/                # Security
β”‚       └── validator.ts     # URL validation
└── types/
    β”œβ”€β”€ database.ts          # Document schemas
    β”œβ”€β”€ graph.ts             # Workflow graph types
    └── api.ts               # API payloads

πŸ”§ API Reference

Runs

// Create a new run
POST /api/runs
{
  "workspaceId": "string",
  "intent": "Summarize top 5 AI news articles",
  "budgetMaxAtomic": "5000000", // 5 USDC
  "autoPayEnabled": true
}

// List runs
GET /api/runs?workspaceId=xxx&status=running&page=1

// Get run details
GET /api/runs/[runId]

// Update run status
PATCH /api/runs/[runId]
{ "status": "canceled" }

// Subscribe to events (SSE)
GET /api/runs/[runId]/events

Wallet

// Get wallet balance
GET /api/wallet/balance

// Request faucet funds (testnet)
POST /api/wallet/fund

Cron

// Process queued steps (Vercel Cron)
// Vercel Cron Jobs trigger this endpoint using GET requests.
// The CRON_SECRET is automatically sent via Authorization header.
GET /api/cron/tick
Authorization: Bearer {CRON_SECRET}

// Alternative POST endpoint for manual triggering/testing
POST /api/cron/tick
Authorization: Bearer {CRON_SECRET}

πŸ’³ Payment Flow (x402 Protocol)

1. Agent calls tool endpoint
2. Tool returns 402 Payment Required + PAYMENT-REQUIRED header
3. Negotiator checks budget limits
4. CDP wallet signs EIP-3009 authorization
5. Retry request with PAYMENT-SIGNATURE header
6. Tool verifies and processes payment
7. Tool returns response + PAYMENT-RESPONSE header
8. Receipt recorded in MongoDB

πŸ›‘οΈ Security

  • SSRF Protection: All tool URLs validated against private IP ranges and cloud metadata endpoints
  • Tool Allowlisting: Workspace-level domain allowlist
  • Budget Controls: Per-step and per-run spending limits
  • Approval Gates: Human approval for high-cost or sensitive operations
  • Audit Trail: Every action logged in run_events collection

πŸ“¦ Tech Stack

Category Technology
Framework Next.js 15 (App Router)
Language TypeScript 5
Styling Tailwind CSS + shadcn/ui
Auth Clerk
Database MongoDB Atlas
Vector Search Atlas Vector Search + VoyageAI
LLM Fireworks AI (GLM-4.7)
ASR Fireworks Whisper
Payments Coinbase CDP Server Wallet v2
Real-time Server-Sent Events
Deployment Vercel

πŸ§ͺ Development

# Run development server
npm run dev

# Type checking
npm run type-check

# Linting
npm run lint

# Build for production
npm run build

🚒 Deployment

Vercel (Recommended)

  1. Push to GitHub
  2. Import in Vercel
  3. Add environment variables
  4. Deploy

The vercel.json configures the cron job to run once daily at midnight UTC (Vercel Hobby tier limitation).

Environment Variables on Vercel

Set all variables from .env.local in your Vercel project settings.


πŸ“„ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments

Built for the MongoDB AI Hackathon with:


⚑ Automate with intelligence. Pay only for what you use. ⚑

About

x402Flow Studio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •