Axl README

The project's README from github.com/Observal/Axl. As one markdown file: README.md.

Axl

Axl, short for Axolotl, is a local-first agent harness for developers who want one durable coding session across multiple clients without giving each client its own agent runtime.

A single daemon owns the session, model loop, tools, policy, and canonical event history. Clients connect through a typed protocol and shared SDK. They render the same state and submit user intent, but they do not become independent agents.

Project status: Axl is under active development and has not published its first release. Roadmap phases 0 through 4 are complete. The TUI, prompt templates, Agent Skills, MCP support, native Linux hardening, and local OCI execution were brought forward from later phases. Web, desktop, mobile, hosted relay, and broader provider work remain planned unless explicitly marked implemented.

Who Axl is for

Axl currently fits developers who want:

Axl is not yet a hosted service, remote collaboration product, browser application, mobile application, or general workflow engine. Those surfaces are documented where planned, but they are not silently represented as shipped features.

What works today

Area Current capability
Sessions Create, list, resume, fork, clone, interrupt, detach, reconnect, compact, configure, and dispose
Durability Append-only canonical JSONL, operation IDs, crash-safe mutation journal, restart reconciliation, and deterministic replay
Multi-client behavior Independent attachments, paged snapshots, acknowledged cursors, presence, reconnect recovery, and shared deterministic projection
Automation One-shot text and canonical JSONL output with axl print and axl json, plus native daemon RPC with axl rpc
Model interaction Provider-grouped text-model catalog, provider-qualified model selection, authentication management, usage and costs, streaming text and reasoning, tool calls, steering, and follow-ups
Built-in tools read, write, edit, bash, web_fetch, and web_search
Extensions Public extension API, prompt templates, Agent Skills, and MCP 2025-11-25 over stdio and Streamable HTTP
Workspace review Bounded file listing and reads, Git status, structured diffs, and daemon-owned last-turn checkpoints
Terminal UI Multiline editor, history, themes, model controls, tool rendering, image attachments, regular scrollback mode, and fullscreen mode
Isolation Bubblewrap, Landlock, seccomp, and rlimits on Linux; Seatbelt on macOS; optional rootless Podman or Docker execution
Safety Path canonicalization, symlink-escape rejection, secret redaction, bounded protocol messages, and fail-closed sandbox selection

Prompt templates

Put reusable Markdown prompts in ~/.axl/prompts/ or .axl/prompts/. Project templates override global templates with the same filename. Run /prompt to browse them or /prompt <name> [arguments] to expand one into the editor for review before sending. Templates reload with /reload.

---
description: Review one file
usage: "<path> [focus]"
---
Review {{1}}. Focus on {{2=correctness}}.

Use {{1}} through {{99}} for quoted positional arguments, {{all}} for every argument, and {{1=default}} or {{all=default}} for defaults.

User themes

Put Axl theme JSON files in ~/.axl/themes/ or .axl/themes/. Project themes override global themes with the same ID. Select one with /theme <id>. Axl reloads changed theme files while the TUI is running, retains the last valid palette after an invalid edit, and reports the validation error. Use /reload after creating a theme directory during an active session. See packages/tui/README.md for the format and color roles.

Architecture

flowchart LR
  subgraph Clients[Presentation clients]
    TUI[Terminal UI]
    Future[Future web, desktop, IDE, and mobile clients]
  end

  CLI[CLI process host]
  SDK[TypeScript SDK<br/>connection, retry, cursors,<br/>subscriptions, projections]
  Protocol[Protocol<br/>events, RPCs, capabilities,<br/>runtime validation]

  subgraph Authority[Authoritative daemon process]
    Runtime[Runtime assembly]
    Daemon[Daemon<br/>sessions, subscriptions,<br/>presence, workspace RPCs]
    Kernel[Kernel<br/>JSONL, agent loop, tools,<br/>policy, operation ownership]
    AI[AI providers<br/>credentials, models, dialects]
    Extensions[Extensions<br/>prompts, Skills, and MCP]
    Sandbox[Sandbox<br/>native and OCI]
  end

  TUI --> SDK
  Future --> SDK
  SDK -->|typed RPC and events| Daemon
  SDK -. validates with .-> Protocol
  Daemon --> Kernel
  Daemon -. validates with .-> Protocol
  CLI --> Runtime
  CLI --> TUI
  Runtime --> Daemon
  Runtime --> AI
  Runtime --> Extensions
  Runtime --> Sandbox
  AI -. model port .-> Kernel
  Extensions -. public extension API .-> Kernel
  Sandbox -. command execution .-> Kernel

The boundaries are deliberate:

The canonical order is always:

  1. A client submits typed user intent.
  2. The daemon validates capability, policy, and operation ownership.
  3. The kernel performs the operation.
  4. The canonical event is appended before derived state changes.
  5. Every subscribed client receives and projects the same event.

See Client authority and adapter boundaries for the complete ownership rules.

Sessions, detach, and reconnect

A session belongs to the daemon, not to the terminal that created it. Closing a client attachment does not cancel accepted work.

Resume uses a frozen, paged snapshot followed by an acknowledged live event stream. The SDK rejects altered duplicates, detects gaps, and replaces a projection from an authoritative snapshot when a cursor cannot be resumed safely.

Steering, follow-ups, and queued prompts

While a model turn is active:

Durable queued prompts use the daemon's canonical queue lifecycle. They are recorded before acknowledgement and are visible to every attachment. Pending durable queue items become paused after daemon restart and require explicit re-queueing, so Axl never guesses whether deferred work should run again.

Installation

Axl requires Node.js ^22.19.0 or >=24. Native sandboxed execution requires Bubblewrap on Linux. Axl installs its pinned Landlock launcher dependency. macOS uses Seatbelt. Local OCI execution optionally uses rootless Podman or Docker with seccomp and cgroups v2.

Axl has not published its first release yet. After the first release passes the gate in RELEASES.md, install from npm:

npm install --global @observal/axl

Or install a checksum-verified GitHub release artifact:

curl -fsSL https://github.com/Observal/Axl/releases/latest/download/install.sh | sh

Install a specific release by setting AXL_VERSION:

AXL_VERSION=v0.1.0 \
  curl -fsSL https://github.com/Observal/Axl/releases/download/v0.1.0/install.sh | sh

For development from this repository:

git clone https://github.com/Observal/Axl.git
cd Axl
pnpm install --frozen-lockfile
pnpm run install:cli

Quick start

Inspect providers, authenticate one, choose its model, and start a session:

axl providers
axl models openai
axl login openai api_key
axl

The provider and model startup options select a canonical pair for a new session. In the TUI, use /model to choose a grouped provider and model pair.

Common entry points:

axl -r                          # choose a saved session
axl <session-id>                # resume a known session
axl --cwd ~/code/project        # choose the workspace
axl --profile exec              # expose only sandboxed Bash
axl --no-web-fetch              # disable one web tool
axl --no-web-search
axl --no-web-tools              # disable both web tools
axl doctor                      # inspect local sandbox support
axl daemon                      # run the daemon in the foreground
axl print "describe this repo"  # print one headless response
axl json "describe this repo"   # stream canonical events as JSONL
axl rpc                         # bridge JSONL RPC over stdin and stdout

The CLI connects to the matching local daemon and starts one in the background when necessary. Native, OCI, and unsafe placements use separate state and are labeled in the resume picker.

Model providers

Use axl providers for explicit authentication and catalog status, axl models for grouped text models, axl login and axl logout for stored authentication, and axl refresh for explicit catalog refresh. These commands report actionable authentication, entitlement, region, catalog, model, and configuration failures. Add named local or hosted endpoints in ~/.axl/models.json; see the native configuration example.

Inside the TUI, /model selects a provider-qualified model. /providers, /login, /logout, and /refresh expose the same daemon-owned operations. Escape cancels an active provider operation. The editor reports last-turn and cumulative token usage and USD cost when available.

Provider secrets never pass through daemon RPC or SDK projection.

  1. The daemon owns provider and session operations.
  2. packages/ai owns provider-specific credentials, authentication, model metadata, API dialects, and request behavior.
  3. The trusted CLI process-host adapter renders provider prompts and collects answers inside the daemon process.
  4. Login RPC carries only the provider ID and login method.
  5. Authorization launch is restricted to HTTPS URLs without embedded credentials.
  6. Canonical events, SDK cursors, catalogs, and client projections never contain credential values, OAuth codes, or prompt answers.

Provider listing is offline and side-effect free. Authentication status and catalog refresh are separate explicit operations. API dialect is model metadata, not user-selectable configuration. See the provider setup and compatibility reference for every provider, environment variable, endpoint, region, authentication method, catalog type, custom-endpoint boundary, limitation, and opt-in smoke procedure. Provider authority and client responsibilities follow docs/architecture/client-boundaries.md.

Session profiles

Profiles are selected when a session is created and are enforced by the daemon.

Profile Purpose
standard Normal coding session with the configured built-in tools and extensions
minimal Small tool surface for focused work
chat Tool-free conversation
exec Bash-only session with no Skills, MCP servers, file tools, or web tools

The exec profile does not make an unsafe session safe. Isolation and tool exposure are separate controls.

Built-in tools

The standard session exposes:

web_fetch blocks private and reserved destinations, limits redirects and response size, and returns readable or raw text. Set BRAVE_SEARCH_API_KEY to use ranked Brave Search results.

Terminal client

The TUI supports:

Run /commands for available actions and /hotkeys for keyboard controls.

Sandboxing

Axl refuses to run model-selected commands when required isolation is unavailable.

Native Linux

The native Linux backend combines Bubblewrap namespaces and mounts, Landlock filesystem mediation, a versioned seccomp policy, dropped capabilities, private runtime directories, and resource limits.

macOS

The native macOS backend uses Seatbelt and reports unavailable controls explicitly.

OCI

Pull an image yourself and pass an immutable digest:

podman pull docker.io/library/bash:5.2.37
axl --sandbox podman \
  --image docker.io/library/bash@sha256:<64-hex-digest>

Replace podman with docker to use Docker. Axl never pulls an image implicitly and rejects mutable tags.

Unsafe mode

axl --unsafe

Unsafe mode disables operating-system isolation and file-tool path policy. Commands and extensions run with the user's host access. Unsafe sessions use separate state under ~/.axl/unsafe/, record their unenforced status, and remain visibly labeled.

See Local sandbox backends and Security policy.

SDK and client development

@axl/sdk is currently private and in-tree. It provides:

A new client should use the SDK rather than parse wire messages or reduce canonical events itself. Platform transports, authentication mechanisms, and cursor stores implement shared contracts as separate adapters. The daemon remains the authority regardless of client platform.

Browser, desktop, IDE, Android, and iOS clients are planned. The current browser architecture and security contracts are specified, but no packages/web application is implemented yet.

Extensions

First-party and third-party features use the same public extension API. Extensions declare capabilities before activation and receive no private kernel imports. Disabling an extension removes its prompt content, UI, listeners, and background work.

Implemented first-party integrations include:

Package map

Package Responsibility
packages/protocol Dependency-free canonical event, wire, RPC, capability, and validation contracts
packages/kernel Event log, replay, agent loop, tool protocol, cancellation, queues, policy, and extension-host lifecycle
packages/ai Provider contracts, credentials, model metadata, thinking policy, dialects, and Azure OpenAI support
packages/daemon Authoritative sessions, operation coordination, subscriptions, presence, workspace RPCs, and Unix-socket server
packages/sdk Typed client, reconnect and retry behavior, subscriptions, cursors, and deterministic projections
packages/runtime Provider, tool, extension, and sandbox assembly for the daemon process
packages/sandbox Native and OCI operating-system confinement
packages/cli Process startup, placement selection, provider setup, and client launch
packages/tui Interactive terminal presentation over the public SDK
packages/extensions/prompts Prompt template discovery and editor expansion
packages/extensions/skills Agent Skills integration
packages/extensions/mcp MCP integration

Architecture specifications

Project documents

Development

pnpm install --frozen-lockfile
pnpm build
pnpm typecheck
pnpm lint
pnpm format:check
pnpm test
pnpm check:boundaries
pnpm check:generated
pnpm audit --audit-level high
reuse lint

Run pnpm check for the normal local build and test gate. See the development guide for focused commands and contribution workflow.

License

Axl is licensed under Apache-2.0. See LICENSE and NOTICE.

Axl (Observal/Axl)

Searching Database…

1.2K ·GitHub
这是什么?Axl(Axolotl 的缩写)是一个面向开发者的本地优先 agent 框架:一个持久化的编码会话可以跨多个客户端共享,由单一后台守护进程统一管理,而不是让每个客户端各自带一套 agent 运行时。
这是一个成品应用,还是我用来构建客户端的框架?目前它是一个终端编码 agent:一个 CLI 启动 TUI 客户端,同时由后台守护进程负责会话、工具、策略和历史。客户端只是基于类型化协议和共享 SDK 的轻量渲染层,并不是独立的 agent。
怎么把它跑起来?你需要 Node.js ^22.19.0 或 >=24。目前还没有发布任何版本,所以要从本仓库运行;然后通过 axl providers 和 axl login 完成模型提供商的认证,/model 选择模型,CLI 会自动在后台帮你启动守护进程。
沙盒功能需要额外安装什么吗?在 Linux 上需要 Bubblewrap(Axl 会自行安装其固定版本的 Landlock 启动器);macOS 得益于内置的 Seatbelt,什么都不用装。Rootless Podman 或 Docker 是可选的,只有想用基于 OCI 的执行方式时才需要。
有什么坑吗——它达到生产可用了吗?没有——它还是预发布阶段,正在积极开发中。TUI、提示词模板、Agent Skills、MCP、Linux 加固和本地 OCI 执行目前可用;网页端、桌面端、移动端和托管中继服务还只是计划中。
这个工具只面向开发者,还是普通用户也能用?只面向开发者——具体来说,是那些想要一个终端编码 agent 的人:会话持久可恢复、文件/命令行/网页工具都在沙盒里运行、可以明确地干预控制,还能通过类型化 SDK 在同一个守护进程之上构建新的客户端。
它能在 Windows 上运行吗,还是只支持 Mac 和 Linux?原生支持的是 Linux(Bubblewrap、Landlock、seccomp)和 macOS(Seatbelt);没有提到 Windows。Rootless Podman 或 Docker 可以在之上额外提供一种可选的 OCI 执行模式。
所有东西都留在我的电脑上吗?是的——它是本地优先的:守护进程在本地管理你的会话、工具、策略和完整历史。只有调用模型提供商和使用 webfetch/websearch 工具时才会访问网络。
我的提供商 API 密钥存在哪里?存在提供商层(packages/ai)里,而不是守护进程中:提供商的密钥不会经过守护进程 RPC 或 SDK 投影,规范事件、游标和客户端投影中也绝不会包含凭据值或 OAuth 码。
如果 agent 正在工作时我关掉终端会怎样?什么都不会丢:会话属于守护进程,而不是终端。/detach 会让工作继续运行,你之后可以重新连上——axl -r 会打开一个恢复选择器,axl 则直接恢复已知的会话。只有 /quit 会中断工作并关闭守护进程。
这个 agent 开箱自带哪些工具?read、write、edit、bash、webfetch 和 websearch,全部受守护进程策略和沙盒约束。webfetch 会屏蔽私有和保留地址,并限制重定向次数和响应大小;websearch 默认使用 DuckDuckGo,设置 BRAVESEARCHAPIKEY 后则使用 Brave 的排序结果。
我能在 agent 执行过程中改变它的方向吗?可以。按 Enter 提交引导指令,它会在下一个模型边界生效;按 Alt+Enter 可以排队一条后续消息,在本轮本来要结束时发送。两者都按先进先出处理,引导指令优先于后续消息。
它支持 Agent Skills 和 MCP 吗?支持——提示词模板、Agent Skills 以及基于 stdio 和 Streamable HTTP 的 MCP 2025-11-25 目前都可用,它们作为扩展放在内核之外。可复用的 Markdown 提示词放在 ~/.axl/prompts 或 .axl/prompts 中,通过 /prompt 展开。
Creator
Observal
Size
7.3 MB
Stars
1.2K
Updated
CommitOct 05
Age
1mo
Commits · 90 Days