armin / ai-agent
Generic AI code assistant client for PHP.
dev-master
2026-04-26 10:10 UTC
Requires
- php: ^8.4
- symfony/ai-agent: >=0.8
- symfony/ai-anthropic-platform: >=0.8
- symfony/ai-azure-platform: >=0.8
- symfony/ai-bundle: >=0.8
- symfony/ai-chat: >=0.8
- symfony/ai-gemini-platform: >=0.8
- symfony/ai-ollama-platform: >=0.8
- symfony/ai-open-ai-platform: >=0.8
- symfony/ai-platform: >=0.8
- symfony/console: ^8.0
- symfony/finder: ^7.0
- symfony/http-client: ^7.0
- symfony/process: ^7.0
Requires (Dev)
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2026-04-26 10:44:44 UTC
README
armin/ai-agent is a generic AI code assistant client for PHP. It ships with built-in tools for reading files, finding files, writing files, viewing images, generating images, and running local commands, while keeping the tool system open for consuming applications to register additional actions at runtime.
Requirements
- PHP
^8.4 - Composer
Installation
composer require armin/ai-agent
Quick Configuration
The package reads the API key from AI_AGENT_API_KEY by default. The CLI reads its default model from AI_AGENT_DEFAULT_MODEL. Models must be configured as provider:model, for example openai:gpt-5.
The environment variable names are exposed as constants on Armin\AiAgent\AiAgentConfig:
AiAgentConfig::API_KEY_ENV_VARAiAgentConfig::MODEL_ENV_VAR
export AI_AGENT_API_KEY=your-key export AI_AGENT_DEFAULT_MODEL=openai:gpt-5
Documentation
Supported Providers
openaianthropicgemini
Notes
- Authentication is intentionally out of scope for this package.
- Requests are executed through Symfony AI provider bridges.
- The CLI mode is non-interactive. Use a session file if you want multi-turn history between invocations.