switon / agency
Agent sessions, run loop, and prompt rendering for Switon Framework
v1.0.0
2026-08-23 00:56 UTC
Requires
- php: >=8.3
- ext-mbstring: *
- ext-swoole: *
- switon/ai: ^1.0
- switon/cli: ^1.0
- switon/composer-extra: ^1.0
- switon/console: ^1.0
- switon/core: ^1.0
- switon/di: ^1.0
- switon/event: ^1.0
- switon/i18n: ^1.0
- switon/llm: ^1.0
- switon/sync: ^1.0
- switon/thread: ^1.0
- switon/tooling: ^1.0
- switon/yaml: ^1.0
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- switon/testing: ^1.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Switon's agent runtime for sessions, a run loop, and plain-text prompt rendering.
Highlights
- Sessions:
Agentowns a thread, a profile, and a workspace. A root session is created withmake, not taken from a container singleton. - Run loop:
Loopdrives one delivery until it settles ormaxStepsis reached.Instructor::instruct()is a one-shot turn with no inbox. - Profiles: Markdown under
@agency/agentsbecomes aProfile.Chartersmerges that profile with its segments. - Prompt rendering:
PromptRendererinterprets{{ }},{% if %},{% for %}, and{% table %}over plain arrays. - Console:
agent:chat,agent:run,agent:prompt, andagent: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.