Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

About

[READ-ONLY] External agent control layer

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages