The Agents Part
PitchCraft operates through two primary AI workflows that orchestrate the entire proposal generation pipeline, leveraging Gemini 3's tool-calling and structured output parsing capabilities for intelligent research and XGBoost for pricing predictions.
Architecture Overview
The system uses a multi-agent architecture where specialized AI agents handle distinct phases of the proposal workflow:
┌─────────────────────────────────────────────────────────────────┐
│ WORKFLOW 1: Research Agent │
├─────────────────────────────────────────────────────────────────┤
│ Fireflies → Transcript Extract → Gemini Research Agent → │
│ → [Tool Calls: Company Intel, Tech Stack, Competitor Analysis] │
│ → Structured Output → Draft Agent │
└─────────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ WORKFLOW 2: Pricing & Generation │
├─────────────────────────────────────────────────────────────────┤
│ Draft Input → Feature Extraction → XGBoost FastAPI Call → │
│ → Price Prediction → Gemini Proposal Assembly → │
│ → Document Generation → Client Delivery │
└─────────────────────────────────────────────────────────────────┘
Workflow 1: Research & Intelligence Agent
Agent Flow:
- Webhook Trigger → Receives Fireflies transcript data
- Code in JavaScript → Extracts and structures transcript content
- Get Path Score → Retrieves conversation metadata
- Information Extractor → Gemini 3 agent extracts key requirements
- Research Agent (Multi-Tool) → Gemini 3 with tool calls:
- Firecrawl API → Look up client annual revnue
- Perplexity API → Company + Prospect background research
- Simple Memory → Stores research context
- Batch Processing → Parallel tool execution
- Project Lookup → Internal database queries
- Prep Predictions → Prepares data for ML model
- Google Gemini 3 Agent → Synthesizes research findings
- Draft Agent → Structures initial proposal outline
- JavaScript → Formats output for next workflow
- Update Document → Stores research in Google Drive
- Respond to Webhook → Passes data to pricing workflow
Key Innovation: Gemini 3 orchestrates multiple tool calls in parallel, gathering company intelligence, competitive analysis, and technical requirements simultaneously—mimicking how a human sales engineer would research before quoting.
Workflow 2: Pricing Prediction & Proposal Generation
Agent Flow:
- Webhook Trigger → Receives research output from Workflow 1
- Information Extractor → Gemini 3 extracts pricing features
- Get Path Score → Retrieves complexity metrics
- Integration Gauge (Research Model) → Scores integration complexity
- Edit Fields → Structures data for ML model
- Research Agent → Gemini 3 with ML tool call:
- Google Gemini Chat Model → Analyzes pricing context
- Structured Output (Parser) → JSON validation
- Simple Memory → Maintains conversation state
- Prep Predictions → Formats features for XGBoost
- Google Gemini Chat Model (Pricing) → Contextualizes predictions
- Draft Agent → Assembles final proposal with ML pricing
- Code in JavaScript → Formats proposal document
- Copy File → Creates proposal template
- Update a Document → Generates final Google Doc by having a template with placeholder text. Using the JSON fields we can then use the Find & Replace Text function in Google Docs API
- Download File → Prepares deliverable
- Respond to Webhook → Delivers proposal to client system
Key Innovation: The XGBoost FastAPI endpoint is called as a tool within the Gemini 3 agent workflow. The agent doesn't just receive a price—it reasons about the prediction, explains the pricing rationale, and integrates it into a coherent narrative.
Tool-Calling Architecture
Both workflows leverage Gemini 3's native tool-calling capabilities to create an agentic system where:
- Research tools (Google Search, database queries) run in parallel
- ML predictions (XGBoost via FastAPI) execute as agent tools
- Memory systems maintain context across tool calls
- Structured outputs ensure reliable JSON responses for downstream processing
This "ML as a Tool" pattern is rare in production systems—most implementations separate LLM reasoning from ML predictions. PitchCraft treats the XGBoost model as just another tool the agent can call, enabling it to reason about pricing in context rather than blindly inserting numbers.
Workflow Orchestration
The n8n platform enables:
- Asynchronous execution → Research and pricing happen in parallel where possible
- Error handling → Fallbacks for failed tool calls or API timeouts
- State management → Memory nodes maintain context across agent calls
- Webhook chaining → Workflows trigger each other seamlessly
- Real-time monitoring → Visual debugging of agent decision paths
Total execution time: 2-3 minutes from Fireflies transcript → delivered proposal, compared to 3+ hours manually.
Log in or sign up for Devpost to join the conversation.