Skip to content

Vlangf/SignalLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SignalLens Intelligence Briefing

SignalLens cover image

Live GTM intelligence briefing for revenue teams.

The app turns live public web data into a sales-ready competitive battlecard by launching a parallel agent swarm:

  • Competitor Discovery Agent
  • Hiring Agent
  • Product Agent
  • Sentiment Agent
  • Risk Agent
  • Coordinator Agent

This is not a chatbot, not a generic AI search UI, and not a passive report generator. It is a GTM intelligence system with realtime agent activity, competitor discovery, source discovery, scraped evidence, competitor pressure scores, sales talk tracks, objection handling, and a final synthesized market battlecard for sales calls, campaign planning, and strategic account reviews.

Hackathon fit

The app is built for revenue teams that need current competitor context before they act. It continuously turns live web signals into structured GTM objects:

  • sales-ready competitive battlecards
  • competitor pressure scores
  • pricing, product, hiring, sentiment, and risk signals
  • discovery questions and objection-handling talk tracks
  • Bright Data-backed evidence trails for every important claim

Secondary fit: Finance & Market Intelligence through pricing pressure, market movement, and vendor risk signals.

Current MVP

Backend is real FastAPI/Python infrastructure:

  • FastAPI + Pydantic v2
  • asyncio concurrent swarm runner
  • WebSocket streaming
  • SQLModel/SQLite run persistence
  • provider abstraction
  • Bright Data provider for SERP/unlocking/scraping zones
  • AI/ML API primary reasoning provider with OpenAI-compatible fallback
  • Cognee-style competitive memory for previous competitors, competitive pressure scores, and change tracking

Runtime policy: no product/runtime mock mode. A real run requires Bright Data credentials for web intelligence and an OpenAI-compatible API key for synthesis.

Frontend is a high-impact Next.js GTM intelligence-briefing dashboard:

  • use-case selector: Sales Battlecard, Market Movement Brief, Pricing Watch, Strategic Account Intel
  • live intelligence graph: input -> Bright Data SERP -> Web Unlocker -> GTM brief
  • provider badges for Bright Data live evidence, AI/ML API reasoning, and Cognee memory when used
  • agent cards and activity stream
  • competitor pressure scores
  • sales talk track with positioning points, objection handling, discovery questions, and proof points
  • Coordinator report panel with collapsed evidence trail

Configuration

Create .env from .env.example and fill real credentials:

BRIGHTDATA_API_KEY=...
BRIGHTDATA_SERP_ZONE=serp_api1
BRIGHTDATA_UNLOCKER_ZONE=...
BRIGHTDATA_API_URL=https://api.brightdata.com/request
AIML_API_KEY=...
AIML_BASE_URL=https://api.aimlapi.com/v1
AIML_MODEL=gpt-4o-mini
# Optional fallback / override
OPENAI_API_KEY=...
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o-mini
LLM_PROVIDER=

# Cognee uses these generic OpenAI-compatible variables.
# For AI/ML API, copy AIML_API_KEY/AIML_BASE_URL/AIML_MODEL here.
LLM_API_KEY=...
LLM_MODEL=gpt-4o-mini
LLM_ENDPOINT=https://api.aimlapi.com/v1
EMBEDDING_API_KEY=...
EMBEDDING_PROVIDER=openai_compatible
EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_ENDPOINT=https://api.aimlapi.com/v1
EMBEDDING_DIMENSIONS=1536

DATABASE_URL=sqlite:///./signallens.db
COGNEE_ENABLED=false
COGNEE_BACKEND=json
COGNEE_DATASET=signallens-competitive-memory
COGNEE_MEMORY_PATH=./signallens_memory.json

# Simple hackathon access gate. Share these with judges.
HACKATHON_AUTH_ENABLED=true
HACKATHON_AUTH_USERNAME=judge
HACKATHON_AUTH_PASSWORD=signallens-demo

Bright Data is the web-intelligence backbone. The provider layer routes search through a Bright Data SERP API zone and page extraction through a Bright Data Web Unlocker zone. BRIGHTDATA_ZONE is still accepted as a legacy fallback, but new setups should use the explicit BRIGHTDATA_SERP_ZONE and BRIGHTDATA_UNLOCKER_ZONE variables.

AI/ML API is the reasoning backbone. If AIML_API_KEY exists, the Coordinator and LLM-backed competitor discovery use the AI/ML API OpenAI-compatible endpoint by default. If it is absent, the app falls back to OPENAI_API_KEY / OPENAI_BASE_URL. Set LLM_PROVIDER=openai only when you want to force the fallback provider even with AI/ML API credentials present.

Cognee memory is optional. Set COGNEE_ENABLED=true to load previous competitive context before a run and save a compact summary after completion. Use COGNEE_BACKEND=cognee to call the real cognee Python package (cognee.add, cognee.cognify, cognee.search) against COGNEE_DATASET; use COGNEE_BACKEND=json for local hackathon-safe storage at COGNEE_MEMORY_PATH. Memory remains non-fatal, emits memory_loaded / memory_saved events with provider=cognee, and shows What changed since last run when prior context exists.

Hackathon auth is enabled by default in .env.example. The frontend shows a small login screen, the backend protects API routes, and WebSockets pass the same token through the auth query parameter. /health stays open for Docker health checks.

How the app uses Bright Data

  • SERP/search: each agent sends live web queries through the Bright Data SERP API zone to discover current public sources.
  • Web Unlocker/scraping: discovered URLs are fetched through the Bright Data Web Unlocker zone so agents can extract page title, text, and snippets even when sites rate-limit or block simple bots.
  • Evidence trace: findings keep a query -> source URL -> scraped snippet trail, and the UI marks Bright Data-powered search/scrape events inside the live intelligence graph and evidence trail.
  • Not used for reasoning: Bright Data supplies live web data; the Coordinator LLM synthesizes the final GTM brief from the collected evidence.

How the app uses AI/ML API

  • Competitor discovery: the LLM first proposes likely direct competitor domains before SERP fallback is used.
  • Verification and synthesis: the LLM verifier can validate SERP candidates, extract structured GTM findings, and synthesize the final sales-ready report.
  • Provider visibility: LLM events include provider=aiml, and the UI renders them as LLM · AI/ML API.
  • Test safety: tests use fake chat completions and do not call paid APIs.

How the app uses Cognee

  • Memory lookup: before each run, enabled memory loads prior competitors, competitive pressure scores, prior verdict, and evidence summaries by target domain.
  • Real Cognee backend: with COGNEE_BACKEND=cognee, SignalLens calls cognee.search on load and cognee.add + cognee.cognify on save.
  • Local fallback backend: with COGNEE_BACKEND=json, SignalLens stores the same compact memory shape locally for deterministic demos.
  • Change tracking: the Coordinator receives memory context and asks the LLM to produce what_changed_since_last_run.
  • Memory save: after successful completion, the app saves verified competitors, competitive pressure scores, final verdict, and top evidence summaries.
  • Non-fatal design: memory load/save failures never fail the run.
  • Visibility: memory_loaded / memory_saved events use provider=cognee; the UI only shows the Cognee badge when memory was actually loaded.

Quick start: backend

cd <repo>
cp .env.example .env
# edit .env with real Bright Data and OpenAI-compatible credentials
uv sync --dev
uv run uvicorn app.main:app --app-dir backend --reload --port 8000

Quick start: Docker Compose

Run backend and frontend together:

cd <repo>
cp .env.example .env
# edit .env with real Bright Data and OpenAI-compatible credentials
docker compose up --build

Open the UI:

http://127.0.0.1:3000

Backend health check:

curl http://127.0.0.1:8000/health

Default demo access from .env.example:

Login: judge
Password: signallens-demo

Docker Compose uses the explicit project name signallens, so local images are named signallens-backend:latest and signallens-frontend:latest even if the repository folder has another name.

Docker Compose services:

  • backend: FastAPI on http://127.0.0.1:8000, SQLite stored in Docker volume signallens_data at /data/signallens.db.
  • frontend: Next.js on http://127.0.0.1:3000, built with NEXT_PUBLIC_API_URL=http://127.0.0.1:8000.

Stop and remove containers:

docker compose down

Remove containers and local SQLite volume:

docker compose down -v

Health check:

curl http://127.0.0.1:8000/health

Start a real run:

curl -X POST http://127.0.0.1:8000/api/runs \
  -H 'X-Hackathon-Auth: <base64-login-password>' \
  -H 'Content-Type: application/json' \
  -d '{"company_name":"Notion","domain":"notion.so","competitors":["linear.app","coda.io"],"competitor_mode":"provided_plus_auto","use_case":"sales_battlecard"}'

Fetch a run:

curl -H 'X-Hackathon-Auth: <base64-login-password>' http://127.0.0.1:8000/api/runs/<run_id>

Realtime stream:

# Example with websocat if installed
websocat 'ws://127.0.0.1:8000/ws/runs/<run_id>?auth=<base64-login-password>'

Generate the demo auth token for curl/WebSocket examples:

printf 'judge:signallens-demo' | base64

Quick start: frontend

cd <repo>/frontend
npm install
npm run dev

Open http://127.0.0.1:3000.

If backend is not on http://127.0.0.1:8000, set:

NEXT_PUBLIC_API_URL=http://your-backend:8000 npm run dev

API

When HACKATHON_AUTH_ENABLED=true, protected API requests must include X-Hackathon-Auth: <base64-login-password>. The browser UI handles this after login.

POST /api/runs

{
  "company_name": "Stripe",
  "domain": "stripe.com",
  "competitors": ["adyen.com", "paddle.com"]
}

Response:

{ "run_id": "uuid" }

GET /api/runs/{run_id} returns status, events, findings, agent results, and final report.

WebSocket /ws/runs/{run_id} streams events:

  • run_started
  • agent_started
  • query_executed
  • source_discovered
  • finding
  • agent_completed
  • coordinator_started
  • final_report
  • run_failed

Tests

Tests use local fake transports/providers only to avoid paid/network calls. Runtime code does not expose a mock/demo mode.

cd <repo>
uv run pytest -q
uv run ruff check backend
cd frontend
npm test
npm run build

Structure

backend/
  app/
    main.py
    config.py
    models/
      schemas.py
      db.py
    providers/
      base.py
      brightdata_provider.py
    agents/
      base.py
      pricing_agent.py
      hiring_agent.py
      product_agent.py
      sentiment_agent.py
      risk_agent.py
      coordinator.py
    services/
      llm.py
      storage.py
      swarm_runner.py
    api/
      routes.py
      websocket.py
  tests/
frontend/
  app/
    page.tsx
    layout.tsx
    globals.css

About

Live GTM intelligence briefing using Bright Data, AI/ML API, and Cognee to turn web data into sales-ready competitive battlecards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors