Atlas is a Laravel package for building AI-powered applications with structure and scale. Define agents once, use them everywhere—with tools, dynamic prompts, and middleware that keeps your AI logic clean and testable.
Built on Prism PHP, Atlas adds the application layer: agent registries, tool management, prompt templating, and execution pipelines. Prism handles the LLM communication; Atlas handles your business logic.
- Reusable Agents — Define AI configurations once, resolve by key or class anywhere in your app
- Typed Tools — Connect agents to your services with validated parameters and structured results
- Dynamic Prompts — Interpolate
{variables}at runtime for personalized, context-aware interactions - Pipelines — Add logging, auth, rate limiting, or metrics without touching agent code
- Full Prism Access — Use embeddings, images, speech, moderation, and all Prism features directly
composer require atlas-php/atlas
php artisan vendor:publish --tag=atlas-configuse Atlasphp\Atlas\Agents\AgentDefinition;
class SupportAgent extends AgentDefinition
{
public function provider(): ?string
{
return 'anthropic';
}
public function model(): ?string
{
return 'claude-sonnet-4-20250514';
}
public function systemPrompt(): ?string
{
return 'You are a support agent for {company}. Help {user_name} with their questions.';
}
public function tools(): array
{
return [LookupOrderTool::class, RefundTool::class];
}
}$response = Atlas::agent(SupportAgent::class)
->withVariables(['company' => 'Acme', 'user_name' => 'Sarah'])
->chat('Where is my order #12345?');
echo $response->text;| You want to... | Atlas provides... |
|---|---|
| Reuse AI configurations across your app | Agent registry with key/class/instance resolution |
| Give agents access to your services | Typed tools with parameter validation |
| Personalize prompts per user/request | Variable interpolation in system prompts |
| Add observability without coupling | Pipeline middleware for logging, metrics, auth |
| Use embeddings, images, or speech | Direct passthrough to all Prism capabilities |
📚 atlasphp.org — Full guides, API reference, and examples.
- Getting Started — Installation and configuration
- Agents — Define reusable AI configurations
- Tools — Connect agents to your application
- Pipelines — Extend with middleware
We welcome contributions! Please see our Contributing Guide for details.
Atlas is open-sourced software licensed under the MIT license.