About the project

CognitiveFlow is an AI context-aware workflow engine that blends desktop context detection with generative AI to reduce friction between user intent and execution.
The app detects what the user is currently doing (active app + window title), lets the user issue a request in one of three modes (analyze, create, automate), and stores every workflow in a replayable timeline.

Inspiration

Most AI tools are context-blind. Users repeatedly copy-paste context and lose momentum switching between apps.
We wanted to build a desktop-first assistant that understands context automatically and responds with less prompting overhead.

How we built it

  • Backend: FastAPI + async endpoints for context detection, AI calls, history, and replay.
  • AI layer: Gemini integration with model resolution from configured access tier.
  • Storage: SQLite + SQLAlchemy for durable workflow history.
  • Frontend: React + Tailwind dashboard with live context indicator and workflow timeline.
  • Desktop simulation: Electron wrapper for a native-like experience.
  • Export: Download AI response as .txt or .pdf from the UI.

Challenges we faced

  • API-key and model compatibility across Gemini tiers (1.5 vs 2.5/3.0 access).
  • Handling blocking operations (window detection + model calls) inside async API flows.
  • Making Electron startup reliable in mixed shell environments.
  • Keeping the UX clean while exposing advanced controls (recording, replay, export).

What we learned

  • Reliable AI products depend as much on error handling and fallback logic as prompt quality.
  • Context-aware UX significantly improves perceived intelligence.
  • Even for MVPs, production hygiene (env management, docs, licensing, reproducible startup) matters.

Lightweight scoring intuition

The project uses context and user intent to improve output relevance:

$$ \text{usefulness} \approx f(\text{context quality},\ \text{prompt clarity},\ \text{model capability}) $$

Built With

Share this project:

Updates