>_ DevTrendszh

语言

首页

语言

板块

前端 后端 移动端 DevOps AI / ML 游戏开发 区块链 嵌入式 安全
TypeScript

Apache Maka Turns AI Agent Work into a Verifiable Event Log

Maka — Your work. Your agent.

Most tools for running autonomous agents work as black boxes. We send a prompt, the agent shuffles through files, calls console commands, sometimes breaks half the repository, and spits out a final answer. If something goes wrong on the twentieth step, it's hard to reconstruct what actually happened: context is bloated, tool calls are erased or mixed up, and intermediate facts are lost.

A project called Maka recently appeared in the Apache incubator. The developers approached the problem from the classic event sourcing angle: instead of keeping dialogue history in RAM and hoping context stays stable, they record absolutely every action, model response, and permission subsystem decision to an append-only log on SQLite.

What is Maka

Essentially, it's a local workspace for AI agents with a focus on predictability and local data storage. There's no dependency on third-party clouds. Sessions, settings, artifacts, and work logs live on your disk.

Any model can be plugged in of your choice: commercial APIs, local LLMs through compatible gateways, or corporate endpoints. The environment itself is split into three interfaces:

  • an Electron and React desktop application for visual session work, tool timelines, and artifacts;
  • TUI and CLI for launching tasks right in the terminal of your current project;
  • an Eval benchmark module for reproducible testing of different models and agents on the same tasks.

The Log is the Runtime Principle

Maka's main engineering idea is rooted in separating the concepts of context and execution facts. In a typical chatbot, the LLM context is the history. If we trim old bash or grep calls to save tokens, we lose proof of what the agent actually did.

In Maka, all events (model response, tool call, execution result, permission denial) first land in a unified Runtime Event Log in the database runtime.sqlite. The user interface, session tree, and compressed context for the next neural network request are then built as projections on top of this log.

This approach delivers several practical benefits:

  1. You always see the exact chronology of actions and can return to a specific step.
  2. History compression (LLM Compaction) and pruning of useless tool outputs (Tool Result pruning) only change what the model will see on the next step, without erasing actual work facts.
  3. If a process crashes in the middle of a complex task, the runtime can restore the session state from the database without loss.
  4. Rolling back changes and branching dialogue become trivial operations on the event tree.

Local Tools and Permission Control

Out of the box, the agent can interact with the filesystem and terminal. The set of basic tools includes:

  • Read, Write, and Edit for targeted file edits;
  • Bash for executing commands in the system;
  • Glob and Grep (system ripgrep is used for quick searching).

All operations are controlled by a permission engine. Dangerous operations like overwriting configurations or executing shell scripts don't silently go through to the system. The desktop app renderer never receives exposed API keys: they live in local storage credential-vault.json with 0600 access rights at the operating system level.

The CLI has an interesting task graph mode. For example, if you run:

maka run --graph "Implement two independent slices, integrate them, then review the result"

The runtime will split the task into independent branches and start executing them in isolated Git worktrees. The main requirement before launching such a pipeline is a clean working directory with no uncommitted changes.

Architecture Under the Hood

Internally, the repository is split into a monorepo with clear boundaries of responsibility:

apps/desktop/       Electron main / preload / React renderer
packages/core/      Контракты сессий, событий, прав и подключений
packages/storage/   SQLite хранилище, конфиги и полезная нагрузка
packages/runtime/   AgentRun, адаптеры моделей, инструменты и контекст
packages/eval/      Модуль экспериментов и бенчмарков
packages/cli/       TUI и CLI утилиты
packages/ui/        Общие компоненты интерфейса

All operational data is tied to SQLite. Binary data and generated files are stored separately in the artifacts/ directory. Backup uses SQLite's built-in online backup with integrity validation of foreign keys and SHA-256 checksum verification for each artifact.

How to Launch and Try It

Currently, the desktop build is officially signed and compiled for macOS on Apple Silicon (arm64). There's an unsigned preview for Windows x64, and Linux packages are still in development. But the project can be built from source on any system with Node.js 22.19+ and npm 11.

Building the desktop version requires Git and installed ripgrep:

git clone https://github.com/apache/maka.git
cd maka
npm ci
npm run dev

If the GUI isn't needed, you can compile the packages and launch the CLI directly:

npm run build
npm run cli:dev -- run "Summarize this repository and identify its most important risk"

On first launch, Maka will ask you to specify a model connection in settings. The project doesn't impose its own shared proxy or built-in account, so you'll need a key for any compatible API or a local server like Ollama.

Who the Project Is For

Maka looks interesting for teams and developers who are tired of one-off scripts on top of the OpenAI API and want a solid foundation for local agents. Especially if reproducibility of results, control over command execution permissions, and preservation of change history matter.

The project is still actively being written, the data storage format and individual CLI commands may change. But the architectural framework based on event sourcing and SQLite is designed thoroughly, so digging into the runtime code is definitely worth it.

相关项目