@sensedealai/cuecue
v1.0.9
Published
TypeScript SDK for CueCue's AI-powered multi-agent research system
Maintainers
Readme
CueCue SDK
Conduct deep financial research using CueCue's AI-powered multi-agent system
CueCue SDK is a TypeScript library and CLI tool that enables developers and researchers to leverage CueCue's AI-powered multi-agent system for comprehensive financial research and analysis.
Features
- 🤖 AI-Powered Research - Leverage multi-agent AI system for in-depth research
- 📡 Real-time Streaming - SSE-based streaming for live progress updates
- 📋 Task Tracking - Monitor individual research tasks as they complete
- 📝 Report Generation - Automatically generate comprehensive research reports
- 🔄 Conversation Continuity - Continue existing research conversations
- 📋 Templates - Use predefined research frameworks
- 🎨 Style Mimicry - Mimic writing styles from any URL
Installation
npm install @sensedealai/cuecueCLI Usage
The CLI binary is cue.
Basic Usage
# Set your API key (recommended)
export CUECUE_API_KEY=your_api_key
# Run a research query
cue research "Tesla Q3 2024 revenue analysis"
# Short alias
cue r "Tesla Q3 2024 revenue analysis"API Key Configuration
You can store your API key persistently using the config command:
cue config set api_key YOUR_KEYCommand Options
Global Options
| Option | Description |
|--------|-------------|
| --api-key KEY | CueCue API key (defaults to CUECUE_API_KEY env var) |
| --base-url URL | CueCue API base URL (defaults to https://cuecue.cn) |
cue research <query> Options
| Option | Description |
|--------|-------------|
| --conversation-id ID | Continue an existing conversation |
| --template-id ID | Use a predefined research framework |
| --mimic-url URL | Mimic writing style from a URL |
| --output, -o FILE | Save report to file (markdown format) |
| --verbose, -v | Enable verbose logging |
| --foreground | Run in foreground (default: background) |
| --openclaw-channel CHANNEL | OpenClaw channel name for notifications |
| --openclaw-channel-id ID | OpenClaw channel ID for notifications |
cue config <subcommand> Options
| Subcommand | Description |
|------------|-------------|
| cue config set <key> <value> | Save a config value |
| cue config get [key] | Get a config value, or list all if no key given |
Examples
# Specify API key directly
cue research "Tesla Q3 2024 revenue" --api-key YOUR_KEY
# Save API key to config
cue config set api_key YOUR_KEY
# Save report to file
cue research "BYD financial analysis" --output report.md
# Continue existing conversation
cue research "Further analysis" --conversation-id CONV_ID
# Use a template
cue research "Company analysis" --template-id TEMPLATE_ID
# Mimic writing style from a URL
cue research "Market analysis" --mimic-url https://example.com/article
# Run in foreground (blocking)
cue research "Analysis topic" --foreground
# Send OpenClaw notification when done
cue research "Analysis topic" --openclaw-channel feishu --openclaw-channel-id YOUR_CHAT_ID
# Enable verbose logging
cue research "Analysis topic" --verboseLibrary Usage
Import and Initialize
import { CueCueDeepResearch } from '@sensedealai/cuecue';
// Initialize with your API key
const client = new CueCueDeepResearch('your-api-key');Basic Research
import { CueCueDeepResearch } from '@sensedealai/cuecue';
const client = new CueCueDeepResearch('your-api-key');
const result = await client.research('Tesla Q3 2024 revenue analysis');
console.log(`Conversation ID: ${result.conversationId}`);
console.log(`Report URL: ${result.reportUrl}`);
console.log(`Report: ${result.report}`);Advanced Options
const result = await client.research('Company analysis', {
// Continue existing conversation
conversationId: 'existing-conversation-id',
// Use a predefined template
templateId: 'template-id',
// Mimic writing style from URL
mimicUrl: 'https://example.com/article',
// Enable verbose logging
verbose: true,
});Using Custom Base URL
const client = new CueCueDeepResearch('your-api-key', 'https://custom-api.example.com');API Reference
CueCueDeepResearch
Constructor
constructor(apiKey: string, baseUrl?: string)apiKey- Your CueCue API keybaseUrl- Optional custom base URL (defaults tohttps://cuecue.cn)
Methods
research(query: string, options?: ResearchOptions): Promise<ResearchResult>
Execute a deep research query.
query- The research question or topicoptions- Optional research parameters (seeResearchOptions)- Returns:
Promise<ResearchResult>
Type Definitions
ResearchOptions
interface ResearchOptions {
conversationId?: string; // Continue existing conversation
templateId?: string; // Template ID for predefined framework
mimicUrl?: string; // URL to mimic writing style
verbose?: boolean; // Enable verbose logging
}ResearchResult
interface ResearchResult {
conversationId: string; // Unique conversation identifier
chatId: string; // Chat session identifier
tasks: string[]; // List of research tasks completed
report: string; // Generated research report
reportUrl: string; // URL to view report online
}SSE Events
The library also exports types for SSE events:
import type {
SSEEvent,
RequestPayload,
AgentStartEvent,
AgentEndEvent,
MessageEvent,
FinalSessionStateEvent,
} from '@sensedealai/cuecue';Getting an API Key
- Log in to CueCue at https://cuecue.cn
- Go to Settings → API Keys
- Generate a new API key
Building from Source
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run CLI
node dist/cli.js research "your research query"License
Apache 2.0 License - see LICENSE file for details.
Keywords
- research
- financial-analysis
- ai-agents
- report-generation
- data-analysis
