# Repository Briefing: aayushch/laya
> Source: https://repoforai.com/repo/aayushch/laya (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/aayushch/laya
- **Official Docs / Website**: https://laya.aay.sh
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v3.2.0 (2026-11-29) — https://github.com/aayushch/laya/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Self-Hosted, Local AI
- **Momentum**: 848 ★ total (+1 24h / +10 7d) · 133 forks
- **Topics**: `ai`, `ai-agents`, `automation`, `byok`, `lmstudio`, `local-first`, `local-first-ai`, `localai`, `notification-aggregation`, `notifications`, `ollama`, `productivity`
- **When to Use**: Best for: Professionals juggling email, chat, issue trackers, and calendars who want one queue where an agent gathers context and stages actions they can review before execution. Skip if: You need a centrally managed, always-on service rather than a workstation app, require strictly offline operation while monitoring cloud tools, or can solve the problem with a few deterministic workflows.

## Overview
```text
### Architecture & Core Mechanics
Laya is a desktop app with two local services. n8n normalizes events from work tools and forwards them to the Python FastAPI/asyncio engine at `engine/laya/main.py` on port 8420. The engine classifies and routes events, gathers context, and stages Action Cards. The Tauri v2 shell and Svelte 5 UI use REST and WebSocket interfaces to surface cards for approval or dismissal. Approved actions, such as sending a reply, go back through n8n for execution.

The integration gateway runs on port 45678. Its event workflows, the engine's `egress/` adapters, and the model interfaces are separate extension points: adding an event source does not by itself give the app a new outbound action. Structured data and full-text search use SQLite with WAL and FTS5; embedded ChromaDB stores vectors, with built-in ONNX embeddings or optional sentence-transformers. LiteLLM and the engine's CLI adapters provide separate paths for inference.

### Key Capabilities & Differentiators
The engine prioritizes incoming events and routes them to six personas, from Engineering and Comms to HR and Finance. Spaces group event sources with per-space models and API keys. Semantic similarity proposes cross-service links, an LLM confirms them, and user corrections inform later grouping. Daily briefings, pipeline-cost analytics, and monthly caps with automatic pausing help users review activity and manage spend.

Inference can use Ollama or LM Studio, BYOK access to Claude, GPT, or Gemini, or OpenAI-compatible endpoints through LiteLLM. Card Research can use web search and sandboxed file access. Card Workspaces support Claude Code, Gemini CLI, Codex, Pi CLI, and Cursor Agent for multi-step work with approvals. The first four can also handle individual classification or synthesis stages using their CLI quota. Claude Code enforces JSON schemas natively; the other CLI inference backends use best-effort validation and retries.

### Trade-offs & Limitations
Compared with native inboxes, Laya adds a cross-service queue and context before approval, but it also adds integration credentials, workflows, and model behavior to maintain. Compared with standalone n8n, it supplies a desktop approval surface and semantic triage rather than just predefined automations. That is useful when context determines the next action; a deterministic workflow remains the simpler choice when triggers and actions are already explicit.

Local inference gives teams control over where model processing runs, not a guarantee that all activity stays offline: SaaS connectors and web research can still reach external services. Model size, context length, and concurrency determine much of the local compute and memory demand; cloud inference shifts the model compute off the workstation but introduces usage costs and a data-sharing decision. Approval gates outbound actions but does not validate the underlying research or the proposed action. Pilots should test those separately and verify coverage for each required action, not just each event source.

### Hardware & Deployment Guide
Start with a prebuilt macOS `.dmg`, Windows `.msi` or `.exe`, or Linux `.deb` or `.AppImage`. Release builds require no preinstalled development toolchain: on first launch Laya reuses compatible Python 3.10–3.14 or provisions it, and downloads a private Node.js 24 for n8n under `~/.laya/`. API keys go in the OS keychain. First-run downloads and connected SaaS tools still need network access even if inference stays local.

Source builds require Python 3.10+, Node.js 20+ for the UI, Rust, and platform build dependencies. `scripts/setup-dev.sh` installs dependencies and `scripts/dev.sh` starts the development environment. The Windows `.exe` installer requests administrator approval; n8n upgrades on Windows can take 15–30 minutes because of antivirus scanning. On Linux systems affected by the AppImage's bundled Wayland libraries, prefer a native package where available. v3.2.0 adds Trello polling; v3.1.0 improves Jira creation-event and Slack mention detection.
```

## Key Capabilities
```text
- Approval boundary: The Python engine stages Action Cards; n8n executes approved actions.
- Inference routing: Use local or BYOK endpoints, or select Claude Code, Codex, Gemini CLI, or Pi CLI for individual pipeline stages.
- Context isolation by configuration: Spaces group event sources and let you set models and API keys per space.
- Cross-source linking: Semantic similarity proposes related cards, an LLM confirms links, and user corrections inform future grouping.
- Local persistence: SQLite uses WAL and FTS5; embedded ChromaDB provides persistent vector storage.
- Trello in v3.2.0: A single read-token connection can poll multiple boards every two minutes.
```

## Quick Start / Clone
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
