Project Info
Inspiration
Open Record was inspired by the growing crisis in local journalism. While national outlets continue to expand, smaller newspapers and student-run publications are shutting down or burning out—struggling to keep up with the overwhelming volume of public information they’re expected to monitor. Since 2005, over 2,500 local newspapers in the U.S. have closed. One of the biggest bottlenecks is the time and effort required to review and analyze public meeting recordings, budget documents, and long transcripts. We wanted to build a tool that not only helps journalists read and summarize content—but actually helps them uncover the stories that matter.
What it does
Open Record is more than just a chatbot; it’s a proactive research assistant designed specifically for local journalists. Users can upload audio or video files, such as city council meetings, select one or more recordings, and ask complex questions. The system can summarize discussions, identify key issues, pull direct quotes with timestamps, and even analyze trends across multiple meetings. Journalists can also save important chatbot messages for easy reference. But Open Record goes beyond reactive Q&A: it’s a system that finds the questions worth asking. Instead of spending hours combing through transcripts, journalists are handed the most relevant insights automatically.
How we built it
We used the Groq Whisper API to transcribe city council recordings with high accuracy and speaker diarization. These transcripts were then segmented and embedded using Google Cloud’s Vertex AI Embeddings API. We stored those embeddings in Supabase, which served as our vector database for efficient retrieval. User queries are handled through a Retrieval-Augmented Generation (RAG) system powered by Anthropic’s Claude 3, which generates contextual answers grounded in the retrieved transcript chunks. This full-stack pipeline allows for fast, accurate, and traceable responses across large civic datasets.
Challenges we ran into
We encountered several technical challenges throughout development. One major hurdle was orchestrating a seamless workflow across multiple services: transcription, vector embedding, storage, and LLM querying all had to be coordinated carefully to function as a unified system. We also ran into difficulties with prompt engineering—specifically, how to guide Claude 3 to stay grounded in the retrieved transcript data. We had to experiment with different chunking strategies to balance semantic accuracy with latency and cost, especially when working with long, multi-speaker transcripts. Finally, ensuring speaker attribution remained accurate through diarization and preprocessing was a nuanced problem that required fine-tuning.
Accomplishments we're proud of
We’re proud to have built a fully functional, end-to-end RAG system capable of operating across multiple long-form documents and audio files. Open Record handles messy, real-world civic content and delivers structured, journalist-ready insights. Along the way, we gained experience working with cutting-edge tools like Groq, Claude, Supabase, and Vertex AI—all while solving a problem with real social impact.
What we learned
Building Open Record gave us a deep, hands-on understanding of Retrieval-Augmented Generation systems—from embedding generation and vector storage to prompt tuning and output evaluation. We learned how to preprocess and clean noisy, multi-speaker data for better semantic results. We explored the trade-offs between chunk size, latency, and answer quality in a RAG pipeline. Most importantly, we learned how to design an AI system not just for accuracy, but for usefulness—delivering insights that real people, like student journalists, can act on.
What's next
Next, we plan to integrate semantic search so users can explore all their previously uploaded files by topic. We also hope to incorporate Google Document AI to analyze structured documents like city budgets, giving users an even broader view of public decision-making. Ultimately, our vision is to build a fully automated pipeline that ingests new public meeting data overnight and delivers a tailored morning briefing—helping local journalists cover more ground with less effort, and empowering communities to hold their governments accountable.
🤖 Claude AI Research Agent
An intelligent AI research agent powered by Anthropic's Claude that uses advanced planning and tool selection to analyze documents, extract direct quotes with page numbers, and answer questions through natural conversation.
✨ Features
- 🧠 Intelligent Planning: AI agent that plans and chooses the best tools for each request
- 🔧 Tool-Based Architecture: Specialized tools for different types of analysis
- 📄 Direct Quote Extraction: Extract exact quotes with page numbers for citations
- 📋 Multiple Summary Types: Comprehensive, bullet points, and executive summaries
- 🔍 Contextual Analysis: Answer questions with deep document understanding
- 📊 Batch Processing: Process multiple documents simultaneously
- 📝 Text Analysis: Direct text input and analysis
- 💬 Natural Conversation: Upload a document and ask questions naturally
- 📚 PDF Support: Extract and analyze text from PDF documents
- 🔄 Multi-Format Support: PDF, TXT, MD, PY, JS, HTML, CSS, JSON, XML, CSV
- 🎨 Modern Web Interface: Beautiful, responsive UI with real-time feedback
- 🔌 RESTful API: Full API for integration with other applications
- ⚡ Claude AI Integration: Leverages Anthropic's Claude for intelligent document processing
🏗️ Architecture
calhackssu25/
├── backend/
│ └── claude/
│ ├── claude.py # Main AI agent implementation
│ ├── app.py # Flask API server
│ └── example.py # Usage examples
├── app/
│ └── index.html # Web interface
├── requirements.txt # Python dependencies
├── start.sh # Startup script
└── README.md # This file
🤖 AI Agent Capabilities
This system functions as an intelligent AI research agent with advanced planning and tool selection capabilities:
🧠 Intelligent Planning System
The AI agent automatically plans and executes the best approach for each request:
- Tool Selection: Chooses the most appropriate tools based on user intent
- Multi-Step Planning: Can combine multiple tools for complex requests
- Context Awareness: Considers document type and content when planning
- Fallback Logic: Graceful degradation when planning fails
🔧 Available Tools
The agent has access to specialized tools for different tasks:
📄 Document Summarization Tool
- Purpose: Generate comprehensive summaries with key points
- Input: Document path and summary type (comprehensive/bullet_points/executive)
- Output: Structured summary with analysis
🗣️ Quote Extraction Tool
- Purpose: Extract direct quotes with page numbers and context
- Input: Document path and specific query
- Output: Formatted quotes with page numbers, speakers, and relevance
❓ Question Answering Tool
- Purpose: Answer specific questions about document content
- Input: Document path and question
- Output: Contextual answer with document references
📊 Text Analysis Tool
- Purpose: Analyze raw text content for various insights
- Input: Text content and analysis type (summary/key_points/sentiment/topics)
- Output: Structured analysis results
🔍 Intelligent Analysis
The AI agent can:
- Plan Complex Requests: Automatically determine which tools to use
- Combine Multiple Tools: Execute multi-step analyses when needed
- Adapt to Context: Choose different approaches based on document type
- Provide Reasoning: Explain why certain tools were chosen
- Handle Ambiguity: Use fallback strategies when planning is uncertain
💡 Natural Language Understanding
Users can ask questions naturally:
- "Summarize this document"
- "What are the main topics discussed?"
- "Give me quotes about budget discussions"
- "Who were the key speakers and what did they say?"
- "Analyze the decision-making process"
The agent will automatically:
- Analyze the request to understand user intent
- Plan the execution by selecting appropriate tools
- Execute the plan using the chosen tools
- Combine results into a coherent response
🚀 Quick Start
Prerequisites
- Python 3.8+
- Anthropic API Key - Get one from Anthropic Console
Installation
-
Clone the repository
git clone <repository-url> cd calhackssu25 -
Create and activate virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate -
Install dependencies
pip install -r requirements.txt -
Set up environment variables
export ANTHROPIC_API_KEY="your-anthropic-api-key"Or create a
.envfile:ANTHROPIC_API_KEY=your-anthropic-api-key
Running the Application
Option 1: Using the startup script (Recommended)
chmod +x start.sh
./start.sh
Option 2: Manual startup
-
Start the backend server
cd backend/claude python app.pyThe API server will start on
http://localhost:5002 -
Open the web interface Open
app/index.htmlin your browser or serve it with a local server:cd app python -m http.server 8000Then visit
http://localhost:8000
📖 Usage
Web Interface
The web interface provides three main modes:
- Single Document: Upload and summarize a single document
- Batch Processing: Process multiple documents at once
- Direct Text: Paste text directly for analysis
API Endpoints
Health Check
GET http://localhost:5002/health
Get Agent Status
GET http://localhost:5002/status
Summarize Single Document
POST http://localhost:5002/summarize
Content-Type: application/json
{
"file_path": "/path/to/document.pdf",
"summary_type": "comprehensive"
}
Batch Summarize Documents
POST http://localhost:5002/batch-summarize
Content-Type: application/json
{
"file_paths": ["/path/to/doc1.pdf", "/path/to/doc2.txt"],
"summary_type": "bullet_points"
}
Analyze Text
POST http://localhost:5003/analyze
Content-Type: application/json
{
"text": "Your text content here...",
"summary_type": "executive"
}
Ask Questions About Document
POST http://localhost:5003/ask
Content-Type: application/json
{
"file_path": "/path/to/document.pdf",
"question": "What was the general consensus on the housing budget?"
}
Python API
from backend.claude.claude import ClaudeAgent
# Initialize the agent
agent = ClaudeAgent()
# Summarize a PDF document
result = agent.summarize_document("path/to/document.pdf", "comprehensive")
print(f"Summary: {result.summary}")
print(f"Key points: {result.key_points}")
# Batch summarize multiple documents (mix of formats)
results = agent.batch_summarize(["doc1.pdf", "doc2.txt", "doc3.md"], "bullet_points")
for result in results:
print(f"Document summary: {result.summary}")
🔧 Configuration
Summary Types
- comprehensive: Detailed summary with main ideas, supporting information, and context
- bullet_points: Concise bullet-point format for quick scanning
- executive: High-level summary suitable for executive review
Supported File Types
.pdf- PDF documents (requires PyPDF2 and pdfplumber).txt- Plain text files.md- Markdown files.py- Python files.js- JavaScript files.html- HTML files.css- CSS files.json- JSON files.xml- XML files.csv- CSV files
PDF Processing
The application uses two libraries for PDF processing:
- pdfplumber: Primary PDF text extraction (better quality)
- PyPDF2: Fallback PDF processing
PDF files are processed page by page, with page numbers included in the extracted text for better context.
🛠️ Development
Running Examples
cd backend/claude
python example.py
Project Structure
backend/claude/claude.py: Core AI agent implementation using Claude APIbackend/claude/app.py: Flask API server with RESTful endpointsbackend/claude/example.py: Usage examples and demonstrationsapp/index.html: Modern web interface with JavaScript
Key Components
ClaudeAgent Class
__init__(): Initialize with API key and check PDF supportsummarize_document(): Main method for single document summarizationbatch_summarize(): Process multiple documents_read_pdf(): PDF text extraction using pdfplumber and PyPDF2_generate_summary(): Core summarization logic using Claude_analyze_text(): Text analysis and key information extraction
Flask API
- Health monitoring:
/healthendpoint for system status - Document processing:
/summarizeand/batch-summarizeendpoints - Text analysis:
/analyzeendpoint for direct text input - Error handling: Comprehensive error handling and logging
🔒 Security Considerations
- API Key Management: Store API keys securely using environment variables
- File Validation: Validate file types and content before processing
- Rate Limiting: Implement rate limiting for API endpoints
- Input Sanitization: Sanitize all user inputs to prevent injection attacks
- PDF Security: PDF processing libraries are used safely with proper error handling
🚀 Deployment
Local Development
# Backend
cd backend/claude
python app.py
# Frontend (optional)
cd app
python -m http.server 8000
Production Deployment
- Set up a production server (e.g., AWS, Google Cloud, Heroku)
- Configure environment variables for production
- Set up a reverse proxy (nginx) for the Flask app
- Use a production WSGI server (gunicorn, uwsgi)
- Enable HTTPS for secure communication
Docker Deployment
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY backend/ ./backend/
COPY app/ ./app/
EXPOSE 5002
CMD ["python", "backend/claude/app.py"]
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Troubleshooting
Common Issues
- Import Errors: Ensure all dependencies are installed with
pip install -r requirements.txt - API Key Issues: Verify your Anthropic API key is valid and has sufficient credits
- CORS Issues: The Flask app includes CORS headers, but you may need to configure them for your domain
- Port Conflicts: If port 5002 is in use, you can change it in
backend/claude/app.py - PDF Processing Issues: Ensure PyPDF2 and pdfplumber are installed for PDF support
PDF-Specific Issues
- "PDF support not available": Install PDF libraries with
pip install PyPDF2 pdfplumber - "No text content found in PDF": The PDF might be image-based or encrypted
- PDF processing errors: Try different PDF files or check if the PDF is corrupted
Getting Help
- Check the logs in the backend console for detailed error messages
- Verify your environment variables are set correctly
- Test with simple text files first before trying PDFs
🎯 Future Enhancements
- Support for more document formats (DOCX, PPTX, etc.)
- Advanced text analysis features
- Custom summary templates
- Integration with cloud storage (Google Drive, Dropbox)
- Real-time collaboration features
- Advanced analytics and reporting
- OCR support for image-based PDFs
- Document comparison features
Analysis
View
Metric
- 4
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- FastAPIIn code
- HTMLIn code
- PythonIn code
- SQLIn code
- SupabaseIn code
6 of 6 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
346 KB
Source files
38
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
niralishahh/calhackssu25
43 files · 355 KB · @ 996ced5
Structure
Interface
4 files · 9%Screens, components and styles rendered to the user.
Application logic
26 files · 60%Domain rules, services and shared utilities.
Data & schema
5 files · 12%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python62%
- HTML20%
- Markdown10%
- SQL7%
- Shell1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
mycode/requirements.txt
pypi · 19- aiofiles
- anthropic
- fastapi
- google-auth
- google-cloud-aiplatform
- google-cloud-storage
- google-generativeai
- groq
- numpy
- pdfplumber
- pydantic
- PyPDF2
- python-dotenv
- python-multipart
- requests
- supabase
- typing-extensions
- uuid
- +1 more
requirements.txt
pypi · 16- anthropic
- fastapi
- google-auth
- google-cloud-aiplatform
- google-cloud-storage
- numpy
- pdfplumber
- pydantic
- PyPDF2
- python-dotenv
- python-multipart
- requests
- supabase
- typing-extensions
- uuid
- uvicorn
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.