whatisgithub

What is alaya?

amanayayatu-tech/alaya — explained in plain English

Analysis updated 2026-05-18

113TypeScriptAudience · pm founderComplexity · 4/5Setup · moderate

In one sentence

Alaya is a local first system where five AI agents propose, act, and learn from outcomes, while a human gate must approve any high risk decision.

Mindmap

mindmap
  root((Alaya))
    What it does
      Predict act observe learn
      Human gate approval
    Tech stack
      TypeScript
      SQLite
      React
    Use cases
      Product decisions
      Knowledge tracking
    Audience
      Teams
      Founders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run a repeatable predict, act, observe, and learn cycle for product or operations decisions

USE CASE 2

Require human approval before the AI acts on high risk decisions via web or Telegram

USE CASE 3

Build a structured knowledge library with confidence scores that decay over time

USE CASE 4

Try the core flywheel logic alone using the TypeScript-only package without a web layer

What is it built with?

TypeScriptSQLiteReactExpress

How does it compare?

amanayayatu-tech/alayabunnyos/base-agentfreestyle-voice/freestyle
Stars113113112
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity4/54/52/5
Audiencepm founderdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Runs locally with SQLite by default, a real language model requires an OpenAI-compatible endpoint.

License terms are not described in the explanation.

So what is it?

Alaya is a local-first system for teams or individuals who want AI assistance in making product or operational decisions, but need a way to keep that AI accountable. The README is written in Chinese, but the core idea is that every cycle of work goes through a fixed loop: make a prediction, take an action, observe what happened, figure out what went wrong, distill that into a knowledge entry, and use that entry in the next cycle. The goal is not unlimited AI automation but AI operating under strict, auditable constraints. The system runs entirely on your own machine using a local SQLite database. It includes five AI agents that each play a specific role: one selects goals and references prior knowledge, one collects feedback and external signals, one forms task packages, one distills observations into knowledge, and one manages the knowledge library including merging duplicates and expiring outdated entries. By default these agents use a built-in mock model so no external AI service is required, but you can connect any OpenAI-compatible endpoint to use a real language model. A central feature is the Human Gate system. Before the AI can act on high-risk decisions, a human must approve through either the web interface or a Telegram notification on their phone. There are three gate types: one for direction decisions, one for deciding whether a signal is worth adding to the knowledge base, and one for risk or cost decisions. The Telegram integration lets you receive alerts and approve or reject certain gates from your phone without needing to stay at a computer. The knowledge base is designed to be more structured than plain notes. Each entry tracks confidence level, status, source, references, expiry, and whether it has been superseded by a newer entry. The system applies time decay to entries, lowering their confidence over time if they have not been recently verified, and excludes stale or conflicting entries from influencing new decisions. The project ships as two packages: a pure TypeScript core that contains only the flywheel logic and runs without a database or web layer, and a full web application that adds Express, React, SQLite, a scheduler, and the Telegram integration. You start it with Node.js and access it at a local URL. A demo project is seeded on first run to show four complete cycles of the flywheel with predictions, observations, and human gates included.

Copy-paste prompts

Prompt 1
Explain the five AI agent roles in Alaya's flywheel and what each one is responsible for
Prompt 2
Help me set up the Telegram integration for approving Human Gate decisions
Prompt 3
Walk me through connecting an OpenAI-compatible endpoint instead of the mock model
Prompt 4
How does the knowledge base decide when an entry's confidence should decay?

Frequently asked questions

What is alaya?

Alaya is a local first system where five AI agents propose, act, and learn from outcomes, while a human gate must approve any high risk decision.

What language is alaya written in?

Mainly TypeScript. The stack also includes TypeScript, SQLite, React.

What license does alaya use?

License terms are not described in the explanation.

How hard is alaya to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is alaya for?

Mainly pm founder.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.