
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@diegoaltoworks/chatter
Advanced tools
Embeddable AI chatbot framework with RAG, authentication, and customizable widgets
Embeddable AI chatbot framework with RAG, authentication, and customizable widgets
Features • Quick Start • Documentation • Demo
# Install
npm install @diegoaltoworks/chatter
# Create server
import { createServer } from '@diegoaltoworks/chatter';
const app = await createServer({
bot: { name: 'MyBot', personName: 'Your Name' },
openai: { apiKey: process.env.OPENAI_API_KEY },
database: { url: process.env.TURSO_URL, authToken: process.env.TURSO_AUTH_TOKEN },
auth: { secret: process.env.CHATTER_SECRET },
knowledgeDir: './knowledge',
promptsDir: './prompts'
});
Bun.serve({ port: 8181, fetch: app.fetch });
# Create API key for clients
npx chatter create-apikey --name "my-app" --expires-in 365d
Requirements: OpenAI API key, Turso database, Bun runtime. See Requirements Guide for setup instructions.
📁 Complete Examples - Ready-to-run examples for all use cases:
Complete guides for setup, deployment, and integration:
🎯 View Live Demo & Complete Implementation Example
The chatter-demo repository contains a complete, production-ready implementation showing:
Perfect for understanding how to customize and deploy your own Chatter service.
Add chat to your website with pre-built widgets or React components:
Vanilla JavaScript (load from your server):
<script src="https://your-bot.example.com/chatter.js"></script>
<script>
new Chatter.ChatButton({
host: 'your-bot.example.com',
mode: 'public',
apiKey: 'your-api-key'
});
</script>
React/NPM:
import { ChatButton } from '@diegoaltoworks/chatter/client';
import '@diegoaltoworks/chatter/client/style.css';
new ChatButton({ host: 'your-bot.example.com', mode: 'public', apiKey: '...' });
See Client Setup Guide for detailed integration examples, theming, and authentication options.
Use Chatter as a Model Context Protocol (MCP) server to expose your chatbot to Claude Desktop, VS Code extensions, and other MCP-compatible tools:
Basic Setup:
import { createMCPServer } from '@diegoaltoworks/chatter/mcp';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
const server = await createMCPServer({
bot: { name: 'MyBot', personName: 'Your Name' },
openai: { apiKey: process.env.OPENAI_API_KEY },
database: { url: process.env.TURSO_URL, authToken: process.env.TURSO_AUTH_TOKEN },
knowledgeDir: './knowledge',
promptsDir: './prompts'
});
// Connect with STDIO transport (for Claude Desktop)
const transport = new StdioServerTransport();
await server.connect(transport);
Customize Tools:
const server = await createMCPServer({
// ... other config ...
tools: {
public: {
enabled: true,
name: 'company_docs',
description: 'Search company documentation and FAQs'
},
private: {
enabled: false // Disable private tool
}
}
});
Conversation Tracking & Cost Management:
const server = await createMCPServer({
// ... other config ...
toolRateLimit: 30, // Max 30 requests per minute per tool (optional)
logging: {
console: true, // JSON logs to stdout (default: true)
onChat: async (event) => {
// Custom logging - includes conversation tracking and cost data
console.log('Chat event:', {
timestamp: event.timestamp,
conversationId: event.conversationId, // Track sessions across calls
tool: event.toolName,
user_message: event.userMessage,
conversation_length: event.conversationHistory.length,
rag_chunks: event.ragContext.length,
response_length: event.response.length,
duration_ms: event.duration,
// OpenAI API usage and cost tracking
cost: {
promptTokens: event.cost.promptTokens,
completionTokens: event.cost.completionTokens,
totalTokens: event.cost.totalTokens,
estimatedCostUSD: event.cost.estimatedCost
}
});
// Example: Send to external monitoring
// await fetch('https://your-logging-service.com/events', {
// method: 'POST',
// body: JSON.stringify(event)
// });
}
}
});
Claude Desktop Configuration:
Add to your claude_desktop_config.json:
{
"mcpServers": {
"chatter": {
"command": "node",
"args": ["/path/to/your/mcp-server.js"],
"env": {
"OPENAI_API_KEY": "your-key",
"TURSO_URL": "your-url",
"TURSO_AUTH_TOKEN": "your-token"
}
}
}
}
Available Tools (configurable):
chat_public (default name) - Chat using public knowledge basechat_private (default name) - Chat using private/internal knowledge baseBoth tools:
Features:
conversationId parameter to maintain session continuity across tool callsAdd phone call and SMS support to your Chatter bot with Talker:
bun add @diegoaltoworks/talker
import { createServer } from '@diegoaltoworks/chatter';
import { createTelephonyRoutes } from '@diegoaltoworks/talker';
const app = await createServer({
...config,
customRoutes: async (app, deps) => {
await createTelephonyRoutes(app, deps, {
twilio: { accountSid, authToken, phoneNumber },
transferNumber: '+441234567890',
});
},
});
One server, one port — web chat, phone calls, and SMS. See the Talker README for full documentation.
MIT © Diego Alto
FAQs
Embeddable AI chatbot framework with RAG, authentication, and customizable widgets
The npm package @diegoaltoworks/chatter receives a total of 19 weekly downloads. As such, @diegoaltoworks/chatter popularity was classified as not popular.
We found that @diegoaltoworks/chatter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.