# ๐ Hikari (ๅ
) โ Autonomous Windows AI Agent
Hikari (ๅ
โ Japanese for "Light / Velocity") is a high-performance, autonomous Computer-Use AI Agent built natively for Microsoft Windows. Powered by real-time Accessibility Tree decomposition, Hikari interacts with any desktop application with human-like precision, sub-second latency, and 90% fewer tokens than vision-only agents.
Key Features โข
Quickstart โข
Architecture โข
Benchmarks โข
Tools โข
SDK Guide โข
Author
---
## โก Why Hikari? (Paradigm Shift in Computer-Use)
Most existing computer-use agents rely on brute-force screen capture: taking 4K screenshots every second, feeding them to costly vision models, and guessing clickable coordinates. This leads to slow 5-second latency loops, high API costs, and frequent misclicks.
**Hikari solves this fundamentally through native OS integration:**
| Feature | ๐ธ Vision-Only Agents | ๐ **Hikari (ๅ
)** |
|:---|:---:|:---:|
| **Decomposition Engine** | Fullscreen Screenshots (VLM) | **Native Windows UI Accessibility Tree** |
| **Coordinate Accuracy** | Pixel Guessing (~82% accuracy) | **Exact Sub-pixel OS Bounding Boxes (100%)** |
| **Latency per Step** | 3.5s โ 6.0s | **0.4s โ 1.2s (Sub-second with Groq)** |
| **Token Cost per Step** | ~1,600 โ 3,200 tokens | **~180 โ 350 tokens (90% Cost Reduction)** |
| **Mouse Trajectory** | Teleport clicks (easily blocked) | **Natural Human Bezier Curves (`SystemCursor`)** |
| **Shell Integration** | Terminal GUI typing only | **Direct PowerShell Pipeline Execution** |
---
## ๐ Key Capabilities
- ๐ **Native Windows Accessibility Tree**: Directly queries `UIAutomation` for interactive buttons, input fields, menus, tree views, and scrollable panes.
- ๐ง **Structured XML Cognitive Engine**: Operates on a transparent self-correcting loop with ``, ``, ``, ``, and `` tags.
- โก **Multi-LLM Engine Agnostic**:
- **Groq Cloud AI** (`openai/gpt-oss-120b`, `openai/gpt-oss-20b`, `qwen/qwen3.6-27b`) โ Ultra-low latency.
- **Google Gemini 2.0 Flash** โ Ultra-fast with generous free tier.
- **OpenAI GPT-4o / GPT-4o-mini** โ High precision multi-step reasoning.
- **Local Ollama** (`qwen2.5:14b`, `llama3.3`) โ 100% private offline automation.
- ๐ฑ๏ธ **Human-like Mouse & Keyboard Physics**: Bezier curve movement, organic acceleration/deceleration, and natural typing intervals.
- ๐ป **Hybrid GUI + CLI Automation**: Intelligently switches between clicking GUI elements and running PowerShell scripts for maximum speed.
- ๐ช **Active Window & Process Supervision**: Automatically focuses target windows, monitors application launch cycles, and handles multi-app workflows.
- ๐ **Integrated System Utilities**: Clipboard management (copy/paste), webpage scraping to markdown, and window repositioning.
---
## ๐๏ธ System Architecture
```
+---------------------------------------+
| User Desktop Goal |
| "Open Spotify & play my fav playlist" |
+-------------------+-------------------+
|
v
+---------------------------------------+
| Hikari Runtime Engine |
| (hikari.agent.service) |
+-------------------+-------------------+
|
+----------------------------+----------------------------+
| |
v v
+----------------------------------+ +----------------------------------+
| hikari.tree.service | | hikari.desktop.service |
| Windows Accessibility Tree | | Process & Window Supervisor |
| - Interactive Clickable Nodes | | - Active Window Detection |
| - Informative Text Elements | | - Window Geometry & Handles |
| - Scrollable Offset Detection | | - Optional Screenshot Capture |
+----------------+-----------------+ +----------------+-----------------+
| |
+----------------------------+----------------------------+
|
v
+---------------------------------------+
| Dynamic XML Prompt Engine |
| (hikari.agent.prompt.service) |
| Desktop State & Schema Serialization |
+-------------------+-------------------+
|
v
+---------------------------------------+
| Large Language Model |
| (Groq / Gemini / OpenAI / Ollama) |
| |
| Verified previous action |
| Persisted UI coordinates |
| Multi-step roadmap |
| Immediate action logic |
| Target tool & parameters |
+-------------------+-------------------+
|
v
+---------------------------------------+
| Dynamic Tool Dispatcher |
| (hikari.agent.tools.service) |
| Click โข Type โข Launch โข Shell โข Drag |
+-------------------+-------------------+
|
v
+---------------------------------------+
| Native Windows OS Execution |
+---------------------------------------+
```
---
## ๐ฆ Installation
Hikari requires **Windows 10/11** and **Python 3.13+**.
### Via PyPI (Recommended):
```bash
pip install hikari-agent
```
### From Source:
```bash
git clone https://github.com/CodewithEvilxd/hikari.git
cd hikari
uv venv
uv pip install -e ".[dev]"
```
---
## โ๏ธ Environment Configuration
Create a `.env` file in your workspace (or copy `.env-example`):
```env
# Groq Cloud API Key (Recommended for ultra-fast execution)
GROQ_API_KEY="gsk_your_groq_api_key_here"
# Google Gemini API Key
GOOGLE_API_KEY="your_google_gemini_api_key_here"
# OpenAI API Key (Optional)
OPENAI_API_KEY="sk-your_openai_api_key_here"
```
---
## ๐ฎ Quickstart: Interactive CLI
Launch the interactive assistant:
```bash
python main.py
```
```text
_ _ _____ _ __ _____ _____
| | | |_ _| |/ / /\ | __ \|_ _|
| |__| | | | | ' / / \| |__) | | |
| __ | | | | < / /\\ \ _ / | |
| | | |_| |_| . \ / ____ \ | \ \ _| |_
|_| |_|_____|_|\_/_/ \_\| \_\_____|
ๅ
- Autonomous Windows AI Agent
Developed by Nishant Gaurav (Codewithevilxd)
Choose your AI Model Engine:
1. Google Gemini 2.0 Flash (Recommended - Superfast & Free Tier)
2. OpenAI GPT-4o (High Precision Desktop Control)
3. OpenAI GPT-4o-mini (Budget Fast Option)
4. Groq Cloud AI (Ultra-low Latency - GPT-OSS / Qwen / Compound)
5. Local Ollama (Private / Offline)
Hikari > Open Spotify and play my Discover Weekly playlist
๐ Executing: Open Spotify and play my Discover Weekly playlist...
๐ญ Thought: Launch the Spotify desktop application.
๐ฏ Action: Launch Tool(name="spotify")
๐ญ Observe: Spotify launched.
๐ญ Thought: Click on the search bar to locate Discover Weekly.
๐ฏ Action: Click Tool(loc=[140, 72], button="left", clicks=1)
...
โ
Done: Discover Weekly playlist is now playing.
```
---
## ๐ป Python SDK Guide
Easily integrate Hikari into your custom scripts, automated workflows, and multi-agent frameworks:
### Example 1: Basic Desktop Automation
```python
from langchain_groq import ChatGroq
from hikari.agent import Agent
from dotenv import load_dotenv
load_dotenv()
# Initialize LLM
llm = ChatGroq(model_name="openai/gpt-oss-120b", temperature=0.1)
# Initialize Agent
agent = Agent(
llm=llm,
browser="chrome",
use_vision=False,
auto_minimize=True,
max_steps=15
)
# Run Task
result = agent.invoke("Open Notepad, write a welcome note for Hikari AI, and save it to Desktop")
print("Agent Finished:", result.content)
```
### Example 2: Web Research & Data Extraction
```python
from langchain_google_genai import ChatGoogleGenerativeAI
from hikari.agent import Agent
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0.1)
agent = Agent(llm=llm, max_steps=10)
# Autonomous browser navigation and information gathering
result = agent.invoke("Open Chrome, navigate to GitHub trending, and tell me the #1 Python repo today")
print(result.content)
```
---
## ๐งฐ Built-in Tool Catalog
Hikari provides 15 production-ready native Windows automation tools:
| Tool Name | Parameters | Return Type | Description |
|:---|:---|:---:|:---|
| **`Launch Tool`** | `name: str` | `str` | Launches applications from Start Menu or PATH (`notepad`, `chrome`, `calc`, `spotify`). |
| **`Click Tool`** | `loc: (x,y)`, `button: left\|right\|middle`, `clicks: 0..3` | `str` | Precise clicking with hover (0), single (1), double (2), or triple (3) click modes. |
| **`Type Tool`** | `loc: (x,y)`, `text: str`, `clear: bool`, `caret_pos: start\|idle\|end`, `press_enter: bool` | `str` | Natural typing into focused fields with caret positioning and enter submission. |
| **`Shell Tool`** | `command: str` | `str` | Executes native PowerShell scripts and returns stdout, stderr, and exit codes. |
| **`Switch Tool`** | `name: str` | `str` | Brings target running application window to the foreground. |
| **`Resize Tool`** | `name: str`, `loc: (x,y)`, `size: (w,h)` | `str` | Resizes and repositions window layouts dynamically. |
| **`Scroll Tool`** | `loc: Optional[(x,y)]`, `type: horizontal\|vertical`, `direction: up\|down\|left\|right`, `wheel_times: int` | `str` | Native mouse wheel scrolling on panes and web views. |
| **`Drag Tool`** | `from_loc: (x,y)`, `to_loc: (x,y)` | `str` | Drags UI elements or files across exact screen coordinates. |
| **`Move Tool`** | `to_loc: (x,y)` | `str` | Moves mouse pointer smoothly along natural Bezier curves. |
| **`Shortcut Tool`**| `shortcut: list[str]` | `str` | Triggers key combinations (e.g. `['ctrl', 'c']`, `['alt', 'tab']`, `['win', 'r']`). |
| **`Key Tool`** | `key: str` | `str` | Presses individual keys (`enter`, `escape`, `tab`, `backspace`, `f5`). |
| **`Clipboard Tool`**| `mode: copy\|paste`, `text: Optional[str]` | `str` | Reads from or writes text to the Windows system clipboard. |
| **`Scrape Tool`** | `url: str` | `str` | Scrapes webpage HTML and converts it into clean Markdown text. |
| **`Wait Tool`** | `duration: int` | `str` | Pauses execution for specified seconds to allow UI rendering. |
| **`Done Tool`** | `answer: str` | `str` | Signals successful task completion and formats final response. |
---
## ๐งช Automated Testing
Hikari maintains an automated test suite with **159 unit tests** covering all internal subpackages:
```bash
pytest tests/ -v
```
```text
tests/unit/agent/test_agent_utils.py ......................... PASSED [ 30%]
tests/unit/agent/agent_tools/test_agent_tools_service.py ..... PASSED [ 60%]
tests/unit/desktop/test_desktop_init.py ...................... PASSED [ 85%]
tests/unit/tree/test_tree_views.py ........................... PASSED [100%]
============================= 159 passed in 1.94s =============================
```
---
## ๐บ๏ธ Project Structure
```text
hikari/
โโโ hikari/
โ โโโ __init__.py # Root package exports
โ โโโ agent/
โ โ โโโ service.py # Main Agent orchestrator & LangGraph state machine
โ โ โโโ state.py # Pydantic agent state & memory
โ โ โโโ utils.py # XML parsing & image serialization
โ โ โโโ views.py # Data schemas & action models
โ โ โโโ prompt/ # Dynamic system, action & observation prompts
โ โ โโโ registry/ # Dynamic tool execution registry
โ โ โโโ tools/ # Native Windows tools (Click, Type, Shell, etc.)
โ โโโ desktop/
โ โ โโโ config.py # System application exclusion rules
โ โ โโโ service.py # Windows process & window management
โ โ โโโ views.py # App & DesktopState schemas
โ โโโ tree/
โ โโโ config.py # Accessibility control definitions
โ โโโ service.py # Native Accessibility Tree parser
โ โโโ utils.py # Coordinate calculation & bounding box math
โ โโโ views.py # Interactive & scrollable node schemas
โโโ tests/ # 14 unit test suites (159 tests)
โโโ LICENSE # MIT License
โโโ main.py # Interactive Rich CLI assistant
โโโ pyproject.toml # PyPI package configuration
โโโ README.md # Documentation
```
---
## ๐ License
This project is licensed under the **MIT License** โ see the [LICENSE](LICENSE) file for details.
---
## ๐ค Author & Maintainer
**Nishant Gaurav (Codewithevilxd)**
- ๐ **GitHub**: [@CodewithEvilxd](https://github.com/CodewithEvilxd)
- ๐ง **Email**: [codewithevilxd@gmail.com](mailto:codewithevilxd@gmail.com) โข [btwitznishantgaurav@gmail.com](mailto:btwitznishantgaurav@gmail.com)
- ๐ **PyPI**: [https://pypi.org/project/hikari-agent/](https://pypi.org/project/hikari-agent/)
- ๐ฆ **Repository**: [https://github.com/CodewithEvilxd/hikari](https://github.com/CodewithEvilxd/hikari)
---
Hikari (ๅ
) โ Autonomous Windows Desktop Intelligence.
Crafted with passion by Nishant Gaurav (Codewithevilxd)