Skip to content

Meeting AI assistant, records, transribes, auto generated summaries, can also use llm agent to send summaries as mail or push to a notion page.

Notifications You must be signed in to change notification settings

abeenoch/Kontext-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kontext Meeting Agent

Real-time meeting transcription, summarization, and integration platform powered by AI.

Kontext is a self-hosted meeting assistant that captures audio from your microphone, transcribes it in real-time using OpenAI's Whisper, generates intelligent summaries with Groq's LLMs, and automatically sends them to email, Notion on request, or stores them locally.

Enable streaming: Set ENABLE_STREAMING=true in .env

  • Real-time Audio Capture: WebRTC-based audio streaming from browser to backend
  • ** Transcription**: Streaming transcription using faster-Whisper (CPU-friendly)
  • Smart Summaries: Automatic meeting summaries with key points, decisions, and action items
  • ** Email Integration**: Send meeting summaries directly to team members via email
  • Notion Integration: Push summaries to Notion databases for team documentation
  • ** RAG Search**: Query meeting content using semantic search with Pinecone
  • Post-Meeting Chat: Ask questions about meetings after they end
  • Local Storage: SQLite database keeps all data on your server
  • ** Docker Ready**: One-command deployment with Docker Compose

Features

Component Technology Purpose
Backend FastAPI + Uvicorn Real-time WebSocket streaming
Speech-to-Text faster-Whisper (base/medium) CPU-efficient transcription
Summarization Groq API (Llama 70B) High-quality meeting summaries
Embeddings Sentence-Transformers Semantic search for meeting content
Vector DB Pinecone Store and query meeting embeddings
Frontend Vanilla JavaScript + HTML Lightweight, no frameworks
Database SQLite Local persistent storage
Email SMTP (Gmail) Send summaries to team
Notion API Official Python Client Push to shared Notion databases

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Groq API key (free at https://console.groq.com/keys)
  • (Optional) Notion API token
  • (Optional) Email credentials for sending transcripts

Setup

  1. Clone the repository
git clone <repo-url>
cd Kontext-Agent
  1. Create .env file
cp .env.example .env
  1. Configure environment variables (edit .env)
# Groq API (required for streaming mode)
GROQ_API_KEY=your_groq_api_key_here

# Streaming configuration
ENABLE_STREAMING=true           # Set to false for local batch mode
FRAME_SIZE_MS=20               # Audio frame size in milliseconds
SUMMARY_INTERVAL_MIN=1         # Update summary every 1 minute

# Notion integration (optional)
NOTION_API_TOKEN=your_notion_token
NOTION_DATABASE_ID=your_database_id

# Email integration (optional)
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SENDER_EMAIL=your_email@gmail.com
SENDER_PASSWORD=your_app_password
  1. Start the application
docker-compose up -d
  1. Access the UI
http://localhost:8000

Usage

Starting a Meeting

  1. Open http://localhost:8000
  2. Click Start Recording
  3. Allow microphone access when prompted
  4. Speak naturally - transcription happens in real-time
  5. See live captions with:
    • πŸ”΄ Gray italic text = interim (being processed)
    • ⚫ Black bold text = final (confirmed)

During Meeting

  • Transcripts appear in real-time (streaming mode)
  • Summaries auto-update every 1 minute
  • Live indicator shows when meeting is active

After Meeting

  • Click Stop Recording
  • Transcript and summary automatically saved
  • Email sent (if configured)
  • Notion database updated (if configured)

Configuration

Streaming vs Batch Mode

Streaming Mode (Default - Fast)

ENABLE_STREAMING=true
GROQ_API_KEY=your_groq_api_key_here
FRAME_SIZE_MS=20
SUMMARY_INTERVAL_MIN=1
  • Pros: 100x faster, real-time, low memory
  • Cons: Requires API key, rate limited on free tier
  • Best for: Live meetings, demos, presentations

Batch Mode (Local - Privacy)

ENABLE_STREAMING=false
GROQ_API_KEY=    # Not needed
SUMMARY_INTERVAL_MIN=10
  • Pros: No API needed, unlimited, local processing
  • Cons: 30-60s latency, high memory (2-3GB), slow startup
  • Best for: Privacy-first, offline, recorded audio files

Audio Configuration

# Frame size (20ms = 320 samples at 16kHz)
FRAME_SIZE_MS=20          # Recommended: 20-40ms
FRAME_SIZE_MS=10          # Faster but more overhead
FRAME_SIZE_MS=40          # Slower but less overhead

# Summary interval
SUMMARY_INTERVAL_MIN=1    # Streaming mode
SUMMARY_INTERVAL_MIN=10   # Batch mode

API Integration

Groq Streaming API

GROQ_API_KEY=your_key_here
ENABLE_STREAMING=true

Notion Integration

NOTION_API_TOKEN=your_token
NOTION_DATABASE_ID=your_database_id

Email Integration

SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SENDER_EMAIL=your_email@gmail.com
SENDER_PASSWORD=your_app_password

Architecture

Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             Web UI (index.html)                      β”‚
β”‚  β€’ Audio capture (16ms frames in streaming mode)    β”‚
β”‚  β€’ Real-time transcript display                     β”‚
β”‚  β€’ Meeting controls                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚ WebSocket (AUDIO_FRAME)
                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        WebSocket Handler (websocket.py)             β”‚
β”‚  β€’ Streaming transcription worker                   β”‚
β”‚  β€’ Batch transcription worker (fallback)            β”‚
β”‚  β€’ Broadcast partial/final results                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                 β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   Groq  β”‚      β”‚  Local   β”‚
   β”‚  API    β”‚      β”‚  Whisper β”‚
   β”‚(Stream) β”‚      β”‚ (Batch)  β”‚
   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                 β–Ό
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚  Audio Processing     β”‚
     β”‚  β€’ Normalization      β”‚
     β”‚  β€’ Noise handling     β”‚
     β”‚  β€’ Format conversion  β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                 β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ Database β”‚     β”‚ Summarizer    β”‚
   β”‚ Storage  β”‚     β”‚ (Every 1 min) β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β–Ό
                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚ Integrations β”‚
                   β”‚ β€’ Email      β”‚
                   β”‚ β€’ Notion     β”‚
                   β”‚ β€’ Services   β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow (Streaming Mode)

Speech β†’ Browser (16ms frames) β†’ WebSocket
  ↓
Groq API (100-300ms) β†’ Partial results
  ↓
UI (real-time captions) β†’ Database
  ↓
Summarizer (1-min interval) β†’ Email/Notion







## File Structure

Kontext-Agent/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ main.py # FastAPI app β”‚ β”œβ”€β”€ config.py # Configuration β”‚ β”œβ”€β”€ database.py # Database operations β”‚ β”œβ”€β”€ api/ β”‚ β”‚ β”œβ”€β”€ routes.py # HTTP endpoints β”‚ β”‚ └── websocket.py # WebSocket handlers β”‚ β”œβ”€β”€ core/ β”‚ β”‚ β”œβ”€β”€ audio_processor.py # Audio normalization β”‚ β”‚ β”œβ”€β”€ transcriber.py # Local Whisper β”‚ β”‚ β”œβ”€β”€ rag_engine.py # RAG for summaries β”‚ β”‚ └── summarizer.py # Summary generation β”‚ β”œβ”€β”€ services/ β”‚ β”‚ β”œβ”€β”€ streaming_transcriber.py # Groq streaming β”‚ β”‚ β”œβ”€β”€ meeting_service.py β”‚ β”‚ β”œβ”€β”€ email_service.py β”‚ β”‚ β”œβ”€β”€ notion_service.py β”‚ β”‚ └── meeting_service.py β”‚ β”œβ”€β”€ models/ β”‚ β”‚ └── schemas.py # Pydantic models β”‚ └── ui/ β”‚ β”œβ”€β”€ index.html # Web UI β”‚ └── audio_recorder.py β”œβ”€β”€ data/ β”‚ └── meeting_transcripts/ # Stored transcripts β”œβ”€β”€ logs/ # Application logs β”œβ”€β”€ docker-compose.yml β”œβ”€β”€ Dockerfile β”œβ”€β”€ requirements.txt β”œβ”€β”€ start_server.py └── README.md






## Contributing 

Contributions welcome! Please:

1. Fork the repository
2. Create feature branch: `git checkout -b feature/amazing-feature`
3. Commit changes: `git commit -m 'Add amazing feature'`
4. Push to branch: `git push origin feature/amazing-feature`
5. Open Pull Request



- **Email**: funboy.ea@gmail.com

## Why I Built This 

I attend multiple meetings daily at Payvite and other commitments. Traditional meeting assistants are expensive. I wanted:

- **Privacy**: All data stays on my server
- **Cost**: No monthly subscriptions
- **Control**: Integrate with our tools (Notion, email)
- **Simplicity**: One-click to start recording
- **Extensibility**: Add new integrations easily

 Maybe it'll help you too!

---


About

Meeting AI assistant, records, transribes, auto generated summaries, can also use llm agent to send summaries as mail or push to a notion page.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published