survos/ai-chat-bundle
Composer 安装命令:
composer require survos/ai-chat-bundle
包简介
Expose Symfony AI agents over an OpenAI-compatible /v1/chat/completions endpoint so chat platforms (e.g. Mattermost Agents) can @-mention them. The bundle owns transport/auth/routing; each app supplies a thin ChatAgentResolver. Ships an mm:post demo command over the Symfony Mattermost notifier. MCP
README 文档
README
Expose a Survos app's Symfony AI agents to chat platforms over an
OpenAI-compatible endpoint, so a chat client (first: Mattermost via its Agents
plugin) can @-mention them — no bot client, no chat UI to build. See PLAN.md.
@Curator … → Mattermost Agents plugin → POST {app}/v1/chat/completions → resolve persona → run agent → reply
The bundle owns the communications (OpenAI transport, auth, persona routing);
each app supplies one thin ChatAgentResolverInterface. Comms first — this release
ships the Mattermost wiring and an mm:post proof; the completions endpoint + agent
wiring come next.
Install
composer require survos/ai-chat-bundle
Extends Survos\Kit\AbstractSurvosBundle; the mm:post command auto-registers.
Demo — prove the chat plumbing (mm:post)
The demo lives in demo/ — a tiny console app that posts to a Mattermost
instance through the Symfony Mattermost notifier.
- Have a Mattermost over https. The notifier hardcodes
https://, so it can't reach a plain-http local docker. Use the deployed server:https://chat.survos.com(thesurvos-sites/mattermostrepo on Dokku). - In Mattermost: create a bot (or personal access token) and grab the target channel id (the 26-char id in the channel URL, or via the API).
- Configure the demo:
cd demo cp .env.example .env.local # set MATTERMOST_DSN=mattermost://<TOKEN>@chat.survos.com?channel=<CHANNEL_ID> composer install
- Post:
bin/console mm:post "Hello, Mattermost!" bin/console mm:post "Hi there" <channel_id> # override the default channel
A cooler demo (later): a TUI that posts and listens, instead of a one-shot post.
Roadmap
- v1 (next):
POST /v1/chat/completionscontroller +ChatAgentResolverInterface(non-streaming;symfony/ai^0.10). - v2: MCP tools — watch
symfony/ai#2237(#[AsMcpApp]/#[AsMcpAppTool]); relates tosurvos/mcp-bundle.
See PLAN.md for the full design and decisions.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-26