PHPackages                             cognesy/agent-ctrl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. cognesy/agent-ctrl

ActiveLibrary[CLI &amp; Console](/categories/cli)

cognesy/agent-ctrl
==================

Unified CLI bridge for code agents (Claude Code, OpenAI Codex, OpenCode)

v2.3.1(1mo ago)002MITPHPPHP ^8.3

Since Dec 30Pushed 1mo agoCompare

[ Source](https://github.com/cognesy/instructor-agent-ctrl)[ Packagist](https://packagist.org/packages/cognesy/agent-ctrl)[ Docs](https://instructorphp.com)[ RSS](/packages/cognesy-agent-ctrl/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (18)Used By (2)

AgentCtrl
=========

[](#agentctrl)

Unified CLI bridge for code agents (Claude Code, OpenAI Codex, OpenCode) with one API and a normalized response type.

```
use Cognesy\AgentCtrl\AgentCtrl;
use Cognesy\AgentCtrl\Config\AgentCtrlConfig;

$response = AgentCtrl::codex()
    ->withConfig(new AgentCtrlConfig(
        timeout: 300,
        workingDirectory: getcwd() ?: null,
    ))
    ->execute('Summarize this repository.');

echo $response->text();
```

Execution Identity
------------------

[](#execution-identity)

Each `execute()` or `executeStreaming()` call gets its own internal `executionId()`. That id is the canonical correlation key for `agent-ctrl` events and telemetry.

`sessionId()` is different:

- `executionId()` is per run
- `sessionId()` is provider continuity metadata used for `continueSession()` and `resumeSession()`

That means multiple runs may share one `sessionId()` while still having different `executionId()` values.

```
$response = AgentCtrl::codex()->execute('Create a plan.');

echo (string) $response->executionId(); // one run
echo (string) ($response->sessionId() ?? ''); // provider session, if available
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

17

Last Release

46d ago

Major Versions

v1.22.0 → v2.0.02026-03-13

PHP version history (2 changes)v1.15.0PHP ^8.2

v1.19.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/d11593cece5bb65ba5eea704a91e1dda72362e86f8fe0e99295f291ba7628cac?d=identicon)[ddebowczyk](/maintainers/ddebowczyk)

---

Top Contributors

[![ddebowczyk](https://avatars.githubusercontent.com/u/184133?v=4)](https://github.com/ddebowczyk "ddebowczyk (41 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cognesy-agent-ctrl/health.svg)

```
[![Health](https://phpackages.com/badges/cognesy-agent-ctrl/health.svg)](https://phpackages.com/packages/cognesy-agent-ctrl)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
