定制 agenticorchestrator/agenticorchestrator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

agenticorchestrator/agenticorchestrator

Composer 安装命令:

composer require agenticorchestrator/agenticorchestrator

包简介

A Laravel AI Agent framework with multi-tenancy, workflows, RAG pipelines, and evaluation tools

README 文档

README

A Laravel AI Agent framework with first-class multi-tenancy support.

Latest Version on Packagist GitHub Tests Action Status PHPStan License

Key Highlights

  • First-Class Multi-Tenancy — Team isolation, system vs custom agents, per-team cost attribution
  • 10+ LLM Providers — OpenAI, Anthropic, Gemini, Mistral, Ollama, and more via Prism PHP
  • 5 Vector Stores — Pinecone, Qdrant, Weaviate, Chroma, PgVector for semantic memory
  • Full Workflow Engine — Sequential, parallel (in-process or queued across workers), conditional, loop, and human-in-the-loop patterns
  • LLM-as-Judge Evaluation — Built-in evaluation framework with custom assertions and metrics
  • Production Ready — Rate limiting, caching, circuit breakers, and comprehensive event system

Installation

composer require agenticorchestrator/agenticorchestrator

Publish the configuration:

php artisan vendor:publish --provider="AgenticOrchestrator\AgenticOrchestratorServiceProvider"

Run migrations:

php artisan migrate

Quick Start

Create Your First Agent

php artisan agent:make CustomerSupportAgent
<?php

namespace App\Agents;

use AgenticOrchestrator\Agents\Agent;
use AgenticOrchestrator\Tools\Attributes\Tool;

class CustomerSupportAgent extends Agent
{
    protected string $name = 'Customer Support';
    protected string $description = 'Handles customer inquiries';
    protected string $model = 'gpt-4o';

    public function instructions(): string
    {
        return "You are a helpful customer support agent for {$this->team->name}.";
    }

    #[Tool('Look up customer order')]
    public function lookupOrder(string $orderId): array
    {
        return $this->team->orders()
            ->where('id', $orderId)
            ->firstOrFail()
            ->toArray();
    }
}

Use Your Agent

use App\Agents\CustomerSupportAgent;

// Simple usage
$response = CustomerSupportAgent::make()
    ->forTeam($team)
    ->respond('What is the status of order #12345?');

echo $response->content;

// With streaming
$stream = CustomerSupportAgent::make()
    ->forTeam($team)
    ->stream('Tell me about your return policy');

foreach ($stream as $chunk) {
    echo $chunk->content;
}

Multi-Tenancy Support

// System agents (platform-wide, read-only)
class SystemHelpAgent extends Agent
{
    protected bool $isSystem = true;
}

// Custom agents (team-owned)
class TeamSalesAgent extends Agent
{
    protected bool $isSystem = false;
}

// Get available agents for a team
$agents = $team->availableAgents(); // System + team's custom agents

Workflow Orchestration

use AgenticOrchestrator\Workflows\Workflow;
use AgenticOrchestrator\Workflows\Patterns\ParallelPattern;
use AgenticOrchestrator\Workflows\Steps\{AgentStep, ConditionalStep};

class OnboardingWorkflow extends Workflow
{
    public function definition(): array
    {
        return [
            new AgentStep(WelcomeAgent::class, output: 'welcome'),

            ParallelPattern::make([
                new AgentStep(AccountSetupAgent::class, output: 'account'),
                new AgentStep(PreferencesAgent::class, output: 'prefs'),
            ]),

            new ConditionalStep(
                condition: fn ($ctx) => $ctx->get('customer.plan') === 'enterprise',
                then: new AgentStep(EnterpriseSetupAgent::class),
            ),

            new AgentStep(SummaryAgent::class, output: 'summary'),
        ];
    }
}

// Execute
$result = OnboardingWorkflow::make()
    ->forTeam($team)
    ->run(['customer' => $customerData]);

Memory Systems

// Configure memory in your agent
protected array $memory = [
    'driver' => 'vector',
    'vector_store' => 'pinecone',
    'namespace' => 'support',
];

// Use memory
$this->getMemory()->store('customer_123', $preferences);
$data = $this->getMemory()->recall('customer_123');
$results = $this->getMemory()->search('shipping policy', limit: 5);

Features

Core Features

  • Multi-Tenancy: Team isolation, system vs custom agents, per-team cost tracking
  • 10+ LLM Providers: Via Prism PHP (OpenAI, Anthropic, Gemini, Mistral, Ollama, etc.)
  • Tool System: Attribute-based tools with parallel execution
  • Memory: Session, cache, database, vector (5 stores), and RAG drivers
  • Streaming: Real-time token streaming with callbacks

Advanced Features

  • Workflows: Sequential, parallel, conditional, loop, human-in-the-loop patterns
  • Agent Delegation: Agents can delegate tasks to other agents
  • Evaluation: LLM-as-judge with custom assertions and metrics
  • Error Handling: Retry strategies, circuit breakers, fallback providers
  • Usage Tracking: Tokens, cost, latency tracking per team/agent/user

Production Features

  • Rate Limiting: Per-user, per-team, per-agent limits
  • Caching: Response, embedding, and tool result caching
  • Events: Comprehensive event system for all operations
  • Testing: Fakes, mocks, and evaluation framework

Configuration

// config/agent-orchestrator.php
return [
    'default_provider' => 'openai',
    'default_model' => 'gpt-4o',

    'multi_tenancy' => [
        'enabled' => true,
        'team_model' => \App\Models\Team::class,
        'system_agents' => [
            \App\Agents\SystemHelpAgent::class,
        ],
    ],

    'memory' => [
        'default' => 'cache',
        'drivers' => [
            'vector' => [
                'store' => 'pinecone',
                'embedding_provider' => 'openai',
            ],
        ],
    ],

    'rate_limiting' => [
        'per_team' => ['requests' => 1000, 'period' => 60],
    ],
];

Artisan Commands

Command Description
agent:make {name} Create a new agent
agent:make-tool {name} Create a new tool
agent:make-workflow {name} Create a new workflow
agent:list List all agents
agent:run {agent} {message} Run an agent
agent:chat {agent} Interactive chat
agent:evaluate {agent} Run evaluation suite

Testing

use AgenticOrchestrator\Facades\Agent;

// Fake responses
Agent::fake([
    CustomerSupportAgent::class => 'Mocked response',
]);

// Assertions
Agent::assertResponded(CustomerSupportAgent::class);
Agent::assertToolCalled(CustomerSupportAgent::class, 'lookupOrder');

Requirements

  • PHP 8.3+
  • Laravel 11.0, 12.0, or 13.0

Documentation

Full documentation available in the docs folder.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security issues, please email agenticorchestrator@proton.me instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

agenticorchestrator/agenticorchestrator 适用场景与选型建议

agenticorchestrator/agenticorchestrator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 11, 最近一次更新时间为 2026 年 03 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「workflow」 「laravel」 「Agent」 「ai」 「multi-tenancy」 「orchestration」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 agenticorchestrator/agenticorchestrator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 agenticorchestrator/agenticorchestrator 我们能提供哪些服务?
定制开发 / 二次开发

基于 agenticorchestrator/agenticorchestrator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 36
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-15