One agent core, several integration points
The terminal UI is only one way to use KosmoKrator. The same session builder, tools, permissions, subagents, integrations, MCP runtime, Lua runtime, and context system are available to automation and external applications.
Terminal Agent
Interactive TUI with ANSI fallback, slash commands, approvals, model switching, sessions, memories, and live subagent monitoring.
/docs/getting-startedHeadless CLI
Use `kosmokrator -p`, JSON output, stream-json events, settings commands, provider credentials, and agent-friendly helper commands in scripts.
/docs/headlessIntegrations, MCP, and Lua
Call OpenCompany integrations and MCP tools directly from CLI or Lua while preserving read/write permissions and credential handling.
/docs/integrationsSDK and ACP
Embed the headless runtime in PHP applications, or wrap KosmoKrator from non-PHP apps through ACP plus KosmoKrator extension events.
/docs/sdkInstall the way your environment expects
Use a zero-dependency binary, a small PHAR, a source checkout, or Termux on Android. Every path lands on the same CLI and headless runtime.
Static binary
Self-contained release binary. No local PHP, Composer, Node, or Python runtime required.
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
kosmokrator setup
kosmokrator PHAR
Single PHP archive for machines that already have PHP 8.4+ installed.
sudo curl -fSL https://github.com/OpenCompanyApp/kosmokrator/releases/latest/download/kosmokrator.phar \
-o /usr/local/bin/kosmokrator
sudo chmod +x /usr/local/bin/kosmokrator
kosmokrator setup Source checkout
Best when contributing, testing branches, or building a custom PHAR.
git clone https://github.com/OpenCompanyApp/kosmokrator.git
cd kosmokrator
composer install
bin/kosmokrator setup Termux
Run KosmoKrator on Android with Termux. Use ANSI renderer for the most predictable mobile terminal UX.
pkg update
pkg install php composer git curl
curl -fSL https://github.com/OpenCompanyApp/kosmokrator/releases/latest/download/kosmokrator.phar \
-o $PREFIX/bin/kosmokrator
chmod +x $PREFIX/bin/kosmokrator Headless provider setup
kosmokrator providers:configure openai \
--api-key-env OPENAI_API_KEY \
--model gpt-5.4-mini \
--global --json
kosmokrator -p "Summarize this repo" \
--mode ask \
-o json Full installation docs
Manual platform binaries, PHP extension requirements, update paths, PHAR builds, and troubleshooting live in the installation guides.
kosmokrator --version
kosmokrator setup
kosmokrator Installation Docs Termux Docs Permissions are explicit in both UI and headless mode
Guardian, Argus, and Prometheus govern native tools. Integration and MCP read/write policies apply in headless runs too, with force flags reserved for trusted automation.
Built around a reusable headless session
`AgentSessionBuilder` wires the LLM client, tools, permissions, context manager, renderer, subagents, integrations, MCP, and Lua. Terminal, CLI, SDK, and ACP entry points all run through that same shape.