About this project
This is a group chat protocol hub implemented according to the "AG-UI Group Chat Extension Protocol Standard v1.0," written using ASP.NET Core Minimal API in C# / .NET 10. It treats "group chat" as a protocol layer for third-party application integration: group and member lifecycles, message fan-out, subscriptions, and real-time downlinks all follow a unified set of event and error code conventions, with AI agents participating as group members.
Protocol Capabilities
- Group Lifecycle: Creation, updates, and disbandment, corresponding to GROUP_CREATED / GROUP_UPDATED / GROUP_DISBANDED.
- Member Management: Joining, removal, voluntary leaving, and changes to roles or profiles (GROUP_MEMBER_*).
- Message Fan-out: User messages are broadcast as TEXT_MESSAGE_START/CONTENT/END triplets, providing three visibility scopes (all, mentioned, private), and supporting recalls, read receipts, and "typing" status.
- Subscription Mechanism: GROUP_SUBSCRIBE / GROUP_UNSUBSCRIBE / GROUP_SUBSCRIBE_ACK / GROUP_STATE_SNAPSHOT.
- Dual Transport: Full-duplex WebSocket (/ws) and single-direction downlink SSE (/sse) with heartbeat keep-alive; SSE supports dynamic subscription/unsubscription via HTTP interfaces.
- Agent Trigger Rules (Protocol §6): Mention triggers, full listening, keyword triggers, and context triggers (where the model decides whether to speak based on context).
- HTTP Uplink APIs: Covers group creation, Customer Knowledge Hub discovery/entry, automatic group name generation, member management, messaging, attachment upload/download, recalls, read receipts, human-machine interaction decisions, snapshots, and member lists. Errors return a unified code + message, with status codes mapped to 403/404/409/400. Write interfaces override identity fields in the request body based on token identity, while read interfaces verify if the caller is a group member.
Agents and Memory
- AguiGroupChat.Agents implements IAgentGateway based on the Microsoft Agent Framework: a mock provider is available out-of-the-box, and OpenAI-compatible endpoints (Ollama / vLLM / Azure OpenAI / DeepSeek) can be configured. Once triggered, text events are streamed back, and function calls fan out via TOOL_CALL_START.
- Human-in-the-Loop (HITL): Tools can be marked as requiring approval via ApprovalRequiredAIFunction. When the model calls such a tool, execution is interrupted, and an AGENT_INTERACTION_REQUEST interaction card is broadcast to the group. Only the triggerer can approve or reject; the session resumes after the decision.
- RAG Semantic Memory: MemoryContextProvider injects retrieval context, with vectors stored in pgvector. Embeddings can use HTTP endpoints or local LLamaSharp models (e.g., bge-m3). The knowledge base supports document chunking and retrieval, with adjustable memory scope, TopK, and similarity thresholds.
- Personified Memory Types: Each digital employee can be configured with five levels of memory presets and tone modes; if not configured, the platform global settings are used for backward compatibility.
- Built-in Toolset: Includes calculator, unit conversion, group memory retrieval, and attachment reading; internet-connected web_search / read_url are disabled by default.
- Image Understanding: Replies containing image attachments are routed to vision models, with images passed as base64 multimodal content.
- Reasoning Mode Bridge: REASONING_MESSAGE_CONTENT from external services travels through an independent channel, allowing the frontend to render collapsible reasoning blocks.
Applications and Extended Features
- User Management: Registration, login, logout, password changes, and profile maintenance, using PBKDF2 password hashing and session tokens. WS/SSE supports token authentication; the login interface includes protection against username enumeration and failed-attempt rate limiting.
- Platform-level RBAC: Four roles (SuperAdmin / Admin / Operator / User) can be bootstrapped via configuration lists or granted online by a SuperAdmin. User grouping and group-based authorization are also available for digital employee and skill visibility whitelists.
- Skill Library: Divided into four types (prompt / shell / http / dotnet). Skills with execution capabilities can only be managed by system administrators. Supports generating skill definitions and trial runs using natural language.
- One-click Organization Orchestration: Input a requirement in one sentence to stream a staffing plan via SSE. After previewing the organizational structure, skills, and assignment relationships, the entire setup is persisted and can synchronously create groups.
- Private Chat and Customer Knowledge Hub: Idempotent creation of private two-person chats for digital employees. In the Customer Knowledge Hub, ordinary users enter as participants with isolated sessions.
- Global Search: Cross-message, semantic memory, and knowledge base retrieval, with results filtered by visibility.
- Enterprise Compliance: Includes link proxy, data export/import, runtime model configuration, audit logs, and account deletion.
Deployment and Project Forms
- Four running modes: Web demo, Protocol Hub only, Windows Desktop (WPF + WebView2), and Cross-platform Desktop (Avalonia). The desktop version supports multiple instances sharing a single backend process.
- Persistence: Optional JSON single-file snapshots or postgres / mysql / sqlite databases. Docker Compose enables one-click startup of postgres(pgvector) + built-in Ollama + Web, with semantic memory enabled by default.
- Extras: Includes third-party integration SDKs (AguiClient + AguiRealtimeClient, supporting net8.0/net10.0), example clients, unit and end-to-end tests, and Playwright browser automation scripts.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.