A privacy-first desktop assistant that uses a local LLM (Ollama), Linkup's agentic search API for real-time web knowledge, and 12 tools across 5 domains β all orchestrated by an autonomous Planner β Executor β Evaluator loop.
π Interactive Architecture Diagram β animated, clickable system overview (or open
docs/architecture_diagram.htmllocally)
Multi-Domain Intelligence β Email management, document analysis (PDF/DOCX/TXT), calendar scheduling, web research, and semantic memory β all through natural language.
Privacy-First β PII is automatically redacted before the LLM sees it. Names become <PERSON_1>, phones become <PHONE_1>. Company names, dates, and task-relevant context are preserved. Real values are restored in the final response and generated files.
Linkup Web Search β Agentic search for real-time research, fact-checking, and meeting prep. The agent decides when external knowledge is needed β not on every prompt. Only sanitized queries are sent.
Autonomous Planning β The agent decomposes complex multi-step requests into executable plans, selects tools, evaluates results, and retries on failure. A scheduling gate enforces that calendar events are only created when the user provides a confirmed date/time.
Generated Files β Email drafts open directly in your mail app (Outlook, Gmail, etc.) via mailto:. Calendar events download as .ics files. Both are accessible from download buttons in the chat.
Setup screen checks all prerequisites on launch
Multi-step workflow: email draft + scheduling gate + calendar event creation with privacy redaction (AI View panel)
- Python 3.10+
- Ollama β install and make sure the Ollama service is running (
ollama serve) - Linkup API key β sign up free at linkup.so β Dashboard β API Keys
# 1. Clone the repo
git clone https://github.com/GitReboot/HackwithDC-Team-6.git
cd HackwithDC-Team-6
# 2. Install Python dependencies
pip install -r requirements.txt
# 3. Pull an Ollama model (make sure Ollama is running first)
ollama pull llama3.1:8b
# 4. Set your Linkup API key
# Windows CMD:
set LINKUP_API_KEY=your-key-here
# Windows PowerShell:
$env:LINKUP_API_KEY="your-key-here"
# Mac/Linux:
export LINKUP_API_KEY="your-key-here"
# 5. Start the web server
python server.py
# 6. Open http://localhost:5000 in your browser
# The setup screen will check all prerequisites automaticallyDemo emails and calendar events auto-seed on first launch β no extra setup needed.
pip install presidio-analyzer presidio-anonymizer spacy
python -m spacy download en_core_web_smWithout this, privacy still works using regex patterns.
| Model | RAM | Tool Calling | Best For |
|---|---|---|---|
llama3.1:8b (default) |
8 GB | Good | Any system |
qwen2.5:7b |
8 GB | Very Good | Better structured output |
qwen2.5:14b |
12 GB | Excellent | Best results if hardware allows |
Change model in config/defaults.yaml:
agent:
model: "qwen2.5:7b"User Input β Privacy Layer β Planner β Executor β Evaluator β Synthesis β Response
β
βββββββββββββββββββββββΌβββββββββββββββββββββββ
β β β
Linkup Search Local Tools (12) Memory Store
(web research) Email Β· Docs Β· Calendar SQLite + FAISS
The agent follows a Planner β Executor β Evaluator loop:
- Planner decomposes goals into steps
- Executor calls tools via LLM function-calling (with scheduling gate + PII restore)
- Evaluator checks success and retries if needed
- Synthesis combines results, strips false claims, restores PII
See docs/architecture.md for the full design, or explore the interactive diagram.
desktop-agent/
βββ main.py # CLI entry point
βββ server.py # Flask web server + API
βββ requirements.txt
βββ config/
β βββ __init__.py # Config loader
β βββ defaults.yaml # Default settings
βββ agent/
β βββ __init__.py
β βββ planner.py # Goal β step decomposition
β βββ executor.py # Tool calling + scheduling gate
β βββ evaluator.py # Success checking + retry
β βββ loop.py # Main orchestration loop
β βββ prompts.py # System/plan/eval prompts
βββ tools/
β βββ __init__.py # BaseTool + ToolRegistry
β βββ linkup_client.py # Linkup agentic search
β βββ email_adapter.py # IMAP + local mailbox + mailto
β βββ document_adapter.py # PDF/DOCX/TXT reader
β βββ calendar_adapter.py # .ics calendar (zero-dep)
β βββ memory_tools.py # Store/recall facts
β βββ privacy.py # PII redaction engine
βββ memory/
β βββ __init__.py
β βββ sqlite_store.py # Conversation + task history
β βββ faiss_retriever.py # Semantic similarity search
βββ frontend/
β βββ index.html # Web chat UI
βββ docs/
βββ architecture.md # System design document
βββ architecture_diagram.html # Interactive animated diagram
βββ linkup_integration.md # Linkup usage documentation
βββ demo_scenarios.md # Demo walkthrough
| Document | Description |
|---|---|
| architecture.md | Full system design β data flow, components, guardrails |
| architecture_diagram.html | Interactive animated architecture diagram |
| linkup_integration.md | How Linkup enhances agent capabilities |
| demo_scenarios.md | Step-by-step demo walkthrough |
| Criteria | Implementation |
|---|---|
| Generality | 12 tools across 5 domains β email, documents, calendar, web search, memory |
| Autonomy | Planner β Executor β Evaluator loop with minimal hardcoded flows |
| Reasoning | LLM-driven planning, multi-step tool chaining, scheduling gate |
| Context Awareness | Short-term buffer + long-term semantic memory (FAISS) |
| Information Synthesis | Linkup for real-time web knowledge, result grounding |
| Privacy & Security | PII redaction, local-first processing, no data leaves machine |
| Usability | Web UI with chat, file attachments, AI View, generated file downloads |
Visit http://localhost:5000/api/health after starting the server to verify all prerequisites:
- Python version
- Ollama status and model availability
- Linkup API key
- Required packages
- Privacy engine (Presidio NLP or regex fallback)
- Demo data
The web UI also shows an interactive setup screen on launch that runs through these checks automatically.
- Streaming responses β Real-time token-by-token output instead of waiting for the full response, significantly improving perceived speed
- Conversation history β Sidebar showing past sessions with the ability to resume or reference previous conversations
- Multi-agent architecture β Separate planner, researcher, and critic agents that collaborate on complex tasks
- OAuth integrations β Direct Google Calendar, Outlook, and Gmail connections instead of local file adapters
- Voice input β Speak commands instead of typing, with local speech-to-text processing
- Plugin system β Allow users to add custom tools without modifying core code


