Search by

switon / agency

switon

Agent sessions, run loop, and prompt rendering for Switon Framework

v1.0.0 2026-08-23 00:56 UTC

This package is auto-updated.

Last update: 2026-11-25 01:05:59 UTC


README

Agency CI PHP 8.3+

Switon's agent runtime for sessions, a run loop, and plain-text prompt rendering.

Highlights

  • Sessions: Agent owns a thread, a profile, and a workspace. A root session is created with make, not taken from a container singleton.
  • Run loop: Loop drives one delivery until it settles or maxSteps is reached. Instructor::instruct() is a one-shot turn with no inbox.
  • Profiles: Markdown under @agency/agents becomes a Profile. Charters merges that profile with its segments.
  • Prompt rendering: PromptRenderer interprets {{ }}, {% if %}, {% for %}, and {% table %} over plain arrays.
  • Console: agent:chat, agent:run, agent:prompt, and agent:instruct.

Installation

composer require switon/agency

Quick Start

One reply from the shipped assist profile:

bash bin/console agent:run --agent=assist --message="Hello"

Docs: https://github.com/switon-php/agency/blob/main/docs/README.md

License

MIT.