The portable coding agent
psi is a portable AI coding agent that runs as a small 6.4 MB binary written in ANSI C and Lua, working on Linux, macOS, Windows, Haiku, and more. It supports multiple model providers (Anthropic, OpenAI Codex, OpenRouter, and local models via Ollama), keeps sessions as append-only JSONL with branchable conversation trees, and offers a TUI, REPL, one-shot prompts, and Lua scripting. Designed for developers who want an auditable, customizable terminal-first agent with an MIT-licensed, inspectable codebase.
Ships as a 6.4 MB single binary written in ANSI C and Lua that runs from the terminal on Linux, macOS, Windows, FreeBSD, OpenBSD, Haiku, and more.
MIT-licensed with the agent loop, terminal interface, tools, and providers all open to inspection; publishes software bills of materials mapping its runtime and build dependencies.
High-level behavior lives in Lua rather than the C core: write Lua extensions, hot-reload them, add new commands, and even change the running agent's theme live.
Works with Anthropic, OpenAI Codex, OpenRouter, or local models via Ollama, and you can resume a session with a different provider.
Sessions are append-only JSONL with a full conversation tree, so you can branch a conversation, explore another approach, and return.
An interactive TUI, a simple REPL, one-shot prompts, and Lua evaluation, suitable for both interactive use and scripting.
psi is a portable coding agent that ships as a 6.4 MB binary written in ANSI C and Lua. It runs from the terminal and can edit code, find and fix bugs, and verify results with different LLM providers.
psi runs on Linux, macOS, Windows, FreeBSD, OpenBSD, Haiku, and beyond.
Yes. psi is MIT licensed and the agent loop, terminal interface, tools, and providers are all open to inspection. The site also publishes software bills of materials for its runtime and build dependencies.
psi supports Anthropic, OpenAI Codex, OpenRouter, and local models via Ollama. You can also resume a session with a different provider.
Yes. psi puts high-level behavior in Lua on top of a small C core, so you can write Lua extensions, hot-reload them, add new commands, and even change the running agent's theme live.
Sessions are append-only JSONL files with a full conversation tree, letting you branch a conversation, explore another approach, and return.
psi offers an interactive TUI, a simple REPL, one-shot prompts, and Lua evaluation, so you can use it interactively at the keyboard or from scripts.