Docs / Kestrel
Installation
Kestrel runs on Windows 10 and 11. There are two ways to install it: the packaged installer, or from source if you want to read or change the code.
From the installer
- Download
KestrelSetup.exefrom the releases page. Free, no account required. - Run it and accept the licence agreement. There is an optional "launch at Windows startup" task, unchecked by default.
- Add an API key in Settings for whichever provider you want to use.
From source
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python main.py
Python 3.11 or newer. Two packages are optional: SpeechRecognition and PyAudio are only needed for voice. Kestrel checks for them at startup and hides the microphone if they are missing, so skipping them costs you nothing else. PyAudio is the fiddliest dependency in the list, so skip it if you do not plan to talk to it.
First launch
The first screen asks what to call your assistant. That name is what it calls itself in chat, and it is also the wake word if you enable voice later. You can change it any time in Settings. After that you are in the chat.
You do not need an API key to get in. The recorder, the block editor and macro playback all work with nothing configured. The key is only needed for anything that involves the model.
First-time setup
Kestrel gets faster as you build a macro library, because a task that exists as a macro runs directly instead of going through the model again. A short first session is worth doing.
1. Tell it your browser
Type My preferred browser is Firefox, or Chrome, or Edge. This affects every web task from then on.
2. Build navigation macros
Say Go to YouTube, Go to Google and a couple more of the sites you use most. Each becomes a macro instead of a full autonomous run next time.
3. Build search macros
Try Search for "test" on Google and Search for "test" on YouTube. Kestrel generalizes the pattern, so future searches take any term rather than only "test".
4. Add the things you repeat
A morning routine, a work setup, a music habit. Anything you do the same way twice is worth teaching once.
5. Check it is using macros
Open the console from the tray menu. A line reading [tool] Executing function: go_to_youtube means the macro ran directly, rather than a full step-by-step autonomous log.
Models and profiles
Kestrel is bring your own key. It talks to the provider you chose directly, with the key you pasted into Settings. There is no Kestrel account, no plan and no server of ours in the middle.
Four providers
| Provider | Models |
|---|---|
| Google Gemini | Gemini 3 Flash (default), Gemini 3.1 Pro, Gemini 2.5 Flash |
| OpenAI | GPT-5.4, GPT-5.4 Mini, GPT-5.4 Nano |
| Anthropic | Claude Sonnet 5, Claude Opus 5, Claude Haiku 4.5 |
| Local | Any OpenAI-compatible endpoint on your own machine or network: Ollama, LM Studio, llama.cpp, vLLM and similar |
A dropdown in the chat input switches which model answers, without changing anything else. Chat, macros, autonomous mode and the whole safety framework behave identically whichever is active. Add a key for a provider in Settings and its models appear in the dropdown.
Keys are stored in the Windows Credential Manager, not in a plaintext file next to the app.
Assistant profiles
A profile is a whole assistant: its name, the provider and model behind it, and the instructions it works from. Keep a fast cheap one for everyday questions and a stronger one for real work, then switch between them without going into Settings.
The name is not cosmetic. It is the wake word, so naming a profile "Vera" means "Vera, open my email" wakes that profile with its own model and instructions.
Chat
Replies stream in as they are generated. Conversations are kept in a local database with titles, so you can search across everything you have asked and pick a thread back up. Messages can be copied, edited and resent, or read aloud.
Attachments
Attach from the chat box with the paperclip, or drag a file onto it. Each file appears as a removable chip above the input, and its content is folded into your next message. Several files can go on one message. Content is capped at 20,000 characters per file, with a marker where it was cut, so you always know you are looking at part of something.
Supported: plain text, Markdown, JSON, CSV, logs, config formats (YAML, TOML, INI, XML, .env), HTML and CSS, most source-code extensions, plus .pdf, .docx and .xlsx. Images (.png, .jpg, .gif, .bmp, .webp) go in as images for models that can see.
Extended thinking
A toggle in the chat box, set per message. Turn it on for something that needs working through and the model reasons at length before replying. Leave it off for everything else and keep the answers quick. A marker shows while it is thinking, rather than a frozen window.
Screenshots
Ctrl+Alt+S drops a screenshot into the chat from anywhere, including while another application has focus. Useful for asking what an error message means or what a chart is showing, without alt-tabbing to describe it.
Export and backup
A single chat exports to Markdown or JSON. Separately, a full backup writes chats, macros, profiles and settings into one archive, and restores from it. The backup is written to a temporary file and moved into place at the end, so an interrupted backup cannot overwrite a good one with a half-written file.
Files and documents
Three tools, each with a distinct job.
- Read a file. Point it at a file that already exists (plain text, code, config,
.pdf,.docx,.xlsx) and its content comes back for you to ask questions about. Read-only: there is no edit-in-place tool, so a requested change comes back as a new file. - Generate a file. Creates a new file and saves it, then opens it in whatever application Windows associates with that type. Formats: plain text, Markdown, CSV, Word (
.docx), PDF and Excel (.xlsx). A Word file gets real headings and paragraphs, a PDF is laid out and paginated rather than a printed text dump, and a spreadsheet gets a header row and real cells. - Merge to PDF. Combines several existing files, in the order given, into one PDF. Images become full pages, an existing PDF's pages are copied in unchanged, and text files are rendered onto new pages titled with their own filename. Anything that cannot be converted is skipped and named, rather than failing the whole merge.
Generated files land in Documents\Kestrel Files by default, configurable in Settings. Names never collide: a second report.pdf becomes report (2).pdf rather than overwriting the first. The chat gives you a link that opens the containing folder with the file selected.
Web access
Three levels of depth. Kestrel picks the shallowest one that answers the question.
- Search. Returns a short list of titled results with snippets and links, the way you would scan a results page. It does not fetch the full text of each result, so it suits quick facts and current information. If a snippet is not enough, it says so rather than inventing detail.
- Read a page. Fetches one URL and extracts the actual article: headings, paragraphs and links. Navigation, scripts and boilerplate are stripped. Images worth looking at are pulled out and downscaled first, so a page full of photographs costs a sensible number of tokens.
- Crawl a site. For questions like "what does this company do" or "find the pricing page". It looks for a sitemap, falls back to following links, and reads up to a page budget. It checks
robots.txtand respects it, caps how much it downloads per page, and stays on the origin it started from.
Voice
Click the microphone in the chat input to talk instead of typing. Your speech is transcribed, sent through the same pipeline as a typed message, and the reply is read back aloud.
Enable the wake word in Settings to use it hands-free. It listens for whatever the active profile is currently named, so renaming the assistant changes what triggers it.
While it is speaking you can interrupt by clicking the microphone or saying "stop". When it proposes an autonomous task, saying "yes", "go ahead" or "accept" starts it, and "no", "cancel" or "don't" refuses it, so a whole task can run without the keyboard.
How Kestrel decides what to do
Every message is checked against three questions, in order:
| Step | Question | Result |
|---|---|---|
| 1 | Can I answer this from my own knowledge? | Answers directly, then offers to act if relevant |
| 2 | Is this a one-step action or an existing macro? | Runs it directly, no screenshots |
| 3 | Does this need several steps or screen navigation? | Proposes autonomous mode and waits for confirmation |
Autonomous mode has no way to start on its own. The model appends a suggestion tag to its reply, the app catches the tag and shows a confirmation card, and only an explicit accept starts a live run.
Autonomous mode
Once a run starts, every turn is exactly three things:
- Take a screenshot of the screen as it is now
- Call exactly one tool
- Take another screenshot and look at what changed
That repeats until the goal is met or the step budget runs out. One action per turn is the rule that keeps a run recoverable: there is never more than a single step between a decision and a fresh look at reality.
While it works, an overlay shows what it is doing and stays out of the way of the clicks. When the goal is reached the overlay clears immediately, and you get a specific line about what happened rather than a generic "task complete".
Rules it follows
- Never uses the Windows search bar.
- Never builds a URL by hand. It navigates the way a person would: browser, then site, then the site's own search.
- Never suggests autonomous mode without asking in plain language first.
- Anything that looks destructive needs explicit approval, every time.
Typing works for accented and non-Latin text. Characters are sent by code point through the Win32 input API rather than by keyboard layout, so café, Müller and こんにちは arrive intact.
You can stop a run at any point with Esc, with Ctrl+Alt+X, or by throwing the mouse into a screen corner.
The macro system
A macro is a saved task. Once one exists it becomes a tool the assistant can call by name, so "put on my morning playlist" stops being a reasoning problem and becomes a function call. Each macro is a JSON record describing its steps, turned into a real callable function at load time.
There are two kinds:
- Literal. An exact recording, tied to whatever was originally clicked or typed. A macro born from "search Soprano on YouTube" only ever searches Soprano.
- Generalized. The same macro rewritten with real parameters, so it becomes
search_youtube(query)instead of being locked to one search term.
Generalization runs automatically after autonomous mode saves a macro. The model never writes Python directly: it returns validated JSON describing the parameters and steps, and the source is generated and syntax-checked on Kestrel's side. If a task is not confident enough to generalize well, the literal version is kept exactly as recorded, so generalizing never breaks something that already worked.
The block editor
Every macro opens as a stack of coloured blocks. Drag to reorder, click any value to change it in place. There is no code, and no way to build something that will not run.
Blocks are coloured by what they do:
| Category | Blocks |
|---|---|
| Action | Click, right-click, type text, press Enter, press a key combo, open app, new browser tab, run a macro |
| Control | Wait, repeat n, repeat forever, repeat until colour, if colour is / else, stop |
| Sensing | Wait for colour change at a point |
Sensing is what lets a macro wait for a page to actually load instead of guessing at a delay.
Macros inside macros
Any macro you have saved can be dropped into another one as a single block, shown as run macro open_chrome. Build one small reliable piece, use it everywhere, and fix it in one place when the application it drives changes.
Saved macros appear under a Macros heading in the Add Block menu, so adding one is the same gesture as adding any other block. A macro is never offered inside itself. If you build a loop anyway, where A calls B and B calls A, it is refused at run time rather than hanging the app, and nesting is capped at eight levels deep.
The recorder
For tasks too precise for autonomous mode to get exactly right, record it yourself with global hotkeys. No AI involved and no API key needed.
| Key | Action |
|---|---|
| F6 | Right-click at the current mouse position |
| F7 | Left-click at the current mouse position |
| F8 | Toggle typing mode (press again or Esc to commit) |
| F9 | Press Enter |
| F10 | Stop recording |
Name it, save, and it is registered immediately. No restart needed. Each of these five triggers can be rebound to a different key, or to a mouse button (left, right, middle, back or forward) instead of the default function keys.
UI mapping
For an application you use often, you can skip recording macros one at a time. Ask Kestrel to map the application and it walks that app's accessibility structure on its own, the same structure a screen reader uses, collecting every button, field, menu and list with its name, its role and where it is. What it finds is compiled into named actions the assistant can call.
The difference this makes is what happens when something moves. A macro built on coordinates breaks the moment you resize a window, change your display scaling or plug in a second monitor. A macro built on an element's identity keeps working, because the button is still called Send.
- A small status window shows progress while a mapping run is active, and closes when it finishes.
- Elements are kept with the panel, dialog or tab they belong to, so a "Save" in one dialog is not confused with a "Save" in another.
- Destructive-looking actions (delete, purge, submit order and similar) are recorded but never triggered during mapping. Nothing that permanently changes data gets clicked.
- Where an application exposes nothing useful, such as a game, a canvas or a remote desktop, it falls back to coordinates and says so rather than pretending it found something.
Sharing macros
Macros export as .ktl files, one at a time from a macro's share button, or all at once from the Macros toolbar. A .ktl file holds the macro specs unchanged, so an export reads back anywhere. Import one and it is immediately callable, by you and by the assistant.
The interface
- Light and dark themes that change instantly across every dialog, menu, dropdown and tray icon. No restart, and nothing left behind in the other theme's colours.
- Seven languages: English, French, Spanish, Portuguese, Arabic, Hindi and Chinese, switched live. Arabic gets a proper right-to-left layout rather than mirrored text in a left-to-right frame.
- Undo for anything destructive, as a bar that lets you take it back, rather than a dialog that makes you promise first.
- A live console opened from the tray menu, mirroring every tool call, reply and background log line as it happens, colour-coded by kind. It replays everything logged since launch the moment you open it, so you are never looking at a blank window wondering whether something already happened.
- A tray icon and a global show and hide, so it stays out of the way until you want it.
- Always on top for when you need it watching over another window.
- A rounded, frameless window that still snaps, tiles and resizes like a normal Windows window, because the operating system is still doing the moving.
Safety framework
Kestrel can click, type and run commands on your machine. These limits apply whichever model provider you configured, and they are enforced in code rather than by the model's judgement. The model cannot talk its way past a gate it does not participate in.
Command allow-list
The command tool tokenizes its input and only runs a base command that is explicitly on the list. Chaining (&, &&, |), redirection (>, <) and %variable% expansion are refused outright. Kestrel runs exactly one plain command with plain arguments, never a shell string that could hide something else inside it.
| Tier | Examples | Treatment |
|---|---|---|
| Low | dir, type, whoami, tasklist, ipconfig, ping, findstr | Read-only, runs freely |
| Medium | python, node, npm, pip, git, winget, copy, move, mkdir | Counts against the session cap |
| High | del, rd, taskkill, reg, shutdown, netsh | Approval dialog every time, plus the cap |
| Blocked | format, diskpart, bcdedit, fsutil, vssadmin, powershell, wmic, cipher | Refused unconditionally, at any tier |
Per-session action caps
Each risk tier has its own budget within a run: 100 low, 30 medium and 5 high by default, adjustable in Settings along with a manual reset. Force-closing an application counts as high risk. Hitting a cap does not end the conversation, it just means Kestrel has to stop and get a fresh session before doing more of that tier.
Human handoff
When autonomous mode recognises a CAPTCHA, an "I'm not a robot" checkbox or a two-factor prompt, it pauses instead of trying to click through it. A sound plays and a card appears in the chat asking you to take over. Clicking Continue resumes the run from a fresh screenshot.
Confirmation before anything destructive
Separate from the command allow-list, any interface action whose on-screen label matches a destructive word (delete, purge, format, submit order, checkout, cancel subscription, sign out and similar) requires confirmation before it runs, including inside a compiled mapping macro.
Stopping a run
Esc and Ctrl+Alt+X both halt any running automation instantly from anywhere, even when Kestrel is not the focused window. Throwing the mouse into any screen corner is a failsafe that works without either shortcut being registered.
Step ceiling
A configurable cap, 3 to 100 with a default of 20, on how many steps one autonomous run can take before stopping on its own. It is a ceiling rather than a target, and a run almost always finishes well before reaching it.
Keyboard shortcuts
Four global shortcuts work system-wide, even when Kestrel is not the focused window. All are rebindable in Settings.
| Default | Action |
|---|---|
| Ctrl+Shift+Space | Show or hide the Kestrel window |
| Ctrl+Alt+P | Toggle always on top |
| Ctrl+Alt+S | Take a screenshot into the chat |
| Ctrl+Alt+X | Stop any running automation immediately |
Esc also stops a running automation, and does nothing when nothing is running. It is not rebindable, and neither is the mouse-corner failsafe. Inside the window, Enter sends a message and Shift+Enter starts a new line; those are fixed conventions rather than shortcuts. The five recorder triggers are listed above and are only active while recording.
Settings reference
| Setting | Default | What it controls |
|---|---|---|
| Assistant name | Set on first run | What it calls itself in chat, and the wake word. |
| Provider and model | Gemini 3 Flash | Which model answers. Add a key for a provider and its models appear. |
| Theme | Follows Windows | Light or dark, applied instantly with no restart. |
| Language | English | One of seven, switched live. |
| Generated files folder | Documents\Kestrel Files | Where files it writes are saved. |
| Macro playback delay | 1.0s | Pause between recorded steps during playback, 0.1 to 10s. Raise it for slower applications. |
| Max automation steps | 20 | Ceiling per autonomous run, 3 to 100. |
| Safety limits | 100 / 30 / 5 | Per-session action caps for low, medium and high-risk actions. |
| Wake word | Off | Hands-free voice trigger. Every wake-word behaviour, including saying "stop", is inactive until this is on. |
| Global shortcuts | See above | Rebind any of the four global hotkeys or the five recorder triggers. |
Update checking
At startup Kestrel asks GitHub for the newest published release of its own repository and compares that tag against the version it is running. If the tag is higher you get a tray notification pointing at the release page. It checks only, and never installs anything itself: a self-installing updater for a binary that is not code-signed is exactly the shape of thing SmartScreen exists to distrust.
Two things have to be true for it to ever report anything, and both are about the repository rather than the app:
- There has to be a published Release. A tag or a commit is not a release. With none, GitHub answers 404 and the check goes quiet rather than guessing.
- The release tag has to be a higher version than the one running.
v0.2.2beats0.2.1;v0.2.1-hotfixdoes not, because the suffix is dropped before comparing.
A fork points it somewhere else with APP_UPDATE_REPO=owner/repo in .env. Nothing is sent to the project: it is one unauthenticated GET to GitHub's public API, and any failure is swallowed so a check can never delay or break startup.
Where your data lives
Chats, macros, profiles, generated files and settings are kept in your user data folder, not in the install directory. Kestrel never writes into its own folder at runtime, which keeps it working under Program Files and out of the way of your antivirus.
- Macros are plain JSON, one file each. You can read them, copy them and back them up like any other file.
- Chats live in a local database.
- API keys are in the Windows Credential Manager, not in a file.
- Screenshots go to the model only during an autonomous run or when you take one deliberately. Nothing is captured in the background.
Adding your own tools
Any function starting with tool_ in ai/actions.py is detected automatically and shown in the Tools panel. Its signature and docstring are read to build the schema the model sees, so there is no second description to keep in sync.
def tool_volume_up():
"""Increase system volume by 10%."""
print("[tool] Volume increased")
Click Refresh in the Tools tab. New tools appear immediately, with input fields generated from the signature.
Building from source
PyInstaller produces the executable, Inno Setup the installer.
pip install -r requirements.txt pyinstaller
pyinstaller --clean Kestrel.spec
python tools/verify_build.py
iscc installer\Kestrel.iss
verify_build.py reads the built binary's PE headers and reports whether it is packed, whether the version resource landed and whether it carries a signature. Run it before shipping anything, because a detection on a stale build tells you nothing about the current one.
Tests run anywhere, including Linux:
pip install -r requirements-dev.txt
pytest
Antivirus warnings
Expect them.
What has been done about it: no UPX packing, a real version resource, an explicit manifest declaring the app never asks for administrator, nothing written into the install directory at runtime, and no screen-capture evasion anywhere. The build is as clean as an unsigned build can be.
What is left needs a code-signing certificate, which is a company-level purchase, plus a false-positive submission per release. Until then:
- The source is public. Every behaviour above is in it, and you can read exactly what it does.
- Each release ships with a SHA-256 so you can check you have the file that was built.
- You can build it yourself from source and skip the question.
A detection name ending in !ml is a machine-learning verdict rather than a signature match, which is the standard false positive for anything built with PyInstaller.
Troubleshooting
The app does not open after install
Confirm the installer finished. Kestrel is not code-signed, so SmartScreen may add an extra "unrecognised app" step the first time; choose "Run anyway".
The model is not responding
Check the API key in Settings for the selected provider. This usually means the key is invalid, expired or out of quota with that provider directly. The console shows the actual error.
A command was refused
Only base commands on the fixed allow-list can run at all (see the safety framework), and the refusal message names what is allowed. This is intentional, not a bug, and there is no setting to expand the list.
A macro clicks the wrong thing
The application's layout has probably changed since the macro was recorded. Open it in the block editor and fix the step, or re-record it. A macro built through UI mapping is more resilient to this than a recorded one, because it finds elements by name rather than position.
The wake word is not working
It is off by default; turn it on in Settings first. If it is on and still unresponsive, open the console. Transcription failures are logged there, which usually shows whether it is a microphone or network problem rather than the listener not running.
Voice is missing entirely
The microphone is hidden when SpeechRecognition and PyAudio are not installed. Install them and restart.
Platform support
Kestrel runs on Windows only, and that is what it is built out of rather than a porting backlog item.
- Reading the screen's structure goes through Windows UI Automation, which is how it can identify a button by name instead of guessing from pixels. macOS Accessibility and Linux AT-SPI are different APIs with different models, not a different import.
- Typing characters by code point uses the Win32 input API directly, which is what makes accented and non-Latin text work regardless of keyboard layout.
- Launching and focusing applications, process control, and system sounds are all Windows-specific.
- Global hotkeys need root on Linux and do not work on macOS at all.
Roughly a third of what Kestrel does would need rewriting per platform, not recompiling. The parts that are portable are kept that way on purpose because it makes them testable: the mapping traversal is written against an interface and tested with an in-memory fake, and the full test suite runs on Linux. That is a testing property, not a sign that a port is close.
Licensing
Kestrel is dual-licensed. Which licence applies depends on what you do with it, not on who you are.
- GPL v3 for individuals, for open-source projects, and for anyone willing to release their derivative work under the GPL v3 as well.
- Commercial for putting Kestrel in a proprietary product or into enterprise infrastructure without the GPL v3 obligations.
The GPL binds you when you convey the software to someone else, not when you merely run it. Anything you produce with Kestrel is yours under either licence: the macros you record and the documents it writes are not derivative works. See Licensing for the full picture.