Inspiration

We are entering the Action Era of AI. While chatbots are great at answering questions, they fail at real-world business tasks that span days or weeks. We realized that procurement—the act of finding vendors, requesting quotes, and negotiating prices—is the perfect candidate for automation. It’s tedious, asynchronous, and requires constant follow-up.

We asked ourselves: What if we could build an agent that doesn't just chat, but actually "does"? An agent that can wake up, work, sleep for three days while waiting for a vendor reply, and wake up again without losing context. That inspiration led to Procurement Shark, a "Marathon Agent" designed to handle the long-tail friction of business negotiation.

What it does

Procurement Shark is an autonomous agent that manages the entire lifecycle of finding and negotiating with suppliers.

  • The Hunter: It takes a user's goal (e.g., "Find 500 custom hoodies under $15") and autonomously scouts the web for viable wholesale vendors, filtering out retail sites.
  • The Outreach: It drafts and sends personalized inquiry emails to these vendors, asking for quotes and lead times.
  • The Marathon (State Management): Unlike a standard chatbot session that times out, our agent persists its state to a database. It can "sleep" for days while waiting for replies.
  • The Shark (Negotiation): When a vendor replies with a quote, the agent uses Gemini 2.5 Pro to analyze the attached PDF/Invoice. It compares the offer against the user's budget.
  • If the price is too high, it autonomously drafts a counter-offer.
  • If the price is right, it requests a contract for the user to sign.

How we built it

We built the system using a robust, event-driven architecture:

  • Orchestration: We used LangGraph to build a cyclic state graph. This allows the agent to move between "Scouting," "Drafting," and "Negotiating" states non-linearly.
  • The Brain: We leveraged Google's Gemini 2.5 Pro for its massive context window and reasoning capabilities. It handles everything from scraping vendor capabilities to parsing complex unstructured invoice data.
  • Backend: A FastAPI server manages the communication between the user dashboard and the agent, using SQLite for persistent state storage.
  • Search: We integrated DuckDuckGo for autonomous vendor discovery.
  • Simulation: To solve the problem of demonstrating a 3-day process in a 2-minute hackathon demo, we built a "God Mode" injection system. This allows us to inject mock vendor replies (with specific prices) into the system in real-time, instantly triggering the agent's wake-up and reasoning protocols.

Challenges we ran into

  • The "Time" Problem: Building an agent that operates over days is harder than one that operates over minutes. We had to design a database schema that acted as a "long-term memory" so the agent wouldn't hallucinate its progress after a server restart.
  • Demoing Asynchrony: It's impossible to show judges a real-time negotiation that takes 72 hours. We had to engineer a specific "Debug/Injection" API to force state changes instantly, effectively allowing us to "time travel" during the demo.
  • Unstructured Data: Vendors send quotes in every format imaginable—body text, Excel, PDF, images. Relying on Gemini's multimodal capabilities was crucial to parse these consistently without brittle regex scripts.

Accomplishments that we're proud of

  • True Autonomy: The agent doesn't just output text; it modifies database state and makes decisions based on numerical constraints (Budget vs. Offer).
  • The "God Mode" Dashboard: We built a clean, dark-mode UI that visualizes the agent's internal thought process and allows us to test edge cases (like a vendor offering $16.00 vs $14.50) instantly.
  • Stateful Architecture: We successfully implemented a LangGraph system that separates the "Brain" from the "Memory," ensuring the agent is robust enough for long-horizon tasks.

What we learned

  • Agents need Memory, not just Context: We learned that for long-running tasks, a massive context window isn't enough; you need structured database state to track where you are in a process (e.g., "Vendor A is at stage 3, Vendor B is at stage 1").
  • Gemini is a Logic Engine: We moved away from thinking of the LLM as a "text generator" and started treating it as a "logic engine" that routes control flow based on data.

What's next for Procurement Shark

  • Real Gmail Integration: Replacing our mock email client with the actual Gmail API to send real emails.
  • Multi-Round Negotiation: Implementing strategies (e.g., "Good Cop/Bad Cop") where the agent can haggle back and forth multiple times before reaching a final price.
  • Payment & Contract Signing: Integrating DocuSign and Stripe so the agent can not only find the deal but close it entirely.

Built With

Share this project:

Updates