Back to my work

Knowtis.

A rich-text workspace for writing and learning, with AI tools and an agent that asks before it edits.

Workspace screenshotOpen the app
Screenshot of Knowtis: a sample note in the rich-text editor, with the AI copilot alongside it
Captured in Knowtis with an example note. Open the app to explore the editor and AI tools.

The problem.

Note apps treat AI as a bolt-on chat sidebar that can read but never act. The moment an assistant can write, the trust problem shows up: nobody wants a model silently rewriting their notes, and anything it reads from the web or from a shared note is text an attacker could have authored.

What I set out to build.

Bring writing, research and study into one collaborative editor. Let people explore a topic, create notes and turn them into study tools, with the option to use their own provider key for the copilot. Search notes and the web, then review AI edits before saving them. Check retrieved content and tool access along the way.

How it works.

An agent that acts on your notes needs more than a chat interface. These are the engineering decisions behind Knowtis.

Reviewing AI edits

agentic loop · human-in-the-loop

A server-authoritative tool-use loop over nine tools, streamed over WebSocket. The user holds the write lock.

  • Every note mutation arrives as a proposal — approve or reject, nothing auto-applies
  • Proposals held in Redis across the approve round-trip
  • Conversations and history live server-side, so a reconnect never loses a turn

Checking untrusted text

guardrails · prompt injection defense

Layered defense on every surface that carries text the user did not write.

  • Heuristic injection scoring on user turns, fetched web content and retrieved notes
  • Model-based classifier for the gray zone
  • Blocked note bodies are replaced by a stub; titles and metadata survive

Hybrid search and memory

hybrid retrieval · RAG

Two retrieval legs fused into one ranking, plus durable memory across conversations.

  • Postgres full-text search + pgvector KNN, fused with Reciprocal Rank Fusion
  • Mem0-style long-term memory, opt-in, extracted on a background job

Copilot evaluations

evals · LLM evaluation

Evaluation suites check copilot behavior and retrieval as prompts and models change.

  • Nightly runs over copilot, retrieval, memory and web search
  • Tracks quality run-over-run as prompts and models evolve

Caching and rate limits

cost engineering

Every AI call is routed, cached and rate-limited before it spends a token.

  • Exact-match response cache, SHA-256 keyed in Redis
  • Runtime-configurable model routing, with a fast role for ghost text
  • Three-provider failover; dual rate limiting with Redis primary and Postgres fallback

MCP access

MCP server

A dedicated Model Context Protocol server exposes notes to external agents.

  • Eight tools behind OAuth 2.1
  • Claude Desktop, Cursor and any MCP client can read and write notes

Writing, studying and collaboration.

Rich-text workspace

Write with headings, tables, images, code blocks and slash commands. Inline AI can help rewrite a passage, explore a topic or generate content directly in the editor, with ghost-text suggestions as you type.

Your models, your API keys

Connect your own OpenAI, Anthropic, Google or OpenRouter API key to the copilot with a registered account. Choose a model for each conversation; its responses are billed to your provider account. Stored keys are encrypted and shown only as masked prefixes.

Inline AI Assistant

20 AI actions across the Tiptap editor and voice capture — improve, fix spelling, summarize, translate, expand, change tone, outline, action items, chat, learn topic, generate flashcards, mind maps and more.

AI Study Tools

Turn a note or a topic you are exploring into flashcards, quizzes, summaries and mind maps. Study in a dedicated panel, track your progress and revisit flashcards with SM2 spaced repetition.

Real-time CRDT

Yjs + Hocuspocus power multiplayer editing with live presence and remote cursors. Redis-backed for horizontal scale.

Voice Notes

Record voice memos with AI transcription processed into structured note content.

Offline-first

IndexedDB persistence with optimistic local-first updates. Keep writing without a connection; sync resumes seamlessly.

Explore all 20 AI actions
  • summarize
  • expand
  • translate
  • change tone
  • outline
  • action items
  • ghost text
  • chat
  • improve writing
  • fix spelling
  • make shorter
  • make longer
  • learn topic
  • generate flashcards
  • generate quiz
  • generate summary
  • generate outline
  • generate mind map
  • voice transcription
  • structure voice note

Under the hood.

  • React 19
  • NestJS
  • TypeScript
  • Vercel AI SDK
  • Anthropic Claude
  • MCP
  • pgvector
  • Tavily
  • Socket.io
  • Yjs
  • Hocuspocus
  • Tiptap
  • TanStack Router
  • TanStack Query
  • Drizzle
  • PostgreSQL
  • Redis
  • Tailwind CSS
  • Vite
  • Zustand
  • CASL
  • Nx

Try it yourself.

Explore the real workspace. No signup needed to start writing.

Try Knowtis