Curriculum vitae

Rehan A. Rana

AI Engineer at Kagi, working on agents, retrieval and model integrations for Kagi Assistant.

Toronto, Ontario, ET

About

Since 2024 I've worked on Kagi Assistant: I prototyped its agentic architecture, built its retrieval agent, and helped rebuild it on Pydantic AI. I also created and maintain Kagi's official MCP server. Outside work, I build small tools for problems I run into, mostly in Python and Rust, and have contributed to the Linux desktop projects I use every day.

Work Experience

Kagi

Apr 2024 – Present

AI Engineer

  • Prototyped the agentic, tool-calling loop that replaced Kagi Assistant's fixed multi-model pipeline; the prototype became the architecture behind the whole product
  • Major contributor to a ground-up rewrite of the Assistant's agent stack onto Pydantic AI, replacing its custom in-house framework
  • Created and maintain Kagi's official open-source MCP server (500+ GitHub stars), letting AI agents like Claude use Kagi Search; also published Kagi's Python API SDK to PyPI
  • Designed and built Librarian, a retrieval sub-agent that reads whole documents and web pages and returns excerpts, full content or a direct answer as each query needs; it powered all document and web retrieval and still runs in about 1 in 5 Assistant turns
  • Built and maintained the extraction pipelines Librarian reads from, covering web pages, documents, YouTube transcripts and Reddit threads; 19M+ extractions to date at a ~95% success rate, with provider fallbacks for reliability
  • Maintained integrations for ~50 models across 17 providers, introduced prompt caching, and improved reliability and cost with failover and usage tracking
  • Led development of a context management panel that lets users inspect and control what the Assistant is working with
  • Built evaluation and benchmarking tooling to measure answer quality and guide model and prompt decisions

Wilfrid Laurier University

Oct 2022 – May 2023

Work-Study Program Coordinator

  • Automated the program's Excel-based tracking, cutting manual work and errors
  • Researched other universities' work-study programs and reported findings to support planning

Cystic Fibrosis Canada

Jul 2022 – Aug 2022

Data Analyst

  • Handled data requests from external researchers, clinics and staff end to end, from scoping each request to analysing patient registry data in R
  • Built a mutation resolving table that improved data quality for future analyses

Cystic Fibrosis Canada

Jul 2019 – Aug 2019

QA Analyst

  • Led user acceptance testing for a new patient registry feature set, and wrote its user manual for clinicians

Education

Wilfrid Laurier University

Bachelor's Degree in Computer Science

Aug 2023

Honours

Bachelor's Degree in Business Administration

Apr 2021

Honours

Projects

Kagi MCP Server

Kagi's official Model Context Protocol server, letting AI agents like Claude search the web with Kagi

WorkPythonMCP

dyn-wall-rs

Changes the wallpaper with the sun's position through the day or a user-set schedule, and keeps other applications in sync with it

Side ProjectRust

swayhide

Window swallower for the Sway window manager

Side ProjectRust

VisioNomicon

Renames image files based on their content using GPT-4o, following a user-defined naming template

Side ProjectPythonOpenAI API

receipt-statement-linker

Uses LLMs to extract receipts and bank statements, then matches each receipt to its transaction for item-level budgeting

Side ProjectPythonLLMs

poisoned-search-llm

Hands an LLM search results rewritten around fictional facts, to see how models behave when the web itself is wrong

Side ProjectPythonLLMs

SwayFX

Sway, but with eye candy: blur, shadows and rounded corners

ContributorCOpenGL ES

Waybar

Highly customizable status bar for Sway and other wlroots-based compositors

ContributorC++GTK

hy3

Hyprland plugin for i3/Sway-style manual tiling

ContributorC++Hyprland