Python SDK for CellCog - Create complex multimodal content through AI orchestration
Project description
CellCog Python SDK
Create complex multimodal content through AI orchestration - research reports, interactive apps, videos, images, and documents.
Installation
pip install cellcog
Quick Start
from cellcog import CellCogClient
client = CellCogClient()
# First-time setup (creates account, stores API key)
client.setup_account("your.email@example.com", "your-password")
# Create a chat
result = client.create_chat("Research Tesla Q4 2025 earnings and create an analysis report")
print(f"Chat ID: {result['chat_id']}")
# Wait for completion (typically 30 seconds to several minutes)
final = client.wait_for_completion(result["chat_id"])
# View results
if final["status"] == "completed":
for msg in final["history"]["messages"]:
print(f"{msg['from']}: {msg['content'][:200]}...")
Features
- Research Reports: Deep analysis with citations and insights
- Interactive Apps: HTML dashboards and visualizations
- Videos: Marketing videos, explainers with AI voiceovers
- Images: Generated images, infographics, brand assets
- Documents: PDFs, presentations, spreadsheets
File Handling
The SDK automatically handles file uploads and downloads. You only work with local paths.
Send Files to CellCog
# Local files in SHOW_FILE tags are automatically uploaded
result = client.create_chat('''
Analyze this financial data:
<SHOW_FILE>/home/user/data/q4_financials.xlsx</SHOW_FILE>
Compare with industry benchmarks.
''')
Request Output at Specific Locations
# Use GENERATE_FILE to specify where you want output files
result = client.create_chat('''
Analyze the data:
<SHOW_FILE>/home/user/data/sales.csv</SHOW_FILE>
Create:
1. PDF report: <GENERATE_FILE>/home/user/reports/analysis.pdf</GENERATE_FILE>
2. Chart image: <GENERATE_FILE>/home/user/images/chart.png</GENERATE_FILE>
''')
# Wait for completion - files are automatically downloaded
final = client.wait_for_completion(result["chat_id"])
# Files now exist at the paths you specified!
Configuration
The SDK stores credentials in ~/.openclaw/cellcog.json by default.
You can also use environment variables:
export CELLCOG_API_KEY="sk_..."
export CELLCOG_EMAIL="your@email.com"
API Reference
CellCogClient
client = CellCogClient(config_path=None) # Optional custom config path
Account Management
# Create account or sign in
client.setup_account(email, password)
# Check configuration status
status = client.get_account_status()
# {"configured": True, "email": "...", "api_key_prefix": "sk_..."}
Chat Operations
# Create a new chat
result = client.create_chat(prompt, project_id=None)
# {"chat_id": "...", "status": "processing", "uploaded_files": [...]}
# Send follow-up message
client.send_message(chat_id, message)
# Check status (non-blocking)
status = client.get_status(chat_id)
# {"status": "processing"|"ready"|"error", "name": "...", "is_operating": bool}
# Get full history with files downloaded
history = client.get_history(chat_id)
# {"chat_id": "...", "messages": [...], "is_complete": bool}
# List recent chats
chats = client.list_chats(limit=20)
# Wait for completion (blocking)
final = client.wait_for_completion(chat_id, timeout_seconds=600, poll_interval=10)
# {"status": "completed"|"timeout"|"error", "history": {...}}
# Check for completed chats (for heartbeat loops)
completed = client.check_pending_chats()
Error Handling
from cellcog import (
CellCogClient,
PaymentRequiredError,
AuthenticationError,
ConfigurationError,
)
client = CellCogClient()
try:
result = client.create_chat("Create a marketing video...")
except PaymentRequiredError as e:
print(f"Need credits. Visit: {e.subscription_url}")
print(f"Account: {e.email}")
except AuthenticationError:
print("Invalid API key - run setup_account() or check CELLCOG_API_KEY")
except ConfigurationError:
print("SDK not configured - run setup_account() first")
OpenClaw Integration
This SDK is designed to work seamlessly with OpenClaw as a skill.
See the OpenClaw skill documentation for integration details.
Links
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cellcog-0.1.0.tar.gz.
File metadata
- Download URL: cellcog-0.1.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08f932d43f0a7e1932b8f2c4865ed6e3f17f8cc3f9a42c25657a4f3ca56d167b
|
|
| MD5 |
6764f3b02573108dd4c658162cb04486
|
|
| BLAKE2b-256 |
8d8f8d8ee4ee004bdcb5a47a606d73b87bb5cbef96dac2b6f15a939bb4ec128b
|
File details
Details for the file cellcog-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cellcog-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efe8d9f4a1db7bbd3e575fcd62278b88e9ca53bb0c8aeb2d185a9b5414bdaed5
|
|
| MD5 |
489b2dfd54cf3b50aa0dff7e2982578e
|
|
| BLAKE2b-256 |
785f9ca892d76854ad339780e7c35935d04fcd7fe299b2d8988915a5d0024370
|