██╗ ██╗ ██████╗ ███████╗███╗ ███╗ ██████╗ ██╗ ██╗██████╗ █████╗ ████████╗ ██████╗ ██████╗ ██║ ██╔╝██╔═══██╗██╔════╝████╗ ████║██╔═══██╗██║ ██╔╝██╔══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗ █████╔╝ ██║ ██║███████╗██╔████╔██║██║ ██║█████╔╝ ██████╔╝███████║ ██║ ██║ ██║██████╔╝ ██╔═██╗ ██║ ██║╚════██║██║╚██╔╝██║██║ ██║██╔═██╗ ██╔══██╗██╔══██║ ██║ ██║ ██║██╔══██╗ ██║ ██╗╚██████╔╝███████║██║ ╚═╝ ██║╚██████╔╝██║ ██╗██║ ██║██║ ██║ ██║ ╚██████╔╝██║ ██║ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
Terminal AI coding agent for real repositories
Local coding agents, MCP gateways, and swarms from one terminal.
Written in PHP 8.4, KosmoKrator gives you a shell-first agent with TUI and ANSI renderers, permissions, persistent sessions, context management, Lua code mode, integrations, MCP, ACP, a PHP SDK, and parallel subagents.
Written in PHP 8.4
kosmo
> fix the failing tests and explain the change
● reading failing test output
● editing src/Auth/TokenVerifier.php
● running vendor/bin/phpunit --filter TokenVerifierTest
Done. 2 files changed, tests passing.kosmo -p "review this branch" \
--mode plan \
--permission-mode guardian \
-o stream-json
kosmo integrations:plane list_issues \
--account work \
--jsonuse Kosmokrator\Sdk\AgentBuilder;
$result = AgentBuilder::create()
->forProject('/repo')
->withMode('edit')
->withPermissionMode('guardian')
->build()
->collect('Implement the missing tests');kosmo acp --cwd /repo
// newline-delimited JSON-RPC over stdio
// session/prompt
// session/request_permission
// kosmo/subagents/tree
// kosmo/tool/result Install
Choose the runtime package that matches the machine.
Static binary
No PHP dependency. Recommended for normal terminal use on macOS and Linux.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash Runtime surfaces
One agent core, several ways to operate it.
Headless CLI Use `kosmo -p`, JSON output, stream-json, and direct integrations/MCP commands from automation. ACP server Expose terminal-equivalent sessions, permissions, tools, subagents, integrations, MCP, and Lua over stdio. PHP SDK Embed headless runs and direct runtime helpers in PHP applications without creating another engine. Lua code mode Compose file tools, integrations, MCP calls, and helper functions in discoverable scripts. Integration catalog Browse generated CLI, Lua, and MCP gateway docs for every OpenCompany integration. Local MCP gateway Expose selected local integrations to Claude Code, Cursor, Codex, and other MCP clients. Integration CLI pages Rankable pages like ClickUp CLI, GitHub CLI, and Slack CLI for AI agents.