latest · Kernel-level sandbox · CLI, Desktop & IM

GALEXEC
General Agent Loop & Executor

A self-contained agent runtime for CLI, Desktop, browser, IM, and HTTP. Run it on Linux, macOS, or Windows with a kernel-enforced sandbox — no Python, Node, Docker, remote sandbox, or per-tool permission prompts.

Linux· macOS· Windows· Zero install · No Python · No Node · No Docker
gal chat
$ gal init && gal chat
Initializing GAL... ✓
Sandbox: active (Linux)
Agent: default · Model: claude-sonnet
Safe mode: enabled
 
> analyze nginx error logs and fix the config
⚡ bash -> tail -100 /var/log/nginx/error.log
⚡ file_read -> /etc/nginx/nginx.conf
⚡ file_edit -> /etc/nginx/sites-enabled/default
⚡ bash -> nginx -t && systemctl reload nginx
✓ Fixed: semicolon missing in server block. Config reloaded.
> ▌

Everything, without the terminal

The native Desktop app (galw) brings the shared GAL engine into a focused window: streaming answers, turn navigation, collapsible tool and sub-agent cards, and in-place management. Split the workspace into up to three columns, and it shares sessions, tools and config with the CLI — start something in a terminal, finish it in the app.

Sessions that follow you

CLI and Desktop read the same ~/.gal/sessions/. Resume a conversation you started over SSH, search across all past sessions, and export any single turn as a styled HTML file.

Paste, drop, attach

Paste screenshots or drag files into the composer (25 MiB each). Images keep their original dimensions for accurate coordinates, use a compact supported encoding, and downscale only when provider limits require it.

Nine languages, eight themes

Auto-detected locale across English, Simplified and Traditional Chinese, Japanese, Korean, Spanish, French, German and Russian — plus eight colour themes with adjustable font family and size.

Steer without stopping

Inject guidance mid-turn without interrupting the stream, lift restrictions for a single turn from the lock icon, and manage one-shot, cron and interval timers from the timer panel.

A workspace that splits

Open up to three sessions side by side, each with its own scroll. Drag tabs to reorder them, send a tab across a split from its right-click menu, and your open tabs and layout come back on restart.

One instruction per session

Set session constraints with /profile — a standing instruction that is always in the prompt. It belongs to the conversation, so it survives agent switches, history clears, archiving and restart.

Built around what other tools skip

Agentic loops are table stakes. GAL's bet is on the parts that make an LLM safe to run on your real machines.

Kernel-level sandbox

The same security model on every OS. No Docker, no remote sandbox, no permission prompts — a kernel-enforced policy built into the binary.

LinuxKernel namespace isolation
macOSSeatbelt sandbox
WindowsWRITE_RESTRICTED token
CWDread + write
~/ (Linux)read-only (writes captured)
~/.gal/blocked
Credentialshidden
Dev cachesread + write

Self-contained on every surface

The CLI/server binary (gal) and native Desktop binary (galw) are self-contained Go applications. No Python, Node, Docker, or host-side agent daemon — with the same engine, sessions, and safety model across every surface. Even runs in Termux on Android, in WSL, or on a hardened production server.

Terminal / SSHgal
Desktopgalw
IM / HTTP servergal serve

Self-managing

Manage GAL itself through conversation, not config-file archaeology. Install skills, register MCP servers, add providers, switch models — all via /admin mode.

◆ Drop a SKILL.md + scripts — they become tools
◆ Connect any MCP server — tools appear automatically
◆ /sudo grants one turn of unrestricted access

Context that survives

Model-driven compression lets the LLM decide what to summarize and what to keep. Tens of thousands of agent rounds in one session, with the current turn always protected. Cross-session memory persists knowledge across conversations in natural language.

10,000rounds per turn (limit)
400Kchar context budget
Autocompression

Limits are configuration, not constants: max_rounds, context_limit and the compression ratios are all set in gal.yaml.

A local knowledge base

Index your own documents and search them with keyword and optional semantic retrieval — all on one machine. Extraction covers PDF, Office, HTML, Markdown, CSV and plain text, with optional OCR for images and scanned PDFs. No cloud, no upload.

◆ Manage from gal kb or the Desktop Knowledge tab
◆ Keyword (BM25) search works with no embedding model
◆ Optional reranking and IVF cell pruning for speed

Built to survive

Auto-retry with exponential backoff on network errors and rate limits. Error-loop detection forces strategy changes after repeated failures. Ctrl+C cancels cleanly without losing completed rounds. Sessions save after every agent round.

Bring your own model

Connect OpenAI-compatible APIs or the native Anthropic protocol, with a preset catalog of 45+ providers that carries protocol, endpoint and starter models. Each provider shows its vendor mark in the model menu, and GAL resolves capabilities by protocol, vendor, and model. Switch providers or models mid-session without losing context.

OpenAI/v1/chat/completions
Anthropic/v1/messages
Capabilitiesprotocol + vendor + model

An audit log the agent cannot reach

Audit logging is on by default and independent of hooks. Every state-changing tool call is recorded with its key parameters, outcome and duration, alongside session start and end and security decisions such as /sudo. Read-only tools are skipped, and safe mode hides the whole ~/.gal directory — so the agent being logged cannot read or tamper with the record.

◆ SQLite at ~/.gal/audit/audit.db — WAL, shared across sessions
◆ 730-day retention, cleaned lazily on startup
◆ Query it directly: sqlite3 ~/.gal/audit/audit.db

One engine, every surface

From terminal to desktop to team IM — the same engine, sessions, and safety policy. The sandbox isolates tool execution, whether the target is a local project, a Kubernetes cluster, or a remote server.

ACCESS SURFACES CLI gal TUI · SSH · one-shot · pipe Desktop galw Desktop · Web browser Server gal serve Feishu · DingTalk · Slack · HTTP API shared sessions · configs · memory · timers Agentic Engine Loop · Context compression · Sub-agents · Memory tools · skills · MCP servers TOOLS & EXTENSIONS File & Code read · write · edit · grep · symbols Shell bash · sandboxed Web http · browser · image_read Skills · Plugins · MCP SKILL.md · plugin.yaml · MCP tools kernel-enforced path policy · hooks SANDBOX Linux Kernel namespace macOS Seatbelt Windows Restricted token CWD read+write · ~/ read-only · credentials hidden · /sudo one-turn bypass TARGETS Local Project Direct file system access Kubernetes kubeconfig bind-mounted read-only Remote Hosts SSH via remote tool · /remote cd Safe K8s Management Credentials hidden by default. Trusted kubeconfig bind-mounted read-only via safe_mode.mounts Model runs kubectl inside sandbox — manages clusters but cannot steal credentials. Safe Remote Execution SSH hosts registered explicitly. /remote cd changes CWD. All actions pass through hook pipeline — pre_tool hooks require confirmation for kubectl delete or rm -rf.
GAL CLI in a terminal: an agentic turn with tool calls folded into a collapsible process section
The CLI — the same engine over SSH or in a terminal. Tool calls, thinking and sub-agent activity fold into one collapsible section; the answer stays visible.

Defense in depth, not luck

Nine independent layers, each catching what the one above might miss. No single layer is trusted alone — if the model finds a gap in one, the next one holds.

1
OS Kernel Sandbox
Cross-platform kernel isolation Linux namespace / macOS Seatbelt / Windows WRITE_RESTRICTED token
Runtime, continuous
2
Credential Isolation
Credential directories write-denied, cloud environment variables filtered 11 dirs + 20+ env vars
Even with sandbox off
3
Tool Execution Gate
Read/write classification, serial writes, timeout, path validation
Every tool call
4
Prompt Safety Harness
Safety rules always injected, cannot be overridden by user messages
Every context build
5
Hook Policy Gate
Customizable deny / confirm / exec strategy gates
pre_tool / pre_turn / pre_llm
6
Audit Trail
Independent SQLite log, on by default, invisible to sandbox
Post-hoc traceability
7
Privilege Delegation
Sub-agent whitelist, isolated context, depth limit
On spawn
8
Privilege Management
/admin runs in separate sandbox, /sudo single-turn bypass with auto-recovery
On demand
9
Resilience
Error-loop detection, forced policy change on repeated failure
Runtime

Local sandbox + /sudo

Everyday work — reading logs, editing configs, running tests — stays inside the sandbox. When you genuinely need to install a package or restart a service, /sudo lifts restrictions for one turn — then the sandbox snaps back automatically. No standing privilege, no manual cleanup.

Remote SSH, same safety

remote tool targets a registered host. The remote session inherits the full sandbox and /sudo model — not a blank shell. Every command passes through the same hook pipeline as local execution.

Kubernetes, safely

Run cluster operations with the credential held outside the sandbox. Split duties across two agents — one holds the kubeconfig, the other operates the cluster — so the model managing Kubernetes can never read the credential it authenticates with. That is architecture, not a promise.

Same engine for everyone

Developers

Read code, run builds, write tests, refactor across files. Sandbox stops it before it touches anything outside the project.

SRE / DevOps

Run on a production host. Diagnose, tail logs, inspect configs — all read-only by default. Escalate one turn at a time with /sudo.

QA / Testers

Spin up reproducers, run integration tests, file structured reports. Pipe mode plugs into CI.

Data / Analysts

Point it at a CSV, a SQL dump, a notebook directory. Vision-capable models read charts and screenshots — in a single round, the same as any other tool call.

Teams

Bridge Feishu, DingTalk, Slack via outbound WebSocket — no public endpoint. Start at your desk, continue from your phone.

Non-technical users

Double-click galw, chat in a normal window. Themes, font controls, settings panel. Desktop in 9 languages. No terminal required.

Tool builders

OpenAI-compatible HTTP API (gal serve) embeds GAL into your own product. Hooks for access control, built-in audit logging.

Parallel sub-agents

Spawn isolated sub-agents for heavy exploration or independent tasks — each with its own clean context and optional local model selection, returning only the result. Fan out work in parallel; your main session stays lean.

Scripting & CI

One-shot and pipe modes drop GAL into any external loop. echo "fix the bug" | gal chat -m - or gal chat -m "run tests" — perfect for automation, CI pipelines, and shell scripts.

Built from real use, not a roadmap

The last few releases came out of running GAL on production hosts and on its own source tree. Here is what landed.

⏸

Pause and resume schedules

Pause a timer from Desktop or with /timer pause, then resume it later. Paused tasks stay paused across restarts; recurring cron tasks resume at their next scheduled time.

Portable sessions

Archive sessions you are done with, give one a custom id, and export or import whole sessions as a zip. Imports skip ids that already exist, so moving work between machines never duplicates or overwrites it.

Answers in your language

GAL always answers in the language you asked in, and every server-emitted message is localized across all 9 supported locales.

In-place admin mode

Toggle admin mode without losing the conversation, and a prominent banner always shows when you are in it, so you can step back out in one click.

Session secret vault

Register a secret for a session and reference it by name. Values are held encrypted in memory, expanded only at tool-call time, and redacted from results, errors and logs — so an API key never lands in your transcript.

Remote sub-agents

Delegate to a sub-agent running on another host, addressed as endpoint@node. Heavy or untrusted work runs where it belongs, while your main session keeps a clean context and only receives the result.

Reasoning control

Set thinking depth per session with /reasoning — seven levels: auto, off, min, low, medium, high and max. Resolution walks session, model, agent and global config, so one command can trade latency for depth.

Session capabilities

Use /caps or the Desktop capability panel to add or remove tools, skills and MCP servers for the current session. Overrides survive resume without rewriting the underlying agent.

Hardened web access

Reach the same engine from a browser. Each browser is bound to a device signature, enrolment is explicit, refresh tokens rotate with reuse detection, and per-username backoff blunts credential stuffing.

Focus: a resident stance

A focus is a resident stance an agent adopts — a trigger plus a block of method text defined right inside the agent's YAML. At most one is active, switching never changes capability, and the model picks the right one as the task changes. Pause any entry without deleting it.

Skill setup guides

A skill can ship a SETUP.md or INSTALL.md describing its dependencies. GAL detects them and surfaces the steps in the CLI, in the install toast and skill card, and in the Details viewer — so setup is never guesswork.

Unified management

Manual Settings directly manages providers, agents, skills, MCP servers and application settings. Agents can be disabled without deleting their edits, and the provider preset catalog keeps setup guided rather than YAML-first.

Rich media in replies

An answer can show images, video, audio and PDFs — the agent just writes a file reference into its reply and the output area turns it into a real element. Several images become a gallery, and clicking one opens a full-size lightbox with an Open the file button.

Scheduled tasks, rebuilt on cron itself

One-shot, cron and interval timers live in a redesigned panel. Every cron field is a row you open to edit, a field's values and its intervals compose into one comma-joined list — 0,30,9-17/2 from both halves — and the minute grid's sixty chips take a drag for a run, a Shift-click for a span and one click to clear.

A workspace that splits

Open up to three sessions side by side in the Desktop, drag tabs to reorder them, and maximise one pane to fill the row with a click or Esc. Your open tabs come back exactly on restart — each pane on the session it was showing, with its own scroll.

A config that survives a bad edit

A config writer reparses the file on disk before it rewrites anything, so a hand-edit that broke the structure is refused — the file and its .bak are left exactly as you wrote them, and the error names the file.

Session constraints

Set one standing instruction for a conversation with /profile. It is injected into the system prompt as a resident section — so it never has to be triggered — and it survives agent switches, history clears, archiving and restart.

A command panel that edits like a shell

Press Tab mid-turn to inject a message into the running loop or queue it for the next one. The input is a real editor now — move the cursor by arrow, by word or by display row, and edit with the usual shell shortcuts — and it wraps by terminal cell, so long or non-ASCII guidance stays on screen without a manual newline.

A tray icon that comes back

On Windows the Desktop re-registers its tray icon whenever Explorer restarts, so the app stays reachable. If the icon cannot be restored, the close button quits cleanly instead of hiding the window behind an icon that answers no click.

A timer that fires off the clock

A recurring timer can carry a random offset — 5m, ±5m, +30s, -10m — so an unattended task fires somewhere inside a window instead of on a recognisable clock time. The CLI's --jit, the gal tool and the panel all share one grammar.

Dialogs that are truly modal

The Constraints editor and the Scheduled Tasks panel dim the whole window, not just their own pane — so a stray click on the tab bar can no longer hide a draft without applying or discarding it. Each gains a corner × that runs the same dismissal, so two doors never disagree.

A browser the agent can lose and recover

The browser tool now survives its own browser: a wedged instance is detectable and restartable instead of taking the tool down with it, and every call is bounded so one that never returns costs a single action. Switch its window between visible and hidden without relaunching — the page, its scroll position and its login survive the switch — and serve a local directory to drive a local html/h5 page.

A task that keeps its run history

The Scheduled Tasks panel's toolbar opens a Run History: the last 30 firings with their status, time, duration, agent and the reason a run stopped. That is the answer to "this task never seems to fire" — and a tall task or cron editor now scrolls instead of pushing its buttons off screen.

A picture that costs one round

A vision round is now an ordinary round: it runs with the agent's own tools, and its answer — text and tool calls together — is one message the primary model reads on the next round. A screenshot understood in one round no longer runs a second just to say so, and images unload when the round ends.

A repository that predates the sandbox

Older sandbox versions could leave integrity labels on a working tree, preventing writes such as git commit creating .git/index.lock. Current Windows safe mode uses a WRITE_RESTRICTED token and directory permissions instead: it does not lower integrity levels or relabel files, and removes labels left by older versions at startup.

Permissions panel, rebuilt around the answer

The Windows permissions panel is now one action row — Check, Fix and the summary share a baseline, Fix stays disabled until a scan finds something pending, and the report picks the primary action. The per-command cards fold behind a Details (n) disclosure instead of filling the panel, and it is renamed Safe Mode Permissions to match the setting it fixes.

The exit code is the only verdict

A command that succeeded but wrote to stderr is no longer reported as a failure — the exit code decides, and the stderr is noted alongside. A compression marker names what it archived instead of showing a bare count, and a sandbox timeout now returns what the process printed before it was killed.

Type /sudo where you already type it

The composer now understands the one-turn bypass instead of treating it as chat: a bare /sudo and Enter arms the lock and sends nothing, /sudo <msg> sends the message with the bypass on, and a half-typed /su completes to /sudo rather than going out as a message. The hint row takes Tab, dismisses on Escape, and clicking it completes without ever running anything.

A sandbox that can reach your proxy

A Windows system proxy is a per-user registry value that WinINET reads but pip, npm, git, curl and Go do not. Safe mode passes its proxy settings to sandboxed commands, including local loopback proxies; the current restricted-token sandbox does not restrict network access or require a loopback exemption.

A plugin's promises, actually kept

sandbox: true was a lie whenever the session had not run bash yet — the sandbox instance was created only inside the bash tool, so a plugin invoked first ran on the host with safe mode still enabled. It now fails closed instead, and stdin: json produces a payload a JSON parser accepts, enum is enforced rather than merely advertised, and hooks: is wired instead of parsed and ignored.

A steadier Windows Desktop

Tray notifications now run on the owning window thread, preventing long-running reminders from crashing Desktop. Startup diagnostics cannot stop the window from opening, and crash or hang evidence is saved for the next launch.

Smaller surprises in daily work

Failed edits explain the closest match; file listings can include hashes; debug logs rotate and expire; context compression records its costs.

A sandbox that matches the kernel

The Windows sandbox now starts every child with a write-restricted token, and AppContainer is gone. A write is allowed exactly where a Modify ACE names this session's SID, reads are not restricted at all, and a leftover Low integrity label is removed rather than raised back. Every description of the sandbox now matches what the kernel actually enforces.

See the full changelog →

Built with itself

GAL is developed using GAL. The author runs it on its own source tree daily — which is the most direct way to find out whether the tooling is actually good enough.

Sandbox

The kernel-level sandbox code — all three platform backends — was written and debugged in GAL sessions, with the sandbox enabled throughout.

Desktop & IM

The webview frontend, the IM channel adapters and the HTTP API were developed through the same chat interface you get.

Docs & Tests

This website, the README and large parts of the test suites were produced and revised the same way — with a human reviewing every change.

If it were not good enough for that, it would not be good enough for your machines either.