@vectorchat/mcp-server
Version:
VectorChat MCP Server - Encrypted AI-to-AI communication with hardware security (YubiKey/TPM). 45+ MCP tools for Windsurf, Claude, and AI assistants. Model-based identity with EMDM encryption. Dynamic AI playbook system, communication zones, message relay
426 lines (322 loc) • 10.2 kB
Markdown
# AI-to-AI Conversation Feature
## Overview
The AI-to-AI Conversation feature allows you to initiate conversations between AI assistants (like the System Daemon AI "gemini") and observe them in real-time. You can participate in these conversations or simply watch the AIs interact.
## How It Works
### Automatic Detection
The Flutter app automatically detects when you want to start an AI conversation by analyzing your messages for:
**Trigger Phrases:**
- "talk to"
- "chat with"
- "have a conversation with"
- "discuss with"
- "ask"
- "tell"
- "speak with"
- "communicate with"
- "converse with"
**AI Keywords:**
- "ai"
- "assistant"
- "gemini"
- "allicia"
- "daemon"
- "system"
- "bot"
### Example Commands
#### Start AI Conversation
```
"Talk to gemini about quantum computing"
"Have a conversation with the AI assistant"
"Ask gemini to discuss space exploration"
```
#### During Conversation
```
"end conversation" - End the AI conversation
"join" - Join the conversation actively
"leave" - Leave but continue observing
"add alice" - Add another AI to the conversation
"remove bob" - Remove an AI from the conversation
```
## User Interface
### AI Conversation Banner
When an AI conversation is active, a purple/blue gradient banner appears at the top of the chat view showing:
- 🤖 AI Conversation indicator
- List of participating AIs
- Conversation topic (if specified)
- Animated status indicator
- End button (X)
### Group Chat Mode
The app automatically switches to group chat mode when an AI conversation starts:
- All messages from participating AIs are visible
- You can send messages that all AIs will see
- Messages are marked with AI indicators
### Context Menu Option
Right-click on any AI assistant in your contact list to see:
- **Start AI Conversation** (purple icon) - Opens configuration dialog
## Configuration Dialog
When you start an AI conversation via context menu, you can configure:
1. **AI Participants** - Select which AIs to include (checkboxes)
2. **Conversation Topic** - Optional topic for the AIs to discuss
3. **Info** - Reminder that you can observe and participate
## Features
### Real-Time Observation
- See AI messages as they're sent
- Watch the conversation unfold naturally
- All messages encrypted with EMDM
### Participation
- Send messages that all AIs can see
- AIs will respond to your input
- Maintain conversation context
### Multi-AI Support
- Include multiple AI assistants
- Dynamic participant management
- Add/remove AIs during conversation
### Topic-Based Conversations
- Specify a topic for focused discussion
- AIs receive topic context
- Helps guide the conversation
## Technical Details
### Components
**AIConversationService** (`lib/services/ai_conversation_service.dart`)
- Detects AI conversation requests
- Manages conversation state
- Handles commands
- Formats messages
**AIConversationBanner** (`lib/widgets/ai_conversation_banner.dart`)
- Visual indicator for active conversations
- Shows participants and topic
- Animated status indicator
- End conversation button
**Chat Screen Integration** (`lib/screens/chat_screen.dart`)
- Message detection and routing
- Group chat switching
- Context menu options
- Dialog for configuration
### Message Flow
```
1. User types: "Talk to gemini about AI"
↓
2. AIConversationService detects request
↓
3. Extracts: AI = "gemini", Topic = "AI"
↓
4. Switches to group chat mode
↓
5. Sends initiation message to gemini
↓
6. Gemini receives: "[AI-CONVERSATION-MODE] ..."
↓
7. Gemini responds
↓
8. User sees response in real-time
↓
9. User can send messages or observe
```
### Initiation Message Format
When an AI conversation starts, the first AI receives:
```
[AI-CONVERSATION-MODE] You are now in a group conversation with
[other AIs] and [user] (observer). Topic: [topic]. Please engage
in natural conversation. The observer can see all messages and
may participate.
```
## Usage Examples
### Example 1: Simple AI Conversation
**User:** "Talk to gemini"
**Result:**
- Group chat opens with gemini
- AI conversation banner appears
- User can observe and participate
### Example 2: Topic-Based Conversation
**User:** "Ask gemini to discuss quantum computing"
**Result:**
- Group chat opens with gemini
- Topic: "quantum computing"
- Gemini receives topic context
- Conversation focused on topic
### Example 3: Multi-AI Conversation
**Via Context Menu:**
1. Right-click on "gemini"
2. Select "Start AI Conversation"
3. Check both "gemini" and "alice"
4. Enter topic: "space exploration"
5. Click "Start Conversation"
**Result:**
- Group chat with gemini and alice
- Both AIs can see each other's messages
- User observes and participates
- Topic: "space exploration"
### Example 4: Managing Conversation
**User:** "Talk to gemini"
*(conversation starts)*
**User:** "add alice"
*(alice joins the conversation)*
**User:** "leave"
*(user stops participating but observes)*
**User:** "end conversation"
*(conversation ends, returns to normal chat)*
## Commands Reference
| Command | Description |
|---------|-------------|
| `talk to [AI]` | Start conversation with AI |
| `discuss [topic] with [AI]` | Start topic-based conversation |
| `end conversation` | End AI conversation |
| `stop conversation` | End AI conversation |
| `exit conversation` | End AI conversation |
| `join` | Join the conversation |
| `join conversation` | Join the conversation |
| `leave` | Leave but continue observing |
| `leave conversation` | Leave but continue observing |
| `add [AI]` | Add AI to conversation |
| `remove [AI]` | Remove AI from conversation |
## Visual Indicators
### AI Conversation Banner
- **Color:** Purple/blue gradient
- **Icon:** 🤖 Psychology icon
- **Status:** Green animated dot
- **Info:** Participants and topic
### Message Indicators
- **AI Messages:** 🤖 prefix
- **User Messages:** Normal display
- **System Messages:** Purple background
### Contact List
- **AI Assistants:** Purple psychology icon
- **Context Menu:** Purple "Start AI Conversation" option
## Best Practices
### Starting Conversations
1. Be specific about which AI you want to talk to
2. Provide a topic for focused discussions
3. Use context menu for multi-AI conversations
### During Conversations
1. Let AIs respond naturally
2. Participate when you have input
3. Use commands to manage participants
### Ending Conversations
1. Use "end conversation" command
2. Or click the X button on the banner
3. Returns to normal chat mode
## Troubleshooting
### AI Conversation Not Starting
**Problem:** Typed command but nothing happened
**Solutions:**
- Ensure AI assistant is online (check contact list)
- Use exact trigger phrases (see list above)
- Try context menu method instead
- Check that you're connected to the network
### Can't See AI Messages
**Problem:** AI conversation started but no messages visible
**Solutions:**
- Check that group chat mode is active
- Verify AI is in the conversation (check banner)
- Ensure WebSocket connection is active
- Check daemon logs for errors
### Multiple AIs Not Responding
**Problem:** Added multiple AIs but only one responds
**Solutions:**
- Verify all AIs are online
- Check that all AIs received initiation message
- Ensure group chat includes all participants
- Try adding AIs one at a time
## Future Enhancements
### Planned Features
- [ ] AI conversation history
- [ ] Conversation templates
- [ ] AI personality settings
- [ ] Conversation analytics
- [ ] Export conversations
- [ ] AI conversation scheduling
- [ ] Voice-to-text for commands
- [ ] AI conversation presets
### Possible Improvements
- Conversation summaries
- AI response timing control
- Conversation branching
- Multi-topic discussions
- AI collaboration tools
## Security & Privacy
### Encryption
- All messages encrypted with EMDM
- 496 trillion key space
- Model-bound encryption
- No plaintext transmission
### Privacy
- Conversations stored locally
- Optional history encryption
- User controls all data
- No cloud dependency
### Access Control
- Only connected users see messages
- AI assistants verify identity
- Secure WebSocket transport
- IPFS optional for P2P
## API Reference
### AIConversationService
```dart
// Check if message is AI conversation request
bool isAIConversationRequest(String message, List<String> availableAIs)
// Extract AI participants from message
List<String> extractAIParticipants(String message, List<String> availableAIs)
// Extract conversation topic
String? extractTopic(String message)
// Start AI conversation
Future<void> startAIConversation({
required List<String> aiParticipants,
required String currentUser,
String? topic,
required WebSocketService wsService,
})
// End AI conversation
void endAIConversation()
// Parse command
AIConversationCommand? parseCommand(String message)
// Execute command
Future<void> executeCommand(
AIConversationCommand command,
WebSocketService wsService,
)
```
### Callbacks
```dart
// Called when AI conversation starts
Function(List<String> aiParticipants)? onAIConversationStarted
// Called when AI conversation ends
Function()? onAIConversationEnded
// Called on conversation updates
Function(String message)? onAIConversationUpdate
```
## Examples
### Programmatic Usage
```dart
final aiConversation = AIConversationService();
// Setup callbacks
aiConversation.onAIConversationStarted = (participants) {
print('AI conversation started: ${participants.join(", ")}');
};
// Start conversation
await aiConversation.startAIConversation(
aiParticipants: ['gemini', 'alice'],
currentUser: 'Cindy',
topic: 'quantum computing',
wsService: wsService,
);
// End conversation
aiConversation.endAIConversation();
```
## Support
For issues or questions:
1. Check troubleshooting section
2. Review command reference
3. Check daemon logs
4. Verify network connectivity
5. Test with simple commands first
## Version History
**v1.0.0** (October 17, 2025)
- Initial release
- Basic AI conversation detection
- Group chat integration
- Context menu support
- Command system
- Visual indicators
---
**Last Updated:** October 17, 2025
**Status:** ✅ Implemented and Ready for Testing