Skip to main content

Platform

Chat Client

The Cogni+ Chat Client is a powerful interface that enables natural language interactions with MCP servers, featuring Generative UI capabilities for rich, interactive experiences.

Overview

The Chat Client connects to both cloud-hosted and local MCP servers, providing a seamless way to access AI capabilities through conversation. It supports:
  • Generative UI: Dynamic interface elements created by AI agents
  • Multi-server Connections: Simultaneous connection to multiple MCP servers
  • Local/Remote Integration: Works with both cloud-hosted and locally-running servers
  • Rich Media Support: Handle text, images, files, and interactive components
  • Streaming: Streamable HTTP (see MCP Spec) for streaming responses

Getting Started with Chat Client

Web Interface

  1. Navigate to the Cogni+ platform and sign in
  2. Click “Chat” in the main navigation
  3. Create a new conversation or continue an existing one
  4. Select which MCP servers to include in your session

Desktop Application

  1. Download and install the Cogni+ Chat Client for your platform
  2. Sign in with your Cogni+ credentials
  3. Connect to cloud-hosted servers directly
  4. For local servers, ensure the Cogni CLI service is running

CLI Integration

Connect to the Chat Client through the CLI for local development:
# Start the local chat client connected to a local server
cogni chat start --local-server ./my-server

# Connect to both local and remote servers
cogni chat start --local-server ./my-server --remote-server cogni/web-search

Generative UI Features

The Chat Client supports rich interactive elements generated by AI agents:

Interactive Components

Agents can generate and render various UI components:
  • Forms: Interactive data entry with validation
  • Data Visualizations: Charts, graphs, and interactive data displays
  • Selection Interfaces: Dropdowns, checkboxes, radio buttons
  • Media Viewers: Image galleries, document viewers, video players

Example: Form Generation

You: I need to collect user feedback for my product.

Agent: I can help you create a feedback form. What kind of information do you want to collect?

You: Customer satisfaction rating, product features used, and improvement suggestions.

[Agent generates and displays an interactive form with rating sliders, feature checkboxes, and a text area for suggestions]

Workflow Integration

The Chat Client supports multi-step workflows with state persistence:
  • Session State: Maintain context across interactions
  • Progressive Disclosure: Reveal information and options gradually
  • Data Processing: Handle submitted form data or user selections
  • Conditional Logic: Adapt interfaces based on user inputs or choices

Connecting to Local Servers

The Chat Client can connect to locally-running MCP servers through the Cogni CLI:
  1. Start your local MCP server (e.g., a development version)
  2. Run cogni tunnel create to expose it securely
  3. In the Chat Client, connect to “local” servers
  4. Interact with your local server alongside cloud servers
This allows for powerful development workflows where you can test local changes while still leveraging cloud-hosted capabilities.

Security and Privacy

The Chat Client implements several security measures:
  • End-to-end Encryption: Secure communications with servers
  • Sandboxed Execution: Isolation between different server contexts
  • Permission Controls: Explicit approval for sensitive operations
  • Session Management: Secure handling of authentication tokens

Use Cases

Developer Testing

Test MCP servers during development with real-time feedback:
# Start local server in development mode
cogni server dev ./my-server

# Open chat client connected to the development server
cogni chat open --connect-to local://my-server

Cross-server Orchestration

Combine multiple specialized servers into cohesive workflows:
  1. Connect to a database server, document parser, and text generator
  2. Upload a document for analysis
  3. The chat interface coordinates tools from all three servers
  4. Results are presented with interactive visualizations

Enterprise Deployment

For enterprise scenarios, the Chat Client supports:
  • SSO Integration: Connect with corporate identity providers
  • Audit Logging: Track all interactions for compliance
  • Custom Branding: Deploy with company logos and styling
  • Access Controls: Limit which servers and tools users can access

Advanced Configuration

The Chat Client offers extensive configuration options:
# chat-config.yaml
appearance:
  theme: "light"  # light, dark, system
  fontsize: "medium"
  compact_mode: false

connections:
  default_servers:
    - "cogni/web-search"
    - "cogni/file-processor"
  local_servers:
    - name: "dev-server"
      path: "./local/server"
      auto_connect: true

ui:
  show_reasoning: false  # Show agent reasoning steps
  generative_ui: true    # Enable generative UI features
  animation_speed: "normal"
Load this configuration with:
cogni chat open --config chat-config.yaml

Integration with Other Applications

The Chat Client can be embedded in other applications using our SDK:
import { CogniChatClient } from '@cogni/chat-client';

// Initialize the chat client in your app
const chatClient = new CogniChatClient({
  container: document.getElementById('chat-container'),
  servers: ['cogni/web-search'],
  apiKey: 'your-api-key'
});

// Connect to servers
await chatClient.connect();

// Listen for events
chatClient.on('message', (message) => {
  console.log('New message:', message);
});
This allows for seamless integration of Cogni+ capabilities into existing applications and workflows.