anwar/agent-orchestrator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

anwar/agent-orchestrator

Composer 安装命令:

composer require anwar/agent-orchestrator

包简介

Core Brain to receive webhooks from n8n and orchestrate OpenAI Tool calling.

README 文档

README

Latest Version on Packagist Total Downloads

A powerful AI-driven core for Laravel applications that orchestrates OpenAI tool calling, local vector embeddings via Ollama, and semantic search via Qdrant. Specifically designed to handle complex "Neighbor Chef" personas with HTML-rich responses and direct cart integration.

🎨 Features

  • 🚀 Hybrid Semantic Search: Integrated with Qdrant for high-performance vector search.
  • 🧠 Local Embeddings: Support for local Ollama (nomic-embed-text) to save costs and ensure privacy.
  • 🛠️ OpenAI Tool Calling: Seamlessly handle tool calls for order tracking, recipe consultation, and cart management.
  • 🍱 Branded HTML Responses: Enforces strict HTML formatting (no Markdown) for premium UI rendering.
  • 🛒 Cart Integration: Automatic generation of [Add to Cart] links and batch ingredient buttons.
  • 🔌 Webhook Ready: Built-in endpoint for n8n or other automation platform orchestration.

📦 Installation

You can install the package via composer:

composer require anwar/agent-orchestrator

The service provider will automatically register itself.

Publish Configuration

php artisan vendor:publish --tag="agent-config"

⚙️ Configuration

Add the following variables to your .env file:

# AI Agent Settings
AGENT_WEBHOOK_SECRET=your_secure_secret
AGENT_OPENAI_MODEL=gpt-4o-mini
OPENAI_REQUEST_TIMEOUT=120

# Vector Database (Qdrant)
QDRANT_HOST=http://localhost:6333

# Embedding Source (ollama or openai)
AGENT_EMBEDDING_SOURCE=ollama
OLLAMA_HOST=http://localhost:11435
OLLAMA_EMBEDDING_MODEL=nomic-embed-text

# OpenAI (if source is openai)
OPENAI_API_KEY=your_openai_key

🚀 Usage

1. Synchronize Data to Qdrant

To populate the vector database with your products and recipes:

# Sync Recipes
php artisan agent:sync-chef-brain

# Sync Active Products
php artisan agent:sync-products

2. Using the Service

You can resolve and use the AiAgentService anywhere in your application:

use Anwar\AgentOrchestrator\Services\AiAgentService;

$agent = app(AiAgentService::class);
$response = $agent->processMessage($customerPhone, "I want to cook Chicken Biryani");

// $response will contain HTML-formatted content with images and cart links.

3. Webhook Integration

The package provides a standard webhook endpoint: Endpoint: POST /api/v1/agent/webhook

Payload Example:

{
    "phone": "08012345678",
    "message": "Find me some Miso paste"
}

👨‍🍳 Persona: Gunma Neighbor Chef

The agent is pre-configured to behave as a Friendly, Bengali-Japanese neighbor.

  • Tone: Uses phrases like "Itadakimasu Bhai", "Ja-matod", and "Salam!".
  • Formatting: Strictly uses <b>, <ul>, <li>, and <br>.
  • E-commerce: Integrates product images and cart buttons directly into the chat flow.

🏗️ Dependencies

🔗 Repository

https://github.com/ringkubd/agent-orchestrator

📄 License

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

Developed with ❤️ for Gunma Halal Food.

anwar/agent-orchestrator 适用场景与选型建议

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

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

围绕 anwar/agent-orchestrator 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-13