⚡ The Inspiration: The Crisis of Attention

In the remote-first era, Slack is the central nervous system of the modern enterprise. But as organizations scale, that nervous system becomes overwhelmed. Engineers and managers suffer from chronic "notification fatigue"—constantly context-switching between #general, #alerts, and #deployments, terrified of missing a critical blocker but wasting hours parsing through low-signal noise.

We realized that human attention is a strictly finite resource, governed by a rapidly deteriorating Signal-to-Noise Ratio (SNR):

$$ \text{Productivity} = \frac{\text{Valuable Signal}}{\text{Total Slack Noise}} $$

As the volume of noise ($N$) approaches infinity, productivity approaches zero. We didn't just want to build another chatbot; we wanted to build a Personal Chief of Staff—an autonomous AI layer that reads everything, understands context, and tells you exactly what requires your attention right now.


🚀 What It Does: Enter PulseAgent

PulseAgent is a state-of-the-art AI triage layer for Slack. Instead of doom-scrolling through 50 unread pings, you simply ask PulseAgent: "What needs me right now?"

It instantly scans your workspace, evaluates every message using a Large Language Model (Groq, OpenAI, or Anthropic), and scores them for urgency. It then delivers a prioritized Block Kit briefing card directly to you.

🔥 Legendary Features:

  • Algorithmic Triage: Automatically categorizes messages into Blocker, PR Review, Question, and FYI.
  • MCP Context Boost (The Secret Weapon): PulseAgent integrates with GitHub, Jira, Linear, and Notion via robust OAuth flows. If a message mentions a Pull Request you own or a Jira ticket assigned to you, the agent artificially boosts its urgency score to ensure you never miss critical feedback.
  • Stateful Deduplication: When you click "Done ✓" on a task, it's securely written to our SaaS PostgreSQL database. Future Real-Time Search (RTS) API scans filter it out instantly. You never fight the same fire twice.
  • Bring Your Own Key (BYOK): Users securely add their own LLM API keys via the Settings modal. Keys are encrypted at rest using AES-128 via cryptography.fernet.

🧠 The Math Behind the Magic

To ensure PulseAgent doesn't just guess priorities, we engineered a deterministic urgency heuristic layered over the non-deterministic LLM output. The final urgency score $\mathcal{U}$ for a given message $m$ is calculated as:

$$ \text{Final Score} = \min \Big( 10, \ \text{LLM Score} + (\text{Context Matches} \times 3) \Big) $$

Where:

  • LLM Score is the base 1-10 urgency score determined by the Groq/OpenAI inference engine.
  • Context Matches is the number of external references found (e.g., an open GitHub PR or an assigned Jira ticket).
  • Multiplier (3) ensures that any message tied to your actual active workflows immediately spikes to the top of your triage list.

🏗️ How We Built It

We architected PulseAgent for blazing speed, absolute privacy, and multi-tenant scale:

  1. Core Framework: Python 3.10 and the Slack Bolt framework, connecting via Socket Mode to avoid exposing public HTTP endpoints.
  2. Data Ingestion: We leveraged Slack's search.messages API to dynamically fetch a user's recent workspace history.
  3. Intelligence Layer: We integrated the Groq API (llama-3.3-70b-versatile) for ultra-low latency inference, enforcing a strict JSON schema on the output.
  4. External Context (MCP): We built a lightweight Flask server running in a background thread to handle standard OAuth 2.0 web redirects, brokering the connection between Slack and tools like GitHub and Linear.
  5. Storage: We migrated to a SaaS PostgreSQL database for persistent, scalable state management (dismissed messages, encrypted API keys, and user connection tokens).

⚔️ Challenges We Conquered

Our biggest architectural hurdle was "LLM Context Bloat." If we sent an entire day's worth of raw Slack data to the LLM, the context window would saturate, inference times would spike, and the AI would hallucinate priorities.

We solved this by engineering a local deduplication and pre-filtering pipeline. By implementing strict regex heuristics to drop automated bot noise, and querying the Stateful Dismissal Postgres table in $O(1)$ time, we successfully drop 80% of messages before they ever incur an LLM token cost.

Furthermore, securely handling external OAuth flows within a Slack bot was a massive undertaking. We had to embed a Flask server alongside the Bolt app to listen for OAuth callbacks, and implemented rigorous AES-128 Fernet encryption to ensure no user API keys or OAuth tokens were ever stored in plaintext.


🏆 Accomplishments We're Proud Of

We are incredibly proud of pioneering the Bring Your Own Key (BYOK) architecture within a Slack bot. By allowing users to securely provide their own LLM keys, we successfully built a zero-cost compute model for the bot operator, making PulseAgent infinitely scalable and free to run.

Additionally, the Context Boost feels like absolute magic. Seeing the AI instantly recognize a Jira ticket ID #ENG-404 in a casual Slack message, silently cross-reference it with the Jira API, realize it's assigned to you, and immediately flag it as a 10/10 blocker is a revolutionary UX.


💡 What We Learned

We learned that context is everything. An LLM cannot accurately score a message's urgency in a vacuum; it needs to know who the user is, what they are working on, and what is currently blocking them. By injecting external state via our custom integrations, the AI's accuracy skyrocketed from a "cool toy" to an indispensable tool.


🔮 What's Next for PulseAgent

Now that we have built a fully scalable SaaS architecture backed by PostgreSQL and robust multi-platform OAuth, the next immediate step is deploying PulseAgent to the Slack Marketplace as a multi-tenant SaaS application. We are also designing a web-based analytics dashboard where teams can visualize exactly how much time and money PulseAgent is saving them every single week.

Built With

  • apscheduler
  • block-kit
  • github-api
  • groq
  • llama-3
  • mcp
  • python
  • real-time-search-api
  • slack-api
  • slack-bolt
  • sqlite
Share this project:

Updates