Skip to content

GitReboot/HackwithDC-Team-6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AGI Desktop Intelligence Agent

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.html locally)


Features

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.


Screenshots

Setup Screen - Loading Β Β  Setup Screen - All Systems Go

Setup screen checks all prerequisites on launch


Chat UI - Multi-step Workflow

Multi-step workflow: email draft + scheduling gate + calendar event creation with privacy redaction (AI View panel)


Quick Start

Prerequisites

  • 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

Setup

# 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 automatically

Demo emails and calendar events auto-seed on first launch β€” no extra setup needed.

Optional: Better PII Detection

pip install presidio-analyzer presidio-anonymizer spacy
python -m spacy download en_core_web_sm

Without this, privacy still works using regex patterns.

Recommended Models

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"

Architecture

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:

  1. Planner decomposes goals into steps
  2. Executor calls tools via LLM function-calling (with scheduling gate + PII restore)
  3. Evaluator checks success and retries if needed
  4. Synthesis combines results, strips false claims, restores PII

See docs/architecture.md for the full design, or explore the interactive diagram.


Project Structure

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

Documentation

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

Evaluation Criteria Mapping

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

Health Check

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.


Future Scope

  • 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

Powered By

Ollama Β Β  Linkup

Ollama powers local LLM inference Β Β·Β  Linkup provides agentic web search

About

Privacy-first desktop AI agent with local LLM (Ollama), Linkup agentic search, and 12 tools across email, documents, calendar, web research, and memory. PII is auto-redacted before the AI sees it. Built for HackwithDC.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors