A new open-source project called syscall-agent is making waves on Hacker News for its stripped-down approach to AI-assisted coding. Built entirely in pure C, the agent connects to OpenRouter for chat completions while keeping persistent conversation context in a simple MEMORY.md file that appends with locking to prevent race conditions.
Pure C From the Ground Up
The project's philosophy is refreshingly minimal: one generated binary, no runtime dependencies beyond libcurl, and direct syscalls instead of abstractions. On macOS, libcurl ships pre-installed. Debian/Ubuntu users need only run sudo apt-get install build-essential libcurl4-openssl-dev. The source layout in src/ shows tight organization—main.c handles CLI entry and flag parsing, agent.c runs the tool-calling loop, tools_fs.c manages file operations via mmap for large files, and platform-specific shims live in os_compat_*.c.
Tool System Built on OS Primitives
The agent exposes a runtime tool catalog that reads like a sysadmin's wishlist: fork, execvp, mmap, rename, kqueue, inotify, getaddrinfo, non-blocking sockets, and process-table syscalls all make an appearance. File operations use atomic writes via mkstemp + rename to prevent partial overwrites. Range reads leverage mmap for logs and large source files without loading everything into memory. Network tools handle DNS lookups through getaddrinfo and TCP reachability probes with non-blocking sockets—useful for health checks in CI pipelines.
Pi-Style TUI With Streaming
The interactive terminal UI takes cues from Pi Agent, featuring full-width accent borders, muted status lines, and compact panels. In TUI mode, model responses stream via OpenRouter SSE as they arrive. Slash commands include /model for live model picking against GET /api/v1/models, /verbose tools or /verbose reasoning to toggle debug output in real time, and /sysinfo for host diagnostics. Users can switch models mid-session by typing /model provider/model-id or selecting from a filtered list with keyboard navigation.
Security Model With Resource Limits
Every subprocess execution enforces hard limits: 30 seconds of CPU time, 512 MB address space, 256 MB output file size, 256 open files, and 256 KB captured stdout/stderr per stream. The agent never invokes a shell—argv arrays go directly to fork/execvp, so shell metacharacters become ordinary arguments unless the chosen executable is itself a shell. Sandbox profiles range from readonly (read-only filesystem) to network (outbound connectivity allowed) to build (filesystem writes for compilation loops). The none profile requires --allow-unsafe-exec and provides no sandboxing whatsoever.
Memory That Persists Between Sessions
Unlike ephemeral agent sessions, syscall-agent maintains durable context through a Markdown file. It reads SYSTEM_PROMPT.md and MEMORY.md at startup, creating the latter on first use. The save_memory tool appends notes with locking to prevent concurrent write corruption. Paths are configurable via --system and --memory flags, or environment variables SYSTEM_PROMPT_PATH and MEMORY_PATH—useful for project-specific contexts in different working directories.
Termux Integration for Android Developers
The project includes comprehensive Android support through Termux from F-Droid. A suite of termux-* tools handles battery status, Wi-Fi info, clipboard operations, notifications, wake locks, and storage symlinks via termux-setup-storage. These degrade gracefully when run outside the Termux environment or when individual termux-* commands are missing. The docs/termux-install.md file covers the full setup path for developers who want AI assistance running on a phone.
Delegation to Official CLIs
For users invested in Codex CLI OAuth or GitHub Copilot subscriptions, syscall-agent can delegate work through delegate_codex and delegate_copilot tools—both gated behind --allow-exec. These invoke official CLIs via argv-only fork/execvp rather than reading private tokens directly. The agent's auth_status tool reports configured authentication surfaces (OpenRouter, OpenAI API, Codex OAuth, GitHub/Copilot) without exposing secrets.
Key Takeaways
- Pure C implementation produces a single binary with no heavy runtime dependencies beyond libcurl
- Memory persists between sessions via append-locked Markdown files rather than ephemeral context windows
- Direct syscall usage (kqueue, inotify, mmap) means tight OS integration without abstraction layers
- Pi-style TUI enables interactive use while CLI mode supports one-shot commands and piping
- Sandboxed subprocess execution with configurable profiles prevents runaway processes from trashing systems
The Bottom Line
syscall-agent is a breath of fresh air for developers who want AI assistance that stays out of the way. Pure C means no Electron bloat, memory persistence means context survives restarts, and syscall-level tools mean you're not fighting abstraction layers when debugging. If you've been burned by bloated AI IDE extensions, this minimal approach might be exactly what you need.