Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Agents
symfony/ai-agent
claude-code
cursor
Agent
ai
llm
Install
php artisan boost:add-skill symfony/ai-agent

Save this content to: AGENTS.md

---
package: symfony/ai-agent
source_path: AGENTS.md
repo: https://github.com/symfony/ai-agent
---

# AGENTS.md

AI agent guidance for the Agent component.

## Component Overview

Framework for building AI agents with user interaction and task execution. Built on Platform component with optional Store integration for memory.

## Architecture

### Core Classes
- **Agent** (`src/Agent.php`): Main orchestration class
- **AgentInterface**: Contract for implementations
- **Input/Output** (`src/Input.php`, `src/Output.php`): Pipeline data containers

### Processing Pipeline
- **InputProcessorInterface**: Input transformation contract
- **OutputProcessorInterface**: Output transformation contract
- Middleware-like processing chain

### Key Features
- **Memory** (`src/Memory/`): Conversation memory with embeddings
- **Toolbox** (`src/Toolbox/`): Function calling capabilities
- **MultiAgent** (`src/MultiAgent/`): Orchestration across multiple specialized agents
- **Bridge** (`src/Bridge/`): Third-party tool integrations (Brave, Tavily, Wikipedia, etc.)

## Essential Commands

### Testing
```bash
vendor/bin/phpunit
vendor/bin/phpunit tests/AgentTest.php
vendor/bin/phpunit --coverage-html coverage/
```

### Code Quality
```bash
vendor/bin/phpstan analyse
cd ../../.. && vendor/bin/php-cs-fixer fix src/agent/
```

## Processing Architecture

### Pipeline Flow
1. Input processors modify requests
2. Platform processes request
3. Output processors modify responses

### Built-in Processors
- **SystemPromptInputProcessor**: Adds system prompts
- **ModelOverrideInputProcessor**: Runtime model switching
- **MemoryInputProcessor**: Conversation context from memory

### Memory Providers
- **StaticMemoryProvider**: In-memory storage
- **EmbeddingProvider**: Vector-based semantic memory (requires Store)

### Tool Integration
- Auto-discovery via attributes
- Fault-tolerant execution
- Event system for lifecycle management

## Dependencies

- **Platform component**: Required for AI communication
- **Store component**: Optional for embedding memory
- **Symfony**: HttpClient, Serializer, PropertyAccess, Clock

## Testing Patterns

- Use `MockHttpClient` over response mocking
- Test processors independently
- Use `/fixtures` for multimodal content
- 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

package: symfony/ai-agent source_path: AGENTS.md repo: https://github.com/symfony/ai-agent

AGENTS.md

AI agent guidance for the Agent component.

Component Overview

Framework for building AI agents with user interaction and task execution. Built on Platform component with optional Store integration for memory.

Architecture

Core Classes

  • Agent (src/Agent.php): Main orchestration class
  • AgentInterface: Contract for implementations
  • Input/Output (src/Input.php, src/Output.php): Pipeline data containers

Processing Pipeline

  • InputProcessorInterface: Input transformation contract
  • OutputProcessorInterface: Output transformation contract
  • Middleware-like processing chain

Key Features

  • Memory (src/Memory/): Conversation memory with embeddings
  • Toolbox (src/Toolbox/): Function calling capabilities
  • MultiAgent (src/MultiAgent/): Orchestration across multiple specialized agents
  • Bridge (src/Bridge/): Third-party tool integrations (Brave, Tavily, Wikipedia, etc.)

Essential Commands

Testing

vendor/bin/phpunit
vendor/bin/phpunit tests/AgentTest.php
vendor/bin/phpunit --coverage-html coverage/

Code Quality

vendor/bin/phpstan analyse
cd ../../.. && vendor/bin/php-cs-fixer fix src/agent/

Processing Architecture

Pipeline Flow

  1. Input processors modify requests
  2. Platform processes request
  3. Output processors modify responses

Built-in Processors

  • SystemPromptInputProcessor: Adds system prompts
  • ModelOverrideInputProcessor: Runtime model switching
  • MemoryInputProcessor: Conversation context from memory

Memory Providers

  • StaticMemoryProvider: In-memory storage
  • EmbeddingProvider: Vector-based semantic memory (requires Store)

Tool Integration

  • Auto-discovery via attributes
  • Fault-tolerant execution
  • Event system for lifecycle management

Dependencies

  • Platform component: Required for AI communication
  • Store component: Optional for embedding memory
  • Symfony: HttpClient, Serializer, PropertyAccess, Clock

Testing Patterns

  • Use MockHttpClient over response mocking
  • Test processors independently
  • Use /fixtures for multimodal content
  • 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
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky