November 2025 Release
This release brings significant enhancements to the Cognipeer platform, including powerful client-side tool execution capabilities, comprehensive SDK improvements, enhanced on-premise deployment features, and new AI model providers.
🎯 Major Features
Client-Side Tool Execution
Execute JavaScript functions from your client applications directly within AI conversations and flows.
Key Capabilities:
- Define JavaScript functions the AI can automatically call
- OpenAI-compatible function calling format
- Automatic tool execution with retry logic
- Manual execution mode for fine-grained control
- Seamless integration between server flows and client logic
Use Cases:
- Access browser data (localStorage, cookies)
- Make API calls from the client to avoid CORS
- Query local databases (IndexedDB, SQLite)
- Integrate with third-party client-side SDKs
- Perform custom business logic calculations
Documentation:
Enhanced JavaScript/TypeScript SDK
Complete rewrite of the SDK with powerful new features.
What's New:
- ✅ Client-side tool execution support
- ✅ Webchat integration (iframe, URL, floating widget)
- ✅ Enhanced TypeScript support with complete type definitions
- ✅ Multi-turn conversation management
- ✅ Structured JSON output with schema validation
- ✅ Auto-execution with configurable retry logic
- ✅ Universal support (Node.js, browsers, edge runtimes)
Package:
npm install @cognipeer/sdkQuick Example:
import { CognipeerClient } from '@cognipeer/sdk';
const client = new CognipeerClient({ token: 'your-api-token' });
const response = await client.conversations.create({
peerId: 'your-peer-id',
messages: [
{ role: 'user', content: 'What is the weather in Tokyo?' }
],
clientTools: [{
type: 'function',
function: {
name: 'getCurrentWeather',
description: 'Get current weather for a city',
parameters: {
type: 'object',
properties: {
city: { type: 'string' }
}
}
},
implementation: async ({ city }) => {
const response = await fetch(`https://api.weather.com/${city}`);
return await response.json();
}
}]
});Migration Guide: Available in SDK Documentation
Webchat Integration
Three flexible ways to integrate chat into your applications.
1. Floating Widget (Like Intercom)
import { CognipeerWebchat } from '@cognipeer/sdk';
const widget = CognipeerWebchat.createWidget({
hookId: 'your-hook-id',
position: 'bottom-right',
theme: {
primary: '#00b5a5',
headerBG: '#ffffff'
}
});2. Iframe Embed
const webchat = new CognipeerWebchat({
hookId: 'your-hook-id',
containerId: 'chat-container'
});
webchat.mount();3. URL Generation with Events
const url = webchat.generateUrl({
contact: { email: 'user@example.com' },
context: { userId: '123' }
});
webchat.on('message-received', (event) => {
console.log('New message:', event.data.content);
});Features:
- Custom theming support
- Contact and context injection
- Event listening for deep integration
- Client tools support in webchat
- Responsive design
On-Premise Subscription Management
Simplified subscription management for on-premise deployments.
How It Works:
- License-based plan configuration
- No payment processing required
- Automatic limit and credit application
- Read-only subscription view for users
- Admin-managed plan changes
Benefits:
- ✅ Skip subscription selection during onboarding
- ✅ No Stripe integration needed
- ✅ No credit card information required
- ✅ Seamless user experience
- ✅ Centralized license management
Configuration:
{
"plan": "pro",
"limits": {
"peers": 50,
"datasources": 20,
"tools": 100,
"users": 25
},
"credits": {
"monthly": 100000
}
}Documentation: Subscription Management
🚀 Enhancements
Flow Execution Improvements
Client Tool Step:
- New
client-toolstep type for flows - Pauses flow execution for client-side operations
- Seamlessly resumes with tool results
- Supports template variables in parameters
- Multiple parameter format options (list, object, JSON string)
State Management:
- Enhanced flow execution state serialization
- Better handling of draft flow definitions
- Improved context handling and logging
- Tool call metadata tracking
Agent Execution Flow
Smart Agent Improvements:
- Draft flow definition support
- Enhanced tool call metadata
- Improved state serializer for better debugging
- Better agent context handling
Message and Conversation Enhancements
Client Tool Resume:
- New webhook integration for client tool completion
- Seamless flow resumption after tool execution
- Improved conversation state management
Widget State Handling:
- Refactored widget state to use initial state as default
- Better message-widget service reliability
- Improved state consistency
Model Provider Additions
New System Models:
- Qwen3-Next-80B-A3B (Instruct and Thinking variants)
- Qwen2.5-72B Instruct Turbo
- GLM-4.5-Air-FP8
- Reasoning support for compatible models
Provider Infrastructure:
- Enhanced reasoning extraction
- Better timestamp handling in message building
- Improved model resolution logic
Infrastructure Updates
ECR Lifecycle Management:
- Automated lifecycle rules for ECR repositories
- Better image retention policies
- Prefix-based lifecycle organization
Timestamp Handling:
- Improved timestamp comparison in
buildMessagesfunction - Support for various data types
- Better date handling across services
🔧 API Changes
New Endpoints
Client Tool Resume:
POST /api/v1/sdk/conversation/:conversationId/resume-toolResume a paused flow after client tool execution.
Source Redirect:
GET /api/v1/redirect/:idHandle source redirect URLs and save source information.
Enhanced Endpoints
Flow Execution:
- Added client tool pause/resume support
- Better error handling for tool execution
- Enhanced execution state management
Conversation API:
- Client tools parameter support
- Auto-execution control
- Tool result handling
📚 Documentation Updates
New Documentation
- Client Tool Step - Complete guide to client-side tool execution in flows
- JavaScript/TypeScript SDK - Comprehensive SDK documentation with client tools
- On-Premise Subscription Management - License-based subscription guide
Updated Documentation
- Flow Steps Overview - Added client-tool step
- SDK migration guide from @cognipeer/client-js
- Webchat integration examples
- Client tools best practices
🐛 Bug Fixes
- Fixed widget state handling in message-widget service
- Improved timestamp comparison edge cases
- Better error handling in flow execution
- Enhanced TTS processing to skip when no text provided
- Vector service code clarity improvements
- User service refactoring for consistency
⚡ Performance Improvements
- Optimized flow execution state management
- Better memory handling in agent execution
- Improved message building performance
- Enhanced vector database operations
🔐 Security Updates
- Enhanced validation for client tools
- Better parameter sanitization
- Improved authentication flow
- Secure tool execution handling
📦 Dependencies
Added
- @cognipeer/sdk - New official SDK package
- Enhanced LangChain integrations for new model providers
Updated
- LangChain community packages
- Together.ai model integrations
🔄 Breaking Changes
SDK Package Change
The @cognipeer/client-js package has been replaced with @cognipeer/sdk.
Migration Steps:
- Uninstall old package:
npm uninstall @cognipeer/client-js - Install new package:
npm install @cognipeer/sdk - Update imports:
import { CognipeerClient } from '@cognipeer/sdk' - Update API calls (see migration guide)
Old API:
await client.peer.list();
await client.conversation.create(peerId);New API:
await client.peers.list();
await client.conversations.create({
peerId,
messages: [{ role: 'user', content: 'Hello' }]
});Flow API
The legacy app.execute() method is deprecated. Use flow.execute():
// Old (deprecated)
await client.app.execute(appId, { inputs });
// New (recommended)
await client.flows.execute(flowId, { inputs });🎓 Migration Guides
Upgrading to New SDK
Step 1: Install New Package
npm uninstall @cognipeer/client-js
npm install @cognipeer/sdkStep 2: Update Imports
// Before
import CognipeerClient from '@cognipeer/client-js';
// After
import { CognipeerClient } from '@cognipeer/sdk';Step 3: Update Configuration
// Before
const client = new CognipeerClient({
baseUrl: 'https://api.cognipeer.com/v1/client',
token: 'your-token'
});
// After
const client = new CognipeerClient({
baseURL: 'https://api.cognipeer.com', // Note: baseURL not baseUrl
token: 'your-token'
});Step 4: Update Method Calls
// Before
const conversation = await client.conversation.create(peerId);
await client.conversation.sendMessage(conversationId, content);
// After
const response = await client.conversations.create({
peerId,
messages: [{ role: 'user', content: 'Hello' }]
});
await client.conversations.sendMessage(conversationId, content);Adding Client Tools to Existing Applications
Step 1: Define Your Tools
const myTools = [{
type: 'function',
function: {
name: 'getCustomerData',
description: 'Retrieve customer information',
parameters: {
type: 'object',
properties: {
customerId: { type: 'string' }
},
required: ['customerId']
}
},
implementation: async ({ customerId }) => {
// Your implementation
return await database.customers.findOne({ id: customerId });
}
}];Step 2: Pass to Conversation
const response = await client.conversations.create({
peerId: 'your-peer-id',
messages: [{ role: 'user', content: 'Get customer details' }],
clientTools: myTools
});💡 Best Practices
Client Tools
- Descriptive Names: Use clear, action-oriented tool names
- Validate Parameters: Always validate inputs in implementations
- Return Structured Data: Return consistent, well-structured objects
- Handle Errors: Implement proper error handling
- Optimize Performance: Cache data when appropriate
Webchat Integration
- Theme Consistency: Match your brand colors
- Context Injection: Provide relevant user context
- Event Handling: Listen to events for analytics
- Mobile Responsive: Test on all device sizes
- Security: Never expose sensitive keys in client code
On-Premise Deployments
- Plan Configuration: Set realistic limits upfront
- Monitor Usage: Track credits and resource consumption
- Document Changes: Keep plan changes documented
- User Communication: Notify users of limit changes
- Upgrade Planning: Plan for growth early
📊 Statistics
- New Features: 4 major features
- API Endpoints: 2 new, multiple enhanced
- Documentation Pages: 3 new, multiple updated
- Bug Fixes: 6 improvements
- Performance Enhancements: 4 optimizations
🔜 Coming Soon
- Enhanced flow debugging tools
- More AI model provider integrations
- Advanced analytics dashboard
- Improved peer version management
- Extended webhook capabilities
📞 Support
- Documentation: https://docs.cognipeer.com
- Discord: Join our community
- Email: support@cognipeer.com
- GitHub: Report issues and contribute
🙏 Acknowledgments
Thank you to our community for feedback and contributions that made this release possible!
Released: November 2025
Version: See individual package versions
Migration Support: Available through December 2025

