這是Agent.ai挑戰賽的提交內容:全端代理程式、Productivity-Pro 代理程式和代理程式組裝(查看詳細資訊

我建造了什麼

NextRaise是一款改變遊戲規則的工具,適合希望簡化募款流程的新創公司創辦人。透過整合五個專業代理,NextRaise 將通常需要數天的任務轉變為只需 2-5 分鐘的過程。

身為非洲最大的創業社群之一的社區總監,我親眼目睹了募款活動的規模有多大。從研究投資人到管理推廣,創辦人常常難以在這些任務與建立新創公司之間取得平衡。 NextRaise 透過自動化整個過程來消除這個痛點。

NextRaise 之所以脫穎而出,是因為它符合所有三個挑戰提示:

1. 全端代理

NextRaise 使用並整合了 Agent.ai 中的多項進階功能,例如 Webhooks、呼叫 Web API 以及呼叫其他代理:

  • Webhook 整合:將使用者友善的 Tally.so 表單與 Agent.ai 連接起來,以實現無縫輸入處理。

Webhook 集成

  • 呼叫 Web API:將代理程式的輸出編譯為精美的 PDF,並產生雲端託管連結以方便共享。

呼叫網路 API

  • 代理呼叫:呼叫四個獨立的代理來處理投資者研究、競爭對手分析、投資者外展模板和投資意向書生成等任務。

呼叫其他代理

2. 代理人大會

NextRaise 充當中央代理,收集使用者的輸入,然後觸發不同的代理來執行其任務。它的工作原理如下:

圖片說明

  • NextRaise(中央樞紐):這是一切開始的地方。 NextRaise 從使用者收集所有必要的資訊(即新創公司名稱、產業、融資階段、商業模式、目標市場、網站等)並啟動流程,依序啟動其他代理商。

  • 投資者搜尋代理商:該代理商根據輸入資料辨識與您的新創公司最匹配的投資者。它可以幫助您找到與您的階段、行業和市場相符的合適支持者。

  • 競爭情報代理:此代理提供重要的市場資料、競爭對手分析和行業見解。這些資訊對於調整您的宣傳並為投資者提供了解您的新創公司潛力所需的背景至關重要。

  • 投資者外展代理:該代理商起草個人化的外展訊息,確保它們適合每個投資者的個人資料。它還準備了後續行動時間表,以保持與潛在投資者的接觸。

  • 條款清單建立代理人:此代理商根據創辦人的募款參數起草專業的條款清單。它建立了一份條款清單草案,供創始人在討論進度時使用。

透過 API 呼叫產生 PDF

每個代理程式都會產生其已完成任務的 PDF,NextRaise 將這些 PDF 合併為統一格式,透過輸出和電子郵件將它們傳遞給使用者。

3.生產力專業代理

NextRaise 節省了創辦人的手動工作時間,讓他們能夠專注於自己的核心使命——打造出色的產品。

圖片說明

示範

現場演示

影片演練

{% youtube 1c2GoZs_DbM %}

NextRaise 代理程式建置(截圖)

代理建置映像 1

代理建置映像 2

代理建置映像 3

程式碼亮點

1. Webhook:將 Tally.so 連接到 Agent.ai

以下是連接 Tally 表單和 Agent.ai 的程式碼,確保捕獲和處理每個輸入:

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");
  }
};

2. 用於產生 PDF 的 Web API

此 API 收集所有代理程式的輸出,產生 PDF,並將其上傳至雲端服務 ( 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" });
  }
};

3. Vercel 上的部署

Webhook 和 PDF API 均部署在 Vercel 上,以實現快速、可擴展的效能:

4.GitHub 儲存庫

完整的源程式碼可以在這裡找到:

{% github sholajegede/nextraise-api %}

Agent.ai 經驗

使用 Agent.ai 進行建造是一次令人難以置信的體驗。該平台的代理生成器工具使我能夠直觀地設計工作流程,同時利用網路鉤子和多代理協作等功能。

亮點

  • 代理呼叫功能對於自動化複雜工作流程至關重要。

  • 整合 webhook 和外部 API 給了我靈活性和控制力。

  • 看著客服人員在 5 分鐘內處理一個通常需要數天時間的流程是非常有意義的。

挑戰

我希望更靈活的一項功能是“儲存到文件”選項。如果它允許使用者為其文件產生可共用的 URL,或提供選擇儲存到哪個 Google Drive 帳戶的選項(無論他們是否擁有 Agent.ai 帳戶),那將非常有用。

為什麼 NextRaise 脫穎而出

  • 全端技術: Webhook、API 呼叫和代理呼叫結合,構成了一個強大、靈活的工具。

  • 無縫協作:五名客服人員協同工作,提供不間斷的體驗。

  • 現實世界的生產力:創辦人可以在幾分鐘內從不知所措到準備好推銷。

團隊提交:

此投稿由https://dev.to/sholajgede提交

最後的想法

NextRaise 簡化了全球新創企業的募款流程,將充滿壓力的流程轉變為直覺的體驗。作為一個深度投資於創業生態系統的人,我很高興能夠提供一個工具,讓創辦人能夠專注於最重要的事情。

感謝您查看我提交的內容!為建立有用且實用的人工智慧代理乾杯。

如果您使用NextRaise AI Agent ,我很想聽聽您的回饋!


原文出處:https://dev.to/sholajegede/nextraise-streamline-your-startups-fundraising-journey-with-ai-agents-3j85


共有 0 則留言


精選技術文章翻譯,幫助開發者持續吸收新知。
🏆 本月排行榜
🥇
站長阿川
📝8   💬8   ❤️13
402
🥈
我愛JS
📝1   💬6   ❤️4
88
🥉
酷豪
📝1   ❤️1
50
#4
AppleLily
📝1   💬4   ❤️1
38
#5
💬3  
10
評分標準:發文×10 + 留言×3 + 獲讚×5 + 點讚×1 + 瀏覽數÷10
本數據每小時更新一次