Skip to main content

Python SDK for CellCog - Any-to-Any AI for agents. Fire-and-forget pattern with WebSocket notifications.

Project description

CellCog Python SDK

CellCog: Any-to-Any for Agents — Your sub-agent for quality work.

When you need depth, accuracy, or complex deliverables — research reports, interactive apps, videos, images, podcasts, memes, documents, and more — use CellCog.

Installation

pip install cellcog

Quick Start

from cellcog import CellCogClient

client = CellCogClient()
client.set_api_key("sk_...")  # Get from https://cellcog.ai/profile?tab=api-keys

# Fire-and-forget: returns immediately
result = client.create_chat(
    prompt="Research quantum computing advances in 2026",
    notify_session_key="agent:main:main",
    task_label="quantum-research",
    chat_mode="agent"
)

# Continue with other work — daemon notifies you when complete
print(result["explanation"])

How It Works

  1. You call create_chat() — SDK sends request to CellCog, returns immediately
  2. Background daemon monitors — WebSocket connection watches for progress and completion
  3. Interim updates every 4 minutes — for long-running tasks, your session gets progress updates
  4. Completion notification — daemon delivers full response + downloaded files to your session

No polling. No blocking. Fire and forget.

Configuration

client = CellCogClient()
client.set_api_key("sk_...")  # SDK handles storage automatically

Get your API key:

  1. Create account: https://cellcog.ai/signup
  2. Add payment: https://cellcog.ai/profile?tab=billing
  3. Get API key: https://cellcog.ai/profile?tab=api-keys

API Reference

Primary Methods (Fire-and-Forget)

# Create new chat — returns immediately
result = client.create_chat(
    prompt="Your task...",
    notify_session_key="agent:main:main",
    task_label="my-task",
    chat_mode="agent",          # "agent" (fast) or "agent team" (deep work)
    project_id=None             # Optional CellCog project ID
)
# Returns: {"chat_id", "status", "explanation", "daemon_listening", "listeners"}

# Send follow-up to existing chat — returns immediately
result = client.send_message(
    chat_id="abc123",
    message="Now create a PDF summary",
    notify_session_key="agent:main:main",
    task_label="summary"
)

# Manual inspection (ignores seen indices)
history = client.get_history(chat_id="abc123")

# Quick status check
status = client.get_status(chat_id="abc123")
# Returns: {"status", "name", "is_operating", "error_type"}

# List recent chats
chats = client.list_chats(limit=20)

File Handling

Send Files to CellCog

result = client.create_chat(
    prompt="""
    Analyze this data:
    <SHOW_FILE>/path/to/sales.csv</SHOW_FILE>
    """,
    notify_session_key="agent:main:main",
    task_label="data-analysis"
)
# SDK automatically uploads local files

Request Output at Specific Locations

result = client.create_chat(
    prompt="""
    Create analysis report:
    <GENERATE_FILE>/path/to/output/report.pdf</GENERATE_FILE>
    """,
    notify_session_key="agent:main:main",
    task_label="report"
)
# SDK transforms GENERATE_FILE → external_local_path
# CellCog generates the file, SDK downloads to your specified path

Chat Modes

Mode Speed Cost Best For
"agent" Fast (seconds–minutes) 1x Most tasks — research, images, audio, documents
"agent team" Slower (5–60 minutes) 4x Deep work — multi-source research, complex videos, investor decks

Default to "agent". Use "agent team" when quality requires multiple reasoning passes.

What You Can Create

Capability Skill Description
🔬 Research research-cog Deep analysis with citations
🎬 Video video-cog Marketing videos, explainers, lipsync
🎨 Images image-cog Generated images, style transfer, consistent characters
🎵 Audio audio-cog Text-to-speech (8 voices), music generation
🎙️ Podcasts pod-cog Multi-voice dialogue + intro/outro music
😂 Memes meme-cog AI meme generation with quality curation
📊 Dashboards dash-cog Interactive HTML apps and visualizations
📽️ Slides slides-cog Presentations (PDF default)
📈 Spreadsheets sheet-cog Excel files, financial models
📄 Documents docs-cog PDFs — resumes, contracts, reports
🏷️ Branding brand-cog Logos, color palettes, brand kits
📚 Comics comi-cog Manga, webtoons, comic strips
🎮 Games game-cog Game assets, sprites, GDDs
📸 Social insta-cog Instagram/TikTok content
📚 Learning learn-cog Tutoring, study guides
📖 Stories story-cog Fiction, screenplays, world building
💭 Thinking think-cog Collaborative problem-solving
📺 YouTube tube-cog Shorts, tutorials, thumbnails
🎬 Cinematics cine-cog Grand widescreen cinematics, short films, brand films
🎶 Music music-cog Original music — instrumentals, vocals, scores, jingles
💰 Finance fin-cog Stock analysis, valuation models, portfolio optimization
✏️ Prototyping proto-cog UI/UX wireframes, interactive HTML prototypes
🪙 Crypto crypto-cog Token analysis, DeFi research, on-chain metrics
🔢 Data Science data-cog Data cleaning, statistical analysis, visualization, ML

OpenClaw Integration

This SDK is designed for OpenClaw agents. Install skills from ClawHub:

# Mothership (required)
clawhub install cellcog

# Install capability-specific skills as needed
clawhub install research-cog
clawhub install video-cog
clawhub install pod-cog
# ... etc.

See individual skill SKILL.md files for detailed usage guides.

Error Handling

from cellcog import (
    CellCogClient,
    PaymentRequiredError,
    ConfigurationError,
    SDKUpgradeRequiredError,
)

client = CellCogClient()

try:
    result = client.create_chat(...)
except PaymentRequiredError as e:
    print(f"Add credits at: {e.subscription_url}")
except ConfigurationError:
    print("Run client.set_api_key('sk_...')")
except SDKUpgradeRequiredError as e:
    print(f"Upgrade: pip install cellcog=={e.minimum_version}")

Links

License

MIT License — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cellcog-1.0.3.tar.gz (112.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cellcog-1.0.3-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file cellcog-1.0.3.tar.gz.

File metadata

  • Download URL: cellcog-1.0.3.tar.gz
  • Upload date:
  • Size: 112.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for cellcog-1.0.3.tar.gz
Algorithm Hash digest
SHA256 44313b51a0ae2e79a68dfeebdb6f0e0e38b2d500d8f9e57d159b7de49da8a20b
MD5 ad2efd2de24651cafe17ecf5d8f9aacf
BLAKE2b-256 b64bb0a3cc7aedaacd04c8570076503de4418912ac8fcdad2c6b85af2986649c

See more details on using hashes here.

File details

Details for the file cellcog-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: cellcog-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for cellcog-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3f21f012b9ac9411bfc2403b29d54456483805b50946fcdccb54db662aa43e09
MD5 861a9f71bf063796dcc27e634185c716
BLAKE2b-256 9ba6d10cdab29580eebed36dae7cfbb64621f35462e967c62c321a5a828123ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page