mirror of
https://github.com/symfony/ai.git
synced 2026-03-23 23:42:18 +01:00
2.0 KiB
2.0 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is the examples directory of the Symfony AI monorepo, containing standalone examples demonstrating component usage across different AI platforms. The examples serve as both reference implementations and integration tests.
Development Commands
Setup
# Install dependencies
composer install
# Link local AI components for development
../link
# Start Docker services for store examples
docker compose up -d
Running Examples
Standalone Examples
# Run a specific example
php openai/chat.php
# Run with verbose output to see HTTP and tool calls
php openai/toolcall-stream.php -vvv
Example Runner
# Run all examples in parallel
./runner
# Run examples from specific subdirectories
./runner openai mistral
# Filter examples by name pattern
./runner --filter=toolcall
Environment Configuration
Examples require API keys configured in .env.local. Copy from .env template and add your keys for the platforms you want to test.
Architecture
Directory Structure
- Each subdirectory represents a different AI platform (openai/, anthropic/, gemini/, etc.)
misc/contains cross-platform examplesrag/contains RAG (Retrieval Augmented Generation) examplestoolbox/contains utility tools and integrationsbootstrap.phpprovides common setup and utilities for all examples
Common Patterns
- All examples use the shared
bootstrap.phpfor setup - Examples follow a consistent structure with platform-specific clients
- Verbose output (
-vv,-vvv) shows detailed HTTP requests and responses - Examples demonstrate both synchronous and streaming capabilities
Dependencies
Examples use @dev versions of Symfony AI components:
symfony/ai-platformsymfony/ai-agentsymfony/ai-store
Testing
Examples serve as integration tests. The runner executes them in parallel to verify all components work correctly across different platforms.