Personal knowledge ingestion server
Project description
Whorl
A whorl is a tool that allows you to make your interactions with chatbots more personalized. It scalably ingest all your personal documents (journals, writing, things you've read, etc...) into one centralized place (a whorl) and then give the AIs you interact with access that information.
In doing so, you can effectively personalize your interactions with models, by making them query and get information from your whorl. Whorl gives AIs tools to fetch this knowldge, and also optionally uses AI to make your whorl artifact automatically more structured, by triggering workflows whenever you add to your whorl - eg keeping lists of tasks, media recommendations, or ideas that might be worth exploring.
Whorl is designed to be simple, basically just exposing a file system for you to upload things to, an MCP for your models to call that info, and a frontend for you to access everything.
Getting started
Install:
pip install whorled
# or
uv tool install whorled
Setup default configuration:
whorl init
If you want AI features, set your anthropic API key in .env or environment:
export ANTHROPIC_API_KEY="your-anthropic-key" # for AI features
Running the Server
whorl server
The web UI will be available at http://localhost:8000.
Authentication
By default, if no password is configured, Whorl allows unauthenticated access. This is convenient for local development.
To enable authentication, set a password via environment variable or settings:
export WHORL_PASSWORD="your-password"
Or add to ~/.whorl/settings.json:
{
"password": "your-password"
}
Important: Always set a password when deploying Whorl on a public server.
Ingestion
Now you will want to upload data to Whorl.
It is all stored in ~/.whorl/docs (or $WHORL_HOME/docs) in any kind of flat or foldered structure you want, so you can also just move files there.
If you have a folder with your notes, journals, etc... you can use the CLI:
whorl upload ~/notes --context "personal-notes"
Otherwise, use an agent with the whorl MCP server, or just move files into the docs directory.
The ingest API is:
curl -X POST http://localhost:8000/api/ingest \
-H "Content-Type: application/json" \
-H "X-Password: $WHORL_PASSWORD" \
-d '{"content": "Your note content here", "title": "Note Title", "metadata": {}}'
Feel free to tell your agent.
Whorl is also a PWA, so you can add it to your phone and then select text -> share to whorl.
Workflows
You can configure automated workflows that agents execute whenever you upload to whorl. These agents run bash commands on your files, so be careful with your data!
You can add some defaults using whorl init, which sets up:
- automatically summarizing and tagging new notes
- extracting todos and tasks into
tasks.md - gathering media references into
media.md - collecting ideas into
ideas.md
Then, in docs/index.md, you can reference these files (renders on the whorl homepage):
[[ideas.md]]
[[media.md]]
[[tasks.md]]
This is very flexible - go wild! Let me know what you find useful, I've just started experimenting with this.
CLI Usage
whorl server # start server on :8000
whorl server --port 3000 # custom port
whorl server --reload # dev mode with auto-reload
whorl upload <dir> # upload text files from directory
whorl upload <dir> -f # flat (non-recursive)
whorl upload <dir> -e "*.draft" # exclude pattern
whorl upload <dir> -c "source" # add source context
whorl sync # run missing agents on all docs
whorl init # set up default prompts and index
MCP Integration
Whorl exposes an MCP server at /mcp for integration with Claude Code and other MCP-compatible tools.
Add to your Claude MCP configuration (e.g. .mcp.json):
{
"mcpServers": {
"whorl": {
"url": "http://localhost:8000/mcp/",
"type": "http"
}
}
}
If you have authentication enabled, add headers:
{
"mcpServers": {
"whorl": {
"url": "http://localhost:8000/mcp/",
"type": "http",
"headers": {
"X-Password": "your-whorl-password"
}
}
}
}
Available MCP tools:
ingest- Add content to knowledge basetext_search- Full-text searchagent_search- AI searchbash- Run commands in the docs directory
You can add something to your global system prompt with the MCP, and then tell your chat assistant to use these tools when it might benefit from context about you.
Custom Ingestion Agents
Create markdown prompts in ~/.whorl/prompts/ingestion/ to process documents during ingestion. Each prompt file becomes an agent that runs on ingested content.
Example prompt (~/.whorl/prompts/ingestion/summarize.md):
---
model: sonnet
max_turns: 10
---
You are a document summarizer. Given the document at {filepath}, create a summary file.
Use the bash and str_replace_editor tools to read the document and create a summary.
Feel free to contribute! Note because this was a quick side project I was pretty lax on supervision with claude code, which was very useful. I will soon release a blog with info on how I use whorl.
Claude Code Plugin
Whorl includes a Claude Code plugin with skills for ingesting content:
/plugin marketplace add uzpg/whorl
/plugin install whorl@whorl
Available skills:
- website-crawler - Crawl and ingest websites into your whorl (uses
trafilatura)
Planning on adding more soon.
Once installed, just ask Claude things like "crawl my blog at example.com and add it to whorl" and it will offer to use the skill.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whorled-0.1.1.tar.gz.
File metadata
- Download URL: whorled-0.1.1.tar.gz
- Upload date:
- Size: 76.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc0cfa97c07a9b595171dfb338e12296db1c7caf9079ec2d7040ece1e320ef27
|
|
| MD5 |
b3b199db0c288bdb2255c119c7bb6473
|
|
| BLAKE2b-256 |
2898e57c2b3c41ec46ddb62100f360e50ff39d7afcc6df3d5ae143662ef81d5e
|
File details
Details for the file whorled-0.1.1-py3-none-any.whl.
File metadata
- Download URL: whorled-0.1.1-py3-none-any.whl
- Upload date:
- Size: 76.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
858554358db857f479b431207a359a5a7fc07cc454cbd542aaf2530ef075a93e
|
|
| MD5 |
db3e2d60bb1894eab1247530fc4943b7
|
|
| BLAKE2b-256 |
d66cf8c5c8132be2552a22a71eeda3dfc299914559990e1bcf84a315a3b00ae3
|