Every startup founder I've talked to does competitor analysis the same way, manually Googling, skimming landing pages, copy-pasting into spreadsheets. It takes hours, it's outdated by next week, and it never gets done consistently. I wanted to build an AI agent that does this autonomously, continuously, and actually takes action on what it finds.
What it does
RivalMap is an autonomous competitor intelligence agent. You give it a startup URL, and it:
- Checks its memory — queries a Neo4j knowledge graph to see what it already knows about this industry
- Discovers competitors — uses Tavily to crawl the web for competitors, pricing pages, funding news, and product features
- Analyzes threats — OpenAI synthesizes everything into a feature matrix, threat scores, and strategic positioning
- Learns for next time — writes new competitor relationships back into Neo4j so it gets smarter with every run
- Acts autonomously — generates a sales battlecard and fires it off via webhook without waiting for human approval
The entire pipeline runs in one click. You watch the agent think, search, reason, and act in real-time through a live execution log.
How I built it
- Next.js App Router + TypeScript for the full-stack framework
- Tailwind CSS + shadcn/ui for a clean, dark-mode enterprise UI
- Tavily API for real-time web search and competitor discovery
- OpenAI GPT-4o for reasoning, threat analysis, and battlecard generation
- Neo4j AuraDB as the persistent knowledge graph, the agent's long-term memory
- Render for deployment via webhook trigger
The key architectural decision was making the agent's "thinking" visible. Every step of the pipeline streams to the UI so you can literally watch it work, checking memory, discovering rivals, scoring threats, and sending the battlecard.
Challenges I ran into
Getting the Neo4j knowledge graph to meaningfully improve results across runs was the hardest part. The agent needed to not just store data, but actually retrieve and use it to produce better analysis the second time around. This was implemented by using Claude as a judge of the data and trying to improve the pipeline by tweaking the pipeline. Balancing real API calls with a responsive UI during a live demo also required careful orchestration.
Accomplishments that I'm proud of
The agent genuinely acts on its own. It doesn't just display data, it generates a deliverable (the battlecard) and sends it out without human intervention. The knowledge graph also creates a real compounding advantage: the more industries RivalMap analyzes, the smarter it gets.
What I learned
Building an autonomous agent isn't about chaining API calls, it's about designing a feedback loop where the agent's outputs become its future inputs. The Neo4j memory layer was the key to making it feel like a system that truly learns rather than just a fancy wrapper around GPT.
What's next for RivalMap
- Heavy usage of LLM-as-a-judge to try and spot small logical errors. Accuracy is really important in this domain.
- Scheduled monitoring, run the agent on a cron to detect new competitors or pricing changes automatically
- Slack/email integration for real-time alerts when threat levels change
- Multi-company portfolio view for VCs tracking competitive dynamics across their investments
Built With
- lucide-react
- neo4j-auradb
- next.js
- openai-gpt-4o
- render
- shadcn/ui
- tailwind-css
- tavily-api
- typescript
Log in or sign up for Devpost to join the conversation.