php artisan boost:add-skill symfony/ai-chat
Save this content to: AGENTS.md
# AGENTS.md
AI agent guidance for the Chat component.
## Component Overview
Library for building chats with agents using messages. Built on Platform and Agent components.
## Architecture
### Core Classes
- **Chat** (`src/Chat.php`): Main orchestration class
- **ChatInterface**: Contract for implementations
- **MessageStoreInterface** High-level conversation storage interface
- **ManagedStoreInterface** High-level store management interface
### Key Features
- **Bridge** (`src/Bridge/`): Storage capacity for messages and conversations
## Essential Commands
### Testing
```bash
vendor/bin/phpunit
vendor/bin/phpunit tests/ChatTest.php
vendor/bin/phpunit --coverage-html coverage/
```
### Code Quality
```bash
vendor/bin/phpstan analyse
cd ../../.. && vendor/bin/php-cs-fixer fix src/chat/
```
## Processing Architecture
### Built-in message stores
- **InMemory** (`src/InMemory/Store.php`): in-memory storage, not a bridge
- **Cache bridge** (`src/Bridge/Cache/MessageStore.php`): PSR-6 cache-backed storage
- **Session bridge** (`src/Bridge/Session/MessageStore.php`): Symfony HttpFoundation session storage
- Additional bridges under `src/Bridge/`: Cloudflare, Doctrine, Meilisearch, MongoDb, Pogocache, Redis, SurrealDb
## Dependencies
- **Platform component**: Required for AI communication
- **Agent component**: Required for agent interaction
- **Symfony**: HttpFoundation
## Testing Patterns
- Use `MockHttpClient` over response mocking
- Test bridges independently
- Prefer `$this->assert*` over `self::assert*` in tests
## Development Notes
- Component is experimental (BC breaks possible)
- Add `@author` tags to new classes
- Use component-specific exceptions from `src/Exception/`
- Follow `@Symfony` PHP CS Fixer rules
AI agent guidance for the Chat component.
Library for building chats with agents using messages. Built on Platform and Agent components.
src/Chat.php): Main orchestration classsrc/Bridge/): Storage capacity for messages and conversationsvendor/bin/phpunit
vendor/bin/phpunit tests/ChatTest.php
vendor/bin/phpunit --coverage-html coverage/
vendor/bin/phpstan analyse
cd ../../.. && vendor/bin/php-cs-fixer fix src/chat/
src/InMemory/Store.php): in-memory storage, not a bridgesrc/Bridge/Cache/MessageStore.php): PSR-6 cache-backed storagesrc/Bridge/Session/MessageStore.php): Symfony HttpFoundation session storagesrc/Bridge/: Cloudflare, Doctrine, Meilisearch, MongoDb, Pogocache, Redis, SurrealDbMockHttpClient over response mocking$this->assert* over self::assert* in tests@author tags to new classessrc/Exception/@Symfony PHP CS Fixer rulesHow can I help you explore Laravel packages today?