Skip to content

Add LangGraph agent with SSE streaming and notifications UI#6

Open
yawbtng wants to merge 3 commits into
mainfrom
build-langgraph-agent
Open

Add LangGraph agent with SSE streaming and notifications UI#6
yawbtng wants to merge 3 commits into
mainfrom
build-langgraph-agent

Conversation

@yawbtng

@yawbtng yawbtng commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • LangGraph Agent Backend: Custom StateGraph agent with intent routing, tool execution, and human-in-the-loop approval flow for email/calendar actions
  • SSE Streaming API: Real-time chat endpoint with event types (status, token, tool_result, approval_required, done, error)
  • Google Workspace Integration: GWS CLI runner for Gmail, Calendar, Docs, and Drive tools
  • Heartbeat Service: Background loop for proactive nudges (upcoming meetings, overdue tasks, urgent emails)
  • Notifications UI: Frontend panel with real-time polling and notification context provider
  • Supporting Infrastructure: Session/task management APIs, in-memory store, Pydantic settings config, convenience start script

New Backend Modules

  • backend/app/agent/ — StateGraph definition, nodes, prompts, state, tools (GWS, Exa, memory, notifications, data)
  • backend/app/api/ — Chat (SSE), sessions, tasks, health, notifications endpoints
  • backend/app/core/ — GWS CLI runner, SSE helpers
  • backend/app/services/ — Heartbeat service, in-memory store
  • backend/app/config.py — Pydantic settings from .env

Frontend Changes

  • frontend/src/components/Notifications/ — NotificationsPanel + NotificationCard
  • frontend/src/contexts/NotificationsContext.tsx — Global notification state
  • Updated layout and sidebar to integrate notifications

Test plan

  • Backend starts without errors: cd backend && python app/main.py
  • Health endpoint responds: GET /health
  • Chat SSE endpoint streams events: POST /api/chat
  • Notifications panel renders in frontend sidebar
  • Human-in-the-loop approval flow blocks email/calendar actions

yawbtng added 3 commits March 7, 2026 16:59
… workspace orchestrator

- Implement custom LangGraph StateGraph agent with intent routing, tool execution nodes,
  and human-in-the-loop approval flow (backend/app/agent/)
- Add FastAPI SSE streaming endpoints for real-time chat (backend/app/api/chat.py)
- Add session, task, health, and notification API routes (backend/app/api/)
- Implement GWS CLI runner for Google Workspace tools (backend/app/core/gws_runner.py)
- Add heartbeat service for proactive nudges (backend/app/services/heartbeat.py)
- Add in-memory store for session/task state (backend/app/services/store.py)
- Add Pydantic settings config loading from .env (backend/app/config.py)
- Add frontend Notifications panel with real-time polling (frontend/src/components/Notifications/)
- Add NotificationsContext for global notification state (frontend/src/contexts/)
- Update layout and sidebar to integrate notifications
- Add start.sh convenience script for running both services
- Add .langgraph_api/ to gitignore
Keep both BrainCircuit (Agent Inbox navigation) and Bell (Notifications panel)
icons in the sidebar — collapsed and expanded views.
Introduces tauri-compat.ts that maps Tauri IPC commands to HTTP REST
endpoints on the Python backend, enabling the Next.js frontend to run
in a standard browser without the Tauri desktop shell. All direct
imports of @tauri-apps/api are replaced with safe wrappers that
dynamically import Tauri when available or fall back to HTTP/no-ops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant