openyak-desktop-agent
```markdown
What this skill does
```markdown
---
name: openyak-desktop-agent
description: OpenYak local-first AI agent desktop app with 100+ models, 16+ built-in tools, and MCP support
triggers:
- set up OpenYak desktop agent
- configure OpenYak with my API key
- use OpenYak for file automation
- build a skill or tool for OpenYak
- connect OpenYak to local models
- OpenYak agent modes and tools
- integrate MCP server with OpenYak
- OpenYak backend API development
---
# OpenYak Desktop Agent
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
OpenYak is a 100% local-first, open-source desktop AI assistant that runs entirely on your machine. It supports 100+ AI models via OpenRouter, 16+ built-in tools (file I/O, bash, web fetch, glob/grep), 7 specialized agent modes, MCP server integration, and a secure remote tunnel for mobile access — all without uploading data to the cloud.
---
## Installation
### End-User (Desktop App)
1. Download the installer from [https://open-yak.com/download/](https://open-yak.com/download/) (Windows or macOS).
2. Launch the app and connect a model (free tier: 1M tokens/week, or bring your OpenRouter API key).
### Developer Setup
The project has two parts: `frontend/` (Electron/UI) and `backend/` (Python).
#### Backend
```bash
cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # then edit .env
python main.py
```
#### Frontend
```bash
cd frontend
npm install
npm run dev # development mode with hot reload
npm run build # production build
npm run package # create distributable installer
```
See [frontend/README.md](frontend/README.md) and [backend/README.md](backend/README.md) for full setup details.
---
## Configuration
### Environment Variables (backend `.env`)
```env
# Model provider — use OpenRouter or your own key
OPENROUTER_API_KEY=$OPENROUTER_API_KEY
# Optional: direct provider keys
OPENAI_API_KEY=$OPENAI_API_KEY
ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY
# Local model endpoint (e.g. Ollama)
LOCAL_MODEL_BASE_URL=http://localhost:11434/v1
# App settings
DATA_DIR=~/.openyak/data
LOG_LEVEL=INFO
```
### Connecting a Model in the UI
1. Open **Settings → Models**.
2. Choose a provider: OpenRouter, OpenAI, Anthropic, or Local (Ollama/LM Studio).
3. Paste your API key or leave blank for free-tier OpenRouter models.
4. Select a default model (e.g. `anthropic/claude-opus-4.6` or `deepseek/deepseek-v3.2`).
---
## Agent Modes
OpenYak ships 7 specialized agents:
| Mode | Purpose |
|------|---------|
| **Build** | Code generation, project scaffolding |
| **Plan** | Multi-step task decomposition |
| **Explore** | File system and data investigation |
| **Write** | Document drafting and editing |
| **Analyze** | Spreadsheet / CSV data analysis |
| **Automate** | Office workflow automation |
| **Chat** | General conversation |
Switch modes from the mode selector in the chat UI or via the API:
```python
import httpx
response = httpx.post("http://localhost:8765/api/chat", json={
"mode": "analyze",
"message": "Summarize trends in sales.csv",
"attachments": ["/home/user/data/sales.csv"]
})
print(response.json()["reply"])
```
---
## Built-in Tools (16+)
| Tool | Description |
|------|-------------|
| `read_file` | Read file contents |
| `write_file` | Write / overwrite a file |
| `edit_file` | Patch specific lines |
| `list_dir` | Directory listing |
| `glob_search` | Pattern-based file search |
| `grep_search` | Text search across files |
| `bash` | Execute shell commands |
| `web_fetch` | HTTP GET a URL |
| `create_dir` | Create directories |
| `delete_file` | Delete files with audit log |
| `move_file` | Move / rename files |
| `copy_file` | Copy files |
| `read_csv` | Parse CSV into structured data |
| `read_docx` | Extract text from Word docs |
| `read_pdf` | Extract text from PDFs |
| `summarize` | Summarize long content |
### Using Tools via the Python Backend API
```python
import httpx
BASE = "http://localhost:8765"
# Ask the agent to use tools automatically
resp = httpx.post(f"{BASE}/api/chat", json={
"mode": "explore",
"message": "Find all Python files larger than 10KB in ~/projects and list their sizes",
})
print(resp.json())
# Call a tool directly
resp = httpx.post(f"{BASE}/api/tools/glob_search", json={
"pattern": "**/*.py",
"root": "/home/user/projects",
"min_size_kb": 10
})
for match in resp.json()["matches"]:
print(match["path"], match["size_kb"])
```
---
## MCP (Model Context Protocol) Integration
OpenYak supports MCP servers, letting you extend it with custom tool providers.
### Registering an MCP Server
```python
# backend/mcp_servers/my_server.py
from openyak.mcp import MCPServer, tool
server = MCPServer(name="my-tools")
@tool(server, description="Fetch weather for a city")
def get_weather(city: str) -> dict:
import httpx
r = httpx.get(f"https://wttr.in/{city}?format=j1")
return r.json()
if __name__ == "__main__":
server.run() # starts stdio MCP transport
```
Add it to `~/.openyak/mcp_config.json`:
```json
{
"servers": [
{
"name": "my-tools",
"command": "python",
"args": ["/path/to/backend/mcp_servers/my_server.py"],
"transport": "stdio"
}
]
}
```
Restart OpenYak; the new tool appears in the agent's toolbox automatically.
---
## Building a Custom Skill
Skills are Python modules dropped into `~/.openyak/skills/`:
```python
# ~/.openyak/skills/summarize_inbox.py
"""Skill: summarize emails from a local mbox file."""
from openyak.skills import skill, SkillContext
from mailbox import mbox
@skill(
name="summarize_inbox",
description="Parse a local .mbox file and return a structured summary of unread emails",
triggers=["summarize my inbox", "what emails do I have"]
)
def summarize_inbox(ctx: SkillContext, mbox_path: str) -> str:
box = mbox(mbox_path)
summaries = []
for msg in list(box)[:20]: # last 20 messages
subject = msg.get("subject", "(no subject)")
sender = msg.get("from", "unknown")
summaries.append(f"- From: {sender} | Subject: {subject}")
return "\n".join(summaries)
```
Reload skills without restarting:
```bash
curl -X POST http://localhost:8765/api/skills/reload
```
---
## File Automation Patterns
### Batch Rename Files
```python
import httpx
resp = httpx.post("http://localhost:8765/api/chat", json={
"mode": "automate",
"message": (
"Rename all .jpeg files in ~/Downloads/photos to use ISO date format "
"YYYY-MM-DD_original-name.jpg. Show me an audit log of changes."
)
})
print(resp.json()["reply"])
# The agent uses move_file + list_dir tools; audit log saved to ~/.openyak/logs/
```
### Analyze a CSV and Export Report
```python
import httpx, pathlib
csv_path = str(pathlib.Path.home() / "data" / "q1_sales.csv")
resp = httpx.post("http://localhost:8765/api/chat", json={
"mode": "analyze",
"message": "Find the top 5 products by revenue, identify any anomalies, and write a summary report to ~/reports/q1_summary.md",
"attachments": [csv_path]
})
print(resp.json()["reply"])
```
### Draft a Document from Notes
```python
import httpx
resp = httpx.post("http://localhost:8765/api/chat", json={
"mode": "write",
"message": "Read ~/notes/meeting_notes.txt and draft a formal memo to the team. Save it as ~/docs/team_memo.docx",
})
print(resp.json()["reply"])
```
---
## Remote Access (Secure Tunnel)
Enable one-click tunnel from Settings → Remote Access, or via API:
```python
import httpx
# Start tunnel
resp = httpx.post("http://localhost:8765/api/tunnel/start")
data = resp.json()
print("QR URL:", data["qr_url"]) # scan with phone
print("Tunnel URL:", data["tunnel_url"])
# Stop tunnel
httpx.post("http://localhost:8765/api/tunnel/stop")
```
The tunnel is end-to-end encrypted and bound to your session token. No data passes through external serversRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.