Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for AgentContext
AgentContext: Real-Time Workspace Context Synthesis 💡 Inspiration Modern software engineers suffer from severe cognitive load and context-switching latency. Whenever a developer is assigned a task, bug, or ticket, they must manually coordinate information across three disjoint planes of work:
The Issue Tracker (Jira): What is the core problem, priority, and assignee? The Code Repository (GitHub): Are there active Pull Requests, code changes, or open issues addressing this? The Workspace Discussions (Slack): What was previously decided in team chats and threads regarding this issue? We quantified this context-switching cost using a simple latency equation: C
switch
N platforms × T lookup + T synthesis C switch =N platforms ×T lookup +T synthesis
Where N
platforms
3 N platforms =3, T lookup T lookup is the average time spent navigating and searching each platform (~2 minutes), and T synthesis T synthesis is the time required to manually compile the information into an action plan (~5 minutes). This results in: C
switch
3 × 2 +
5
11 minutes per ticket C switch =3×2+5=11 minutes per ticket
Our inspiration was to reduce C switch ≈ 0 C switch ≈0 by building a native Slack Agent that semantically detects when a ticket is mentioned, gathers context from all three platforms in parallel, and delivers a unified task briefing card directly to the user's DM.
🛠️ How We Built It The project is built entirely in Python using the Slack Bolt Framework, Pydantic AI, and the Model Context Protocol (MCP).
Mermaid diagram
Semantic Intent Detection & Normalization Instead of static regex keyword matching, we implemented a Pydantic AI intent_agent using strict output schemas. It semantically analyzes channel messages to determine if a user is asking to debug/investigate a ticket, extracts the ticket ID (e.g. SAM1-18), and normalizes shorthand inputs (e.g. 18 becomes BUG-18).
Parallel Multi-Source Ingestion When a trigger is detected, the agent launches asynchronous worker tasks to fetch details from three sources concurrently:
Jira REST API (v3): Grabs issue details, priority, and processes Atlassian Document Format (ADF) into clean text. GitHub REST API: Queries pull requests and issues scoped to the developer's repositories, fetching file diffs and open reviews. Slack Real-Time Search (RTS) API: Invokes assistant.search.context to dynamically retrieve message context and threads matching the ticket ID.
Slack MCP Integration When a user token is present, the agent dynamically registers the official Slack MCP Server (https://mcp.slack.com/mcp). This allows the agent to discover and invoke Slack's workspace search and channel reading tools dynamically.
Interactive UX & Block Kit We designed a premium Slack interface using:
Real-time Task Progress Streaming: Shows a live checklist (Checking Jira, Checking GitHub, etc.) to eliminate wait anxiety. Formatted Briefing Cards: Clean visual priority badges, clickable Jira/GitHub markdown links, and interactive thumbs up/down feedback buttons. Conversational Thread Memory: Saves the briefing history to the thread. If a user replies inside the thread asking for more details, the agent is triggered with full memory of the briefing, allowing for interactive developer follow-ups. 🚧 Challenges We Faced Slack DM Threading Constraints: Streaming updates to a direct message thread requires a pre-established root message. We resolved this by first publishing an initial root message to the user's DM, capturing its timestamp, and using it as the target thread_ts for the streaming checklist. GitHub Global Search Noise: Initially, the GitHub Search API searched all public repositories globally, matching unrelated code. We solved this by implementing configurable scopes (GITHUB_USER / GITHUB_ORG) in our .env configuration to restrict searches strictly to the developer's workspace. Local LLM Output Validation: Local models (like Ollama llama3.1:8b) sometimes struggle with outputting strict JSON schemas under constraints. We implemented a robust regex-backed python fallback parser to ensure the application degrades gracefully and never fails to render a briefing. 🎓 What We Learned Asynchronous Integration: Handling multiple REST APIs in parallel using Python's asyncio is critical for real-time chat agents. Design for Portability: By leveraging the Model Context Protocol (MCP), we learned how to build agents that are decoupled from specific APIs and can dynamically adapt to the tools available in their environment. UX Matters: Developers are busy. Providing instant progress tracking, clean typography layouts, and inline thread follow-ups transforms an agent from a simple novelty into an essential productivity tool.
Log in or sign up for Devpost to join the conversation.