# ๐Ÿง  DevPulseAI โ€” Multi-Agent Signal Intelligence A reference implementation demonstrating how to build a **multi-agent pipeline** that aggregates technical signals from multiple sources, scores them for relevance, assesses risks, and synthesizes an actionable intelligence digest. > **Design Philosophy:** Agents are used **only where reasoning is required.** Deterministic operations (collection, normalization, deduplication) are implemented as plain utilities โ€” not agents. --- ## Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ DATA SOURCES โ”‚ โ”‚ GitHub ยท ArXiv ยท HackerNews ยท Medium ยท HuggingFace โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ raw signals โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ SignalCollector (UTILITY โ€” no LLM) โ”‚ โ”‚ โ€ข Normalizes to unified schema โ”‚ โ”‚ โ€ข Deduplicates via source:id composite key โ”‚ โ”‚ โ€ข Filters incomplete signals โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ normalized signals โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ RelevanceAgent (AGENT โ€” gpt-4.1-mini) โ”‚ โ”‚ โ€ข Scores each signal 0โ€“100 for developer relevance โ”‚ โ”‚ โ€ข Considers: novelty, impact, actionability, timeliness โ”‚ โ”‚ โ€ข Falls back to heuristics if no API key โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ scored signals โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ RiskAgent (AGENT โ€” gpt-4.1-mini) โ”‚ โ”‚ โ€ข Assesses security vulnerabilities โ”‚ โ”‚ โ€ข Flags breaking changes and deprecations โ”‚ โ”‚ โ€ข Rates risk: LOW / MEDIUM / HIGH / CRITICAL โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ risk-assessed signals โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ SynthesisAgent (AGENT โ€” gpt-4.1) โ”‚ โ”‚ โ€ข Cross-references relevance + risk data โ”‚ โ”‚ โ€ข Produces executive summary โ”‚ โ”‚ โ€ข Generates actionable recommendations โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ–ผ ๐Ÿ“„ Intelligence Digest ``` --- ## Why Signal Collection Is Not an Agent This is an **intentional, opinionated design choice** โ€” not a shortcut. Signal collection involves: - Fetching data from HTTP APIs (deterministic) - Normalizing fields to a unified schema (mechanical transformation) - Deduplicating by composite key (hash comparison) **None of these tasks require reasoning, judgment, or language understanding.** Wrapping collection in an `Agent` class would be _decorative_ โ€” it would have an LLM import that never gets called. This misleads readers into thinking an LLM is necessary, when the actual logic is a `for` loop with a `set()`. > **Rule of thumb:** If you can write the logic as a pure function with no ambiguity, it's a utility. If the output depends on understanding context, making judgment calls, or generating natural language, it's an agent. --- ## Agent Roles & Model Selection | Component | Type | Model | Why This Model | |---|---|---|---| | `SignalCollector` | **Utility** | _none_ | Deterministic โ€” no reasoning required | | `RelevanceAgent` | **Agent** | `gpt-4.1-mini` | Classification task โ€” fast, cheap, high-volume | | `RiskAgent` | **Agent** | `gpt-4.1-mini` | Structured analysis โ€” careful but not expensive | | `SynthesisAgent` | **Agent** | `gpt-4.1` | Cross-referencing & summarization โ€” needs strongest reasoning | **Single provider by default (OpenAI)** to reduce onboarding friction. Override per-agent via environment variables: ```bash export MODEL_RELEVANCE=gpt-4.1-nano # cheaper, faster export MODEL_RISK=o4-mini # deeper reasoning for risk export MODEL_SYNTHESIS=gpt-4.1 # default, strongest ``` --- ## How to Run ### Quick Verification (No API Key Required) ```bash cd advanced_ai_agents/multi_agent_apps/devpulse_ai python verify.py ``` This runs the full pipeline with mock data in **<1 second**. No network calls, no API keys. Expected output: ``` [OK] DevPulseAI reference pipeline executed successfully ``` ### Full Pipeline (With API Key) ```bash pip install -r requirements.txt export OPENAI_API_KEY=sk-... python main.py ``` Without an API key, agents automatically fall back to heuristic scoring. ### Streamlit Dashboard ```bash streamlit run streamlit_app.py ``` --- ## Project Structure ``` devpulse_ai/ โ”œโ”€โ”€ agents/ โ”‚ โ”œโ”€โ”€ __init__.py # Package exports + design docs โ”‚ โ”œโ”€โ”€ signal_collector.py # UTILITY โ€” normalize & dedup โ”‚ โ”œโ”€โ”€ relevance_agent.py # AGENT โ€” score relevance (gpt-4.1-mini) โ”‚ โ”œโ”€โ”€ risk_agent.py # AGENT โ€” assess risks (gpt-4.1-mini) โ”‚ โ””โ”€โ”€ synthesis_agent.py # AGENT โ€” produce digest (gpt-4.1) โ”œโ”€โ”€ adapters/ โ”‚ โ”œโ”€โ”€ github.py # GitHub trending repos โ”‚ โ”œโ”€โ”€ arxiv.py # ArXiv recent papers โ”‚ โ”œโ”€โ”€ hackernews.py # HackerNews top stories โ”‚ โ”œโ”€โ”€ medium.py # Medium AI/ML blogs โ”‚ โ””โ”€โ”€ huggingface.py # HuggingFace trending models โ”œโ”€โ”€ workflows/ โ”‚ โ””โ”€โ”€ signal-intelligence-pipeline.json โ”œโ”€โ”€ main.py # Full pipeline runner โ”œโ”€โ”€ verify.py # Mock-data verification (<1s) โ”œโ”€โ”€ streamlit_app.py # Interactive dashboard โ””โ”€โ”€ requirements.txt # Minimal deps (single provider) ``` --- ## Optional Extensions (Advanced Users) These are **not required** for the reference implementation, but show how the architecture extends: 1. **Multi-provider models** โ€” Swap `RelevanceAgent` to use Anthropic Claude or Google Gemini by updating the model config. The `agno` framework supports multiple providers. 2. **Vector search** โ€” Add a Pinecone or Qdrant adapter to store and retrieve signals semantically for long-term pattern detection. 3. **Streaming digests** โ€” Use WebSocket streaming from `SynthesisAgent` for real-time intelligence feeds. 4. **Custom adapters** โ€” Add new signal sources by implementing a `fetch_*` function that returns `List[Dict]` with the standard schema (`id`, `source`, `title`, `description`, `url`, `metadata`). 5. **Feedback loop** โ€” Store user feedback (๐Ÿ‘/๐Ÿ‘Ž) in Supabase and use it to fine-tune relevance scoring over time. --- ## Dependencies ``` agno # Agent framework openai # LLM provider (single default) httpx # HTTP client for adapters feedparser # RSS/Atom parsing for Medium streamlit>=1.30 # Interactive dashboard ``` No `google-generativeai` required. Gemini is an optional extension if users want multi-provider support โ€” install `google-genai` (not the deprecated `google-generativeai`) separately. --- ## Design Tradeoffs | Decision | Tradeoff | Why | |---|---|---| | Single provider default | Less flexibility | Reduces onboarding from 2+ keys to 1 | | Signal collection as utility | Less "agentic" demo | Honest architecture โ€” agents where reasoning exists | | Heuristic fallbacks | Lower quality without API key | Pipeline always works, even for evaluation | | 5 signals per source default | Less data | Keeps demo fast (<10s with API, <1s mock) | | No async in agents | Less throughput | Simpler code, clearer educational value | --- _Built as a reference implementation for [awesome-llm-apps](https://github.com/Shubhamsaboo/awesome-llm-apps)._