โญ +79 today Python

aayushch/laya

๐Ÿ”— https://github.com/aayushch/laya โ†—

Laya: Your AI Command Center A cadence for professional orchestration. Laya is an open-source, local-first AI notification command center that aggregates Slack, Gmail, GitHub, Jira, Notion, Outlook, and Calendar notifications โ€” powered by local LLMs via Ollama and LM Studio, or cloud models like Claude and GPT with your own API keys. It intercepts events from your professional tools, performs autonomous research and action-staging using LLM-powered agents, and presents you with ready-to-approve Action Cards -- so the answer is ready before you open the notification. Works with: Ollama and LM Studio (local LLMs) Claude models (Anthropic) GPT models (OpenAI) Gemini models (Google) Llama models and any OpenAI-compatible endpoint โ€” via LiteLLM Aggregates: Gmail Slack GitHub Bitbucket Jira Linear Notion Outlook (email and calendar) Google Calendar How It Works Your Tools (Jira, Slack, Gmail, Bitbucket, Calendar) | v n8n (local Node.js) -- normalizes events | v Laya Engine (Python) -- classifies, researches, stages | v Laya UI (Tauri + Svelte) -- Action Cards you approve or dismiss | v n8n -- executes approved actions (creates PRs, sends replies, etc.) Key Features Multi-persona brain: Routes events to specialized AI personas (Engineer, Comms, Ops, Sales, HR, Finance) with domain-specific tools and prompts, with AI prioritization of every notification Card Workspaces: Agent workflows for complex tasks (bug fixes, code reviews) โ€” interactive workspaces where you collaborate with a coding agent (Claude Code, Gemini CLI, Codex, or Pi CLI) through multiple approval steps Card Research: Launch on-demand deep research sessions on any card โ€” a coding agent investigates with web search, semantic context, and sandboxed file access Agent inference backends: Run the classification/synthesis pipeline on an installed CLI agent's own quota instead of an API key โ€” select a model of the form agent/<id>/<model> (Claude Code, Codex, Gemini, or Pi) for any stage. Claude Code enforces JSON schemas natively; other agents use best-effort schema + retry Spaces: User-defined contexts grouping event sources with per-space model and API key configurations Context Association: Automatically links related cards across platforms using semantic similarity and LLM confirmation. Learns from your corrections to improve grouping accuracy over time Cross-platform memory: Entity resolution links "BUG-1234" in Jira to "PR-891" in Bitbucket to "the payment bug" in Slack Daily Briefing: Morning summary of overnight activity, pending cards, and today's calendar with context Analytics Dashboard: Track events processed, time saved, LLM costs (broken down by feature and pipeline step), throughput over time, and approval rates Budget Tracking: Monitor LLM costs by feature (Pulse, Omni, Chat, Coherence) with monthly caps and automatic pause when limits are reached. When running on agent inference backends, a separate window-based usage budget pauses ingestion as an agent's rolling quota nears its limit and auto-resumes when the window resets Chat sidebar: Ask Laya questions about your events, projects, and context โ€” and create, edit, or delete filter/classification/processing rules directly from the conversation Hybrid search: Chat and Coherence retrieval combine local vector search (ChromaDB) with lexical BM25 ranking over SQLite FTS5 ( cards_fts / events_fts ), merged via Reciprocal Rank Fusion, so both semantic and exact-keyword matches surface Coherence: Cross-platform entity search traces any person, ticket, or PR across all platforms using hybrid local search, with AI-generated narratives Egress: Execute outbound actions (emails, Slack messages, PR comments) directly from Laya with preview-before-send Omni: Rolling cross-platform summary that answers "where am I right now?" with four temporal layers (Attention, Recent, Period, Milestone) and progressive AI compression Bookmarks: Pin important cards for quick access regardless of date or status Classification learning: Laya extracts rules from your priority/persona corrections and improves classification automatically over time Context learning: Laya extracts natural-language context rules from your link/unlink corrections and improves context association over time. Learned and manual rules are viewable and editable in Settings, and large rule sets are LLM-consolidated automatically Processing rules: Automated, optionally AI-evaluated rules that act on incoming cards (tag, route, run an agent, send egress). Every firing is recorded in a searchable firing log with its outcome (success / error / skipped) and reason Audit & export: Inspect dead events, ingestion errors, and rule-filtered events in one place; retry or clear failures, and export filtered events or the audit log as JSON over any time window On-prem repositories: Self-hosted Bitbucket Server / Data Center and GitHub Enterprise are supported via a per-repo host field (empty or the cloud domain โ‡’ cloud) Dead event recovery: Failed events are tracked with error context and can be manually retried from the audit log Privacy-aware: Three-tier data classification with cloud/local processing options Tech Stack Layer Technology Desktop Shell Tauri v2 (Rust) Frontend Svelte 5 (runes) + Skeleton UI + Tailwind CSS v4 Backend Python 3.10+ / FastAPI / asyncio LLM Interface LiteLLM (supports Anthropic, OpenAI, Google, Ollama) Integration Gateway n8n (local Node.js on port 45678) Structured Storage SQLite (async via aiosqlite, WAL mode) Vector Storage ChromaDB (embedded PersistentClient) Embeddings ONNX (built-in to ChromaDB) or sentence-transformers (optional) Coding Agents Claude Code / Gemini CLI / OpenAI Codex CLI / Pi CLI (usable as workspace agents and as inference backends) Project Structure laya/ โ”œโ”€โ”€ engine/ # Python FastAPI backend โ”‚ โ”œโ”€โ”€ laya/ โ”‚ โ”‚ โ”œโ”€โ”€ main.py # Entry point (uvicorn server on :8420) โ”‚ โ”‚ โ”œโ”€โ”€ config.py # Settings, paths, agent detection โ”‚ โ”‚ โ”œโ”€โ”€ api/ # REST + WebSocket endpoints (27 routers) โ”‚ โ”‚ โ”œโ”€โ”€ db/ # SQLite (+ FTS5) + ChromaDB + 70 migrations โ”‚ โ”‚ โ”œโ”€โ”€ pipeline/ # Event processing (ingest โ†’ route โ†’ stage โ†’ emit โ†’ trace โ†’ learn โ†’ context_learn โ†’ omni) โ”‚ โ”‚ โ”œโ”€โ”€ llm/ # LiteLLM client, agent inference backends, prompts, tools โ”‚ โ”‚ โ”œโ”€โ”€ agents/ # Coding agent adapters (Claude, Gemini, Codex, Pi) โ”‚ โ”‚ โ”œโ”€โ”€ workers/ # Multi-persona LLM workers (engineer, comms, ops, sales, hr, finance) โ”‚ โ”‚ โ”œโ”€โ”€ egress/ # Outbound action execution (9 platforms) โ”‚ โ”‚ โ”œโ”€โ”€ integrations/ # n8n bootstrap & client โ”‚ โ”‚ โ””โ”€โ”€ security/ # OS keychain integration โ”‚ โ”œโ”€โ”€ requirements.txt # Core Python dependencies โ”‚ โ””โ”€โ”€ requirements-ml.txt # Optional: torch + sentence-transformers โ”‚ โ”œโ”€โ”€ ui/ # SvelteKit + Tauri desktop app โ”‚ โ”œโ”€โ”€ src/ # Svelte 5 frontend (runes syntax) โ”‚ โ”‚ โ”œโ”€โ”€ routes/ # Pages (feed, coherence, dashboard, settings, workspace, omni) โ”‚ โ”‚ โ”œโ”€โ”€ lib/ # Components, API client, stores โ”‚ โ”‚ โ”œโ”€โ”€ app.css # Tailwind v4 + theme system โ”‚ โ”‚ โ””โ”€โ”€ app.html โ”‚ โ”œโ”€โ”€ src-tauri/ # Rust/Tauri shell โ”‚ โ”‚ โ”œโ”€โ”€ src/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ lib.rs # Tauri setup, commands, health polling, tray โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ sidecar.rs # Python venv lifecycle & engine spawning โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ n8n.rs # n8n process management โ”‚ โ”‚ โ”œโ”€โ”€ tauri.conf.json # Tauri config (resources, icons, window) โ”‚ โ”‚ โ””โ”€โ”€ resources/ # Bundled engine source (production builds) โ”‚ โ”œโ”€โ”€ package.json โ”‚ โ””โ”€โ”€ svelte.config.js # Static adapter (SPA mode) โ”‚ โ”œโ”€โ”€ n8n/ โ”‚ โ””โ”€โ”€ workflows/ # Integration workflows (JSON, ~21 files: ingestion + executor per platform) โ”‚ โ”œโ”€โ”€ scripts/ โ”‚ โ”œโ”€โ”€ setup-dev.sh # One-time dev environment setup โ”‚ โ”œโ”€โ”€ dev.

ๅ…งๅฎน็‚บๆ”ถ้›†็•ถๆ—ฅๆŠ“ๅ–็š„ repo ๆ่ฟฐๅŽŸๆ–‡๏ผŒๅฎŒๆ•ด่ณ‡่จŠ่ซ‹่ฆ‹ GitHub ๅŽŸ้ ใ€‚