Inspiration

The project was inspired by a gap we noticed in how real-time financial and business insights are delivered. While AI platforms provide powerful contextual search, there was no unified system that combines verified facts, live market data, trend analysis, sentiment evaluation, and visual representation - all in an interactive and automated format. PocketIntel was built to fill that gap.

What it does

PocketIntel allows users to ask natural language questions like “How did Apple perform financially last year?” or “What’s the trend of Bitcoin over the last month?” and get back smart, real-time insights—complete with charts, summaries, citations, and visual analytics. It combines Sonar’s deep research capabilities with structured financial data, sentiment trends, and custom visualizations to deliver comprehensive answers.

How we built it

  • Central Logic: At the heart of the system is Perplexity’s Sonar API, which interprets user queries by extracting the subject and focus. This interpretation drives all downstream actions.
  • Backend: Built with FastAPI and fully asynchronous, our backend maps Sonar’s insights to various APIs (e.g. Tiingo for stock data, Google Trends for search interest, and NewsAPI for sentiment).
  • Chart Pipeline: The backend translates Sonar output into structured metadata (e.g. visualizationType, xKey, yKey) which guides chart generation using Recharts.
  • Frontend: The React 18 frontend (with Typescript + Tailwind and Vite build) dynamically renders dashboards with modular information cards and charts - all driven by structured agent output.
  • Agent Coordination: Multiple agents are orchestrated by an intent-aware SONAR (perplexity) planner that dynamically decides what data is needed and how to process it.
  • Infrastructure: Deployed on Railway (backend) and Vercel (frontend), with environment-based API key management.

Challenges we ran into

  • Async Coordination: Maintaining a smooth async pipeline between backend tasks and frontend rendering required careful orchestration to avoid blocking or incomplete responses.
  • Metadata Consistency: Standardizing output like chart types and axis keys across dynamic queries was essential for rendering reliable charts.
  • Intent Filtering: Some queries didn't require deep research. We built logic to identify and shortcut such queries for performance optimization.
  • API Rate Limits: Services like Tiingo and Polygon had strict quotas. We added caching and fallback strategies to mitigate overuse.
  • Data Normalization: Varying timestamp formats and missing fields across APIs required a normalization layer before frontend consumption.
  • Multi-Service Deployment: Ensuring stability across separately deployed backend and frontend services while securing API keys added operational complexity.

Accomplishments that we're proud of

  • Successfully orchestrated multiple AI agents into a unified async pipeline.
  • Built a fully dynamic visualization engine driven entirely by structured metadata.
  • Integrated diverse APIs to enrich financial responses without manual intervention.
  • Delivered a robust user experience that feels real-time and conversational.

What we learned

  • How to leverage Sonar’s subject/focus extraction to drive precise and dynamic data workflows.
  • The importance of structuring agent output for downstream rendering—embedding metadata directly enabled a seamless frontend experience.
  • How to balance intelligent analysis with performance by short-circuiting simple factual queries.

What's next for PocketIntel – Financial insights simplified

We're looking to:

  • Add user personalization based on query history and behavior.
  • Introduce multi-language support for global reach.
  • Integrate more data providers (e.g. YCharts, Alpha Vantage) for diversified insights.
  • Build a mobile-first interface for finance on the go.
  • Add a financial knowledge assistant mode, enabling users to learn concepts interactively while exploring insights.

Built With

Share this project:

Updates