NextRaise: Streamline Your Startup’s Fundraising Journey with AI Agents

NextRaise: Streamline Your Startup’s Fundraising Journey with AI Agents


This is a submission for the Agent.ai Challenge: Full-Stack Agent, Productivity-Pro Agent, and Assembly of Agents (See Details)



What I Built

NextRaise is a game-changing tool for startup founders looking to streamline their fundraising journey. By integrating five specialized agents, NextRaise transforms tasks that usually take days into a process that takes just 2-5 minutes.

As a community director for one of Africa’s largest startup communities, I’ve witnessed firsthand how overwhelming fundraising can be. From researching investors to managing outreach, founders often struggle to balance these tasks with building their startups. NextRaise eliminates this pain point by automating the entire process.

NextRaise stands out because it fits all three challenge prompts:



1. Full-Stack Agent

NextRaise uses and integrates several of the advanced features in Agent.ai like webhooks, invoking web APIs, running a process and invoking other agents:

  • Webhook Integration: Connects user-friendly Tally.so forms with Agent.ai for seamless input processing.

  • Invoking Web APIs: Compiles outputs from agents into polished PDFs and generates cloud-hosted links for easy sharing.

Invoking a web API

  • Agent Invocation: Invokes four separate agents to handle tasks like investor research, competitor analysis, investor outreach templates, and term sheet generation.

Invoking other agents



2. Assembly of Agents

NextRaise serves as the central agent, gathering the user’s inputs and then triggering the different agents to perform their tasks. Here’s how it works:

  • NextRaise (Central Hub): This is where everything starts. NextRaise collects all the necessary information from the user (i.e. Startup name, industry, funding stage, business model, target market, website, etc.) and kicks off the process, activating the other agents in sequence.
  • Investor Finder Agent: This agent identifies investors who are a good match for your startup based on the input data. It helps you find the right backers who align with your stage, industry, and market.
  • Competitive Intelligence Agent: This agent provides essential market data, competitor analysis, and industry insights. These inputs are critical for tailoring your pitch and giving investors the context they need to understand your startup’s potential.
  • Investor Outreach Agent: This agent drafts personalized messages for outreach, ensuring that they are tailored to each investor’s profile. It also prepares schedules for follow-ups to maintain engagement with potential investors.
  • Term Sheet Creator Agent: This agent drafts a professional term sheet based on the founder’s fundraising parameters. It creates a draft of the term sheet that the founder can use when discussions progress.

PDF Generation via API Calls
Each agent generates a PDF of its completed task, and NextRaise consolidates these PDFs into a unified format, delivering them to the user both in the output and via email.



3. Productivity-Pro Agent

NextRaise saves founders days of manual work, allowing them to focus on their core mission—building great products.



Demo



Live Demo



Video Walkthrough




NextRaise Agent Build (Screenshots)

Agent Build Image 1

Agent Build Image 2

Agent Build Image 3



Code Highlights



1. Webhook: Connecting Tally.so to Agent.ai

Here’s the code the bridges Tally forms and Agent.ai, ensuring every input is captured and processed:

import { createHmac } from "crypto";
import axios from "axios";
import dotenv from 'dotenv';

dotenv.config();

const YOUR_SIGNING_SECRET = process.env.TALLY_SIGNING_SECRET;

export default async function handler(req, res) {
  if (req.method === "POST") {
    const webhookPayload = req.body;
    const receivedSignature = req.headers["tally-signature"];

    const calculatedSignature = createHmac("sha256", YOUR_SIGNING_SECRET)
      .update(JSON.stringify(webhookPayload))
      .digest("base64");

    if (receivedSignature === calculatedSignature) {
      console.log("Webhook received successfully:", webhookPayload);

      const { eventType, data } = webhookPayload;

      if (eventType === "FORM_RESPONSE") {
        console.log("Form Name:", data.formName);
        console.log("Form Fields:", data.fields);

        const founder_name = data.fields.find(
          (f) => f.key === "question_xjN1L5"
        )?.value;
        const founder_email = data.fields.find(
          (f) => f.key === "question_NDBQ9j"
        )?.value;
        const startup_name = data.fields.find(
          (f) => f.key === "question_QMBWaG"
        )?.value;
        const startup_description = data.fields.find(
          (f) => f.key === "question_dN24ed"
        )?.value;
        const startup_website = data.fields.find(
          (f) => f.key === "question_eDxljk"
        )?.value;

        const startup_industry = data.fields.find(
          (f) => f.key === "question_vr0Pyg"
        )?.value;
        const industry_options = data.fields.find(
          (f) => f.key === "question_vr0Pyg"
        )?.options;
        const selected_industry = startup_industry?.map((id) => {
          const option = industry_options.find((opt) => opt.id === id);
          return option?.text || "Unknown";
        });

        const startup_business_model = data.fields.find(
          (f) => f.key === "question_dNZYVD"
        )?.value;
        const model_options = data.fields.find(
          (f) => f.key === "question_dNZYVD"
        )?.options;
        const selected_model = startup_business_model?.map((id) => {
          const option = model_options.find((opt) => opt.id === id);
          return option?.text || "Unknown";
        });

        const startup_market = data.fields.find(
          (f) => f.key === "question_vr0XEd"
        )?.value;
        const market_options = data.fields.find(
          (f) => f.key === "question_vr0XEd"
        )?.options;
        const selected_markets = startup_market?.map((id) => {
          const option = market_options.find((opt) => opt.id === id);
          return option?.text || "Unknown";
        });

        const startup_stage = data.fields.find(
          (f) => f.key === "question_KePpvk"
        )?.value;
        const stage_options = data.fields.find(
          (f) => f.key === "question_KePpvk"
        )?.options;
        const round_type = startup_stage?.map((id) => {
          const option = stage_options.find((opt) => opt.id === id);
          return option?.text || "Unknown";
        });

        const fundraising_round_type = data.fields.find(
          (f) => f.key === "question_LzEDvO"
        )?.value;
        const investment_options = data.fields.find(
          (f) => f.key === "question_LzEDvO"
        )?.options;
        const investment_type = fundraising_round_type?.map((id) => {
          const option = investment_options.find((opt) => opt.id === id);
          return option?.text || "Unknown";
        });

        const unique_selling_point = data.fields.find(
          (f) => f.key === "question_QMx7VY"
        )?.value;

        const investor_type = data.fields.find(
          (f) => f.key === "question_pd0eRZ"
        )?.value;
        const investor_options = data.fields.find(
          (f) => f.key === "question_pd0eRZ"
        )?.options;
        const selected_investor_types = investor_type?.map((id) => {
          const option = investor_options.find((opt) => opt.id === id);
          return option?.text || "Unknown";
        });

        const notable_traction = data.fields.find(
          (f) => f.key === "question_9X67QE"
        )?.value;

        const fundraising_amount = data.fields.find(
          (f) => f.key === "question_OlBeMY"
        )?.value;

        const team_apart = data.fields.find(
          (f) => f.key === "question_eDNaRx"
        )?.value;

        const number_of_investors = data.fields.find(
          (f) => f.key === "question_GKBjAL"
        )?.value;

        console.log({
          founder_name,
          founder_email,
          startup_name,
          startup_description,
          startup_website,
          startup_industry: selected_industry,
          startup_business_model: selected_model,
          startup_market: selected_markets,
          fundraising_round_type: round_type,
          startup_investment_type: investment_type,
          investor_types: selected_investor_types,
          fundraising_amount,
          unique_selling_point,
          notable_traction,
          team_apart,
          number_of_investors,
        });

        const payload = {
          founder_name,
          founder_email,
          startup_name,
          startup_description,
          startup_website,
          startup_industry: selected_industry,
          startup_business_model: selected_model,
          startup_market: selected_markets,
          fundraising_round_type: round_type,
          startup_investment_type: investment_type,
          investor_types: selected_investor_types,
          fundraising_amount,
          unique_selling_point,
          notable_traction,
          team_apart,
          number_of_investors,
        };

        console.log("Prepared Payload:", payload);

        try {
          const response = await axios.post(
            "https://api-lr.agent.ai/v1/agent/4nn8v57mtzbxjlfz/webhook/99cce98b",
            payload,
            { headers: { "Content-Type": "application/json" } }
          );
          console.log("Response from Agent.ai:", response.data);
          res.status(200).send("Webhook processed and forwarded successfully.");
        } catch (error) {
          console.error(
            "Error sending data to Agent.ai:",
            error.response?.data || error.message
          );
          res.status(500).send("Failed to forward webhook data.");
        }
      } else {
        console.error("Unsupported event type received:", eventType);
        res.status(400).send("Unsupported event type.");
      }
    } else {
      console.error("Invalid signature. Rejecting request.");
      res.status(401).send("Invalid signature.");
    }
  } else {
    res.status(405).send("Method Not Allowed");
  }
};
Enter fullscreen mode

Exit fullscreen mode



2. Web API for Generating PDFs

This API gathers outputs from all agents, generates a PDF, and uploads it to a cloud service (imagekit.io):

import PDFDocument from "pdfkit";
import ImageKit from "imagekit";
import dotenv from "dotenv";

dotenv.config();

const imagekit = new ImageKit({
  publicKey: process.env.IMAGEKIT_PUBLIC_KEY,
  privateKey: process.env.IMAGEKIT_PRIVATE_KEY,
  urlEndpoint: process.env.IMAGEKIT_URL_ENDPOINT,
});

export default async function handler(req, res) {
  if (req.method === "POST") {
    const { inputText } = req.body;

    if (!inputText) {
      return res.status(400).json({ error: "inputText is required" });
    }

    try {
      const doc = new PDFDocument();

      const fileName = `generated-${Date.now()}.pdf`;

      const pdfBuffer = [];
      doc.on("data", (chunk) => pdfBuffer.push(chunk));
      doc.on("end", async () => {
        const pdfData = Buffer.concat(pdfBuffer);

        try {
          const uploadResult = await imagekit.upload({
            file: pdfData,
            fileName: fileName,
            useUniqueFileName: true,
          });

          const pdfUrl = uploadResult.url;
          res.status(200).json({ pdfUrl });
        } catch (uploadError) {
          console.error("Error uploading to ImageKit:", uploadError);
          res.status(500).json({ error: "Failed to upload PDF to ImageKit" });
        }
      });

      doc.fontSize(12).text(inputText, 50, 50);

      doc.end();
    } catch (error) {
      console.error("Error generating PDF:", error);
      res.status(500).json({ error: "Failed to generate PDF" });
    }
  } else {
    res.status(405).json({ error: "Method Not Allowed" });
  }
};
Enter fullscreen mode

Exit fullscreen mode



3. Deployment on Vercel

Both the webhook and PDF APIs were deployed on Vercel for fast, scalable performance:



4. GitHub Repository

The complete source code is available here:

Api for NextRaise AI Agent



Agent.ai Experience

Building with Agent.ai was an incredible experience. The platform’s Agent Builder Tool allowed me to design workflows intuitively while leveraging features like webhooks and multi-agent collaboration.



Highlights

  • The agent invoking feature was pivotal for automating complex workflows.
  • Integrating webhooks and external APIs gave me flexibility and control.
  • Watching agents handle a process that usually takes days in under 5 minutes was deeply rewarding.



Challenges

One feature I wish was more flexible is the “Save to Doc” option. It would be incredibly useful if it allowed users to generate a shareable URL for their documents or gave the option to choose which Google Drive account to save to—regardless of whether they have an Agent.ai account or not.



Why NextRaise Stands Out

  • Full-Stack Technology: Webhooks, API calls, and agent invocation combine for a powerful, flexible tool.
  • Seamless Collaboration: Five agents work together for an uninterrupted experience.
  • Real-World Productivity: Founders can go from overwhelmed to pitch-ready in minutes.



Team Submission:

This submission was made by https://dev.to/sholajegede



Final Thoughts

NextRaise simplifies fundraising for startups worldwide, turning a stressful process into an intuitive experience. As someone deeply invested in the startup ecosystem, I’m thrilled to offer a tool that empowers founders to focus on what matters most.

Thank you for checking out my submission! Cheers to building useful and functional AI Agents.

And if you get to use NextRaise AI Agent, I’d love to hear your feedback!



Source link
lol

By stp2y

Leave a Reply

Your email address will not be published. Required fields are marked *

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.