Skip to main content

Building ANOLISA from Source

This guide explains how to build and install ANOLISA components from a source checkout. It covers the shared build script and each component's build entry point. A component README remains the source for component-specific dependencies and runtime setup. For validation commands, see Testing.

1. Prepare a checkout​

git clone https://github.com/agentic-os-org/ANOLISA.git anolisa
cd anolisa

The common prerequisites are Git, Bash 4.3 or newer, make, a C compiler for native Rust or Python extensions, and a working network connection for package downloads. Platform-specific requirements are listed in the component matrix below. The repository does not define one global Rust version. Use the rust-toolchain.toml or rust-version declared by the component you are changing.

2. Repository layout​

The following table lists component locations in the repository:

ComponentDirectoryPlatform and role
cosh-ngsrc/cosh-ngRust Agent OS CLI and shell; full Linux build, limited macOS source build
agent-sec-coresrc/agent-sec-coreRust sandbox plus Python security CLI; Linux
agentsightsrc/agentsightRust/eBPF observability; full tracing on Linux, trace and serve on macOS
tokenlesssrc/tokenlessRust token and command-output optimization; Linux and Windows x64 source builds, with cross-compiled npm artifacts for macOS
agent-memory (memory)src/agent-memoryRust MCP memory server; Linux
os-skills (skills)src/os-skillsStatic skill definitions and scripts; all platforms supported by each skill
anolisadistribution/anolisaRust component lifecycle CLI; Linux and macOS arm64
SkillFS (skillfs)src/skillfsRust FUSE skill filesystem; Linux
ws-ckptsrc/ws-ckptRust workspace checkpoint daemon and TypeScript adapters; Linux system service
ktunersrc/ktunerRust kernel-tuning engine; Linux

The repository-level instructions are in AGENTS.md. Read a component's AGENTS.md before changing that component and use its README for architecture and runtime details.

3. Toolchains and native dependencies​

The build script can install common dependencies on supported Linux distributions, but it cannot make an unsupported platform build a Linux-only component.

NeedSource of truth
Node.jsnpm is used by the agent-memory, agentsight, agent-sec-core, tokenless, and ws-ckpt plugin builds. Follow each component's package.json and build instructions for its Node.js requirements.
Python and uvsrc/agent-sec-core/agent-sec-cli/pyproject.toml requires Python ==3.11.6; use uv for that project. Do not replace this with a repository-wide Python minimum.
Rustsrc/agent-sec-core/linux-sandbox/rust-toolchain.toml pins 1.93.0; distribution/anolisa/rust-toolchain.toml pins 1.93.1; src/cosh-ng/rust-toolchain.toml follows stable. Other components use the rust-version in their Cargo.toml when one is declared.
cosh-ngLinux source builds need pkg-config and OpenSSL development files.
agent-sec-coreLinux sandbox runtime and integration checks may need bubblewrap, GnuPG, and jq.
agentsightLinux eBPF builds need clang, LLVM, libbpf and ELF development headers, kernel headers, and a BTF-enabled kernel. make build-mac builds the macOS local viewer without eBPF.
tokenlessjust is used to fetch and patch RTK; npm is needed for the OpenClaw plugin.
agent-memoryLinux builds need CMake and libsystemd development headers; npm builds the bundled OpenClaw adapter.
SkillFSFUSE 3 and /dev/fuse are needed for the smoke test; ordinary Cargo tests do not mount FUSE.
ws-ckptInstalling the daemon requires Linux systemd and root privileges. Its user-mode Makefile target intentionally does not install the service.

When a component has a pinned toolchain, run its commands from that component directory so rustup can select the pin automatically. For an unpinned component, check its Cargo.toml and the installed stable toolchain before building.

uv-managed Python runtimes default to the official astral-sh/python-build-standalone downloads on GitHub. If that endpoint is unreachable, set UV_PYTHON_INSTALL_MIRROR to the base URL of a compatible mirror before building:

export UV_PYTHON_INSTALL_MIRROR="https://your-mirror.example/python-build-standalone"

4. Unified build script​

scripts/build-all.sh is a Linux convenience entry point, not a complete monorepo builder. Select the maintained components you need with repeated --component options: skills, sec-core, tokenless, ws-ckpt, memory, cosh-ng, and sight.

Build anolisa, skillfs, and ktuner with their local commands in section 5; they are not handled by this script.

The default install profile is user mode. Each component's install rules select paths within the user's home directory. Initial system dependency installation may still request sudo. Use --system (or --install-mode system) for system paths; the script stages files and may invoke sudo. --no-install builds and stages artifacts without installing them.

Before installing component files, the script collects and checks the runtime contract for every selected component. In user mode, missing native runtime packages are reported together with one package-manager command and the script exits without installing component files. In system mode, installable native runtime packages are handled in one transaction, while missing language runtimes or platform capabilities stop the run before package mutation. A system install that needs Node.js requires Node.js 20 or newer in the standard system PATH.

# Build and install selected components
./scripts/build-all.sh --component sec-core --component tokenless

# Build and stage without installing component files
./scripts/build-all.sh --component sec-core --no-install

# Use system paths instead of the default user profile
./scripts/build-all.sh --component ws-ckpt --system

# Select cosh-ng and agentsight
./scripts/build-all.sh --component cosh-ng --component sight

# Reuse already-installed dependencies
./scripts/build-all.sh --component sec-core --ignore-deps

# Install dependencies only, or print the plan without changing the system
./scripts/build-all.sh --component sec-core --deps-only
./scripts/build-all.sh --component sec-core --dry-run

# Explicit non-interactive mode and help
./scripts/build-all.sh --component sec-core --non-interactive
./scripts/build-all.sh --help

--ignore-deps skips both dependency setup and runtime dependency verification. Use it only on a pre-provisioned host; the caller is responsible for ensuring that installed components have all required runtimes.

The script may build a component in target/ before installing it, and a component's own install policy still applies. For example, ws-ckpt requires --system to install its daemon; selecting it in the default user profile does not create a user service.

5. Component build entry points​

Run the commands from the repository root unless a cd is shown. Read the linked README and scoped developer guide for component-specific build details.

ComponentBuild
AWcd src/aw && cargo build --locked -p aw-cli -p aw-service -p aw-package -p aw-provider -p aw-host --bins --examples
os-skillscd src/os-skills && make build
agent-sec-corecd src/agent-sec-core && make build-all
agentsightLinux: cd src/agentsight && make build-all; macOS local viewer: cd src/agentsight && make build-mac
tokenlessLinux: cd src/tokenless && make build; Windows x64
agent-memorycd src/agent-memory && make build
ws-ckptcd src/ws-ckpt && make build
cosh-ngcd src/cosh-ng && cargo build --workspace
anolisacd distribution/anolisa && cargo build --release --locked
SkillFScd src/skillfs && cargo build --workspace --release
ktunercd src/ktuner && cargo build --release

After building, use the component gates in Testing to validate your changes.

6. Further documentation​

Component-specific build details, generated artifacts, and runtime setup belong in the component README or its linked developer guide. Keep this page focused on repository-wide entry points and update it when the component list or script interfaces change.