Skip to main content

CensaiOS SDK - The AI Agent Operating System SDK with Multi-Model AI Orchestration

Project description

CensaiOS SDK v2.1.0

PyPI version Python 3.8+ License: MIT

CensaiOS: The AI Agent Operating System

The official Python SDK for CensaiOS, the AI Agent Operating System with multi-model AI orchestration supporting Grok (xAI), Gemini (Google), and Jules hyper-orchestrator.

Orchestrating the future of autonomous AI collaboration.

๐ŸŒŸ What's New in CensaiOS SDK v2.1.0

  • Multi-Model AI Orchestration - Intelligent routing between Grok, Gemini, and Jules
  • Hyper-Scale Content Generation - Jules integration with 60 concurrent session capacity
  • Command-Line Interface - CLI tools for AI queries and orchestration
  • Context-Aware Routing - Automatic model selection based on task type and context
  • Backward Compatibility - All existing SDK features preserved

๐Ÿ“ฆ Installation

pip install nexusdelta-sdk

# For AI features (optional)
pip install nexusdelta-sdk[ai]

# For development
pip install nexusdelta-sdk[dev]

๐Ÿ”‘ Quick Start

Basic Usage (CensaiOS Agent Marketplace)

from nexusdelta_sdk import NexusDeltaSDK

# Initialize with Firebase token
sdk = NexusDeltaSDK(api_key="your_firebase_id_token")

# Search for agents
agents = sdk.search_agents("data processing")
for agent in agents:
    print(f"- {agent['name']}: {agent['purpose']}")

# Execute a tool
result = sdk.execute_tool(
    agent_id="agent_abc123",
    tool_name="process_data",
    payload={"data": [1, 2, 3]}
)

Multi-Model AI Orchestration

from nexusdelta_sdk import NexusDeltaSDK, MultiModelOrchestrator

# Initialize SDK
sdk = NexusDeltaSDK(api_key="your_token")

# Create multi-model agent
agent = sdk.create_multi_model_agent(
    "AICodeAssistant",
    "Multi-model coding assistant",
    ["grok", "gemini", "jules"]
)

# Intelligent query routing
result = sdk.orchestrate_ai_query(
    "Write a Python function to calculate fibonacci numbers"
)
print(f"Model used: {result['model']}")
print(f"Response: {result['response']}")

# Direct model access
grok_result = sdk.orchestrate_ai_query(
    "Explain quantum computing",
    model="grok"
)

gemini_result = sdk.orchestrate_ai_query(
    "Generate API documentation",
    model="gemini"
)

# GitHub-aware content generation (routes to Jules)
jules_result = sdk.orchestrate_ai_query(
    "Generate project documentation",
    context="github.com/microsoft/vscode"
)

Command Line Interface

# Check SDK status
nexusdelta-cli status

# Query with automatic routing
nexusdelta-cli query "Write a Python function to reverse a string"

# Query specific model
nexusdelta-cli query --model grok "Explain how neural networks work"

# Query with GitHub context
nexusdelta-cli query --context "github.com/user/repo" "Generate API docs"

# List model capabilities
nexusdelta-cli models

# Test API key configuration
nexusdelta-cli test-keys

๐Ÿ”ง Configuration

API Keys Setup

Set environment variables for AI model access:

export XAI_API_KEY="your-xai-api-key"        # For Grok
export GEMINI_API_KEY="your-gemini-api-key"  # For Gemini
export JULES_API_KEY="your-jules-api-key"    # For Jules

Firebase Authentication

Get your Firebase ID token for agent marketplace access:

import firebase_admin
from firebase_admin import auth

# Initialize Firebase
firebase_admin.initialize_app()

# Get ID token
user = auth.get_user("user_id")
id_token = user.custom_claims.get("id_token")  # Or however you store it

๐ŸŽฏ Model Capabilities

Model Best For Key Features
Grok (xAI) Reasoning, Analysis General AI, Problem Solving, Explanations
Gemini (Google) Code Generation, Creative Writing Programming, Text Analysis, Content Creation
Jules (Google) Content Generation with Context GitHub Integration, Project Planning, Documentation

Intelligent Routing

The SDK automatically routes tasks to the best model:

  • Code/Script Generation โ†’ Gemini
  • Reasoning/Analysis โ†’ Grok
  • GitHub Context โ†’ Jules
  • Creative Writing โ†’ Gemini
  • General Tasks โ†’ Grok

๐Ÿ“š Advanced Usage

Custom Multi-Model Orchestrator

from nexusdelta_sdk import MultiModelOrchestrator

# Create standalone orchestrator
orchestrator = MultiModelOrchestrator(
    grok_key="your_grok_key",
    gemini_key="your_gemini_key",
    jules_key="your_jules_key"
)

# Manual routing
model = orchestrator.route_task_to_model("Write a function", "code task")
print(f"Best model: {model}")  # Output: gemini

# Direct queries
result = orchestrator.query_grok("Explain recursion")
result = orchestrator.query_gemini("Generate HTML template")
result = orchestrator.query_jules("Document this API", "github.com/user/repo")

Agent Registration with Multi-Model Support

# Register agent with multi-model capabilities
agent_card = {
    "name": "MultiModelAssistant",
    "purpose": "AI assistant with multiple model support",
    "category": "ai_assistant",
    "model": "multi_model_orchestrator",
    "tools": [
        {
            "id": "orchestrate_query",
            "name": "AI Query Orchestration",
            "description": "Route queries to appropriate AI models",
            "parameters": {
                "prompt": {"type": "string", "description": "The query"},
                "context": {"type": "string", "description": "Context for routing"}
            }
        }
    ],
    "metadata": {
        "supported_models": ["grok", "gemini", "jules"],
        "routing_intelligence": True
    }
}

response = sdk.register_agent(agent_card)

๐Ÿ” API Reference

NexusDeltaSDK

Core Methods

  • register_agent(agent_card) - Register new agent
  • search_agents(query, category, vetted_only) - Search marketplace
  • get_agent(agent_id) - Get agent details
  • execute_tool(agent_id, tool_name, payload) - Execute agent tool
  • health_check() - Check system status

Multi-Model Methods

  • create_multi_model_agent(name, purpose, models) - Create multi-model agent
  • orchestrate_ai_query(prompt, context, model, **params) - AI query orchestration
  • get_model_capabilities() - Get available model capabilities

MultiModelOrchestrator

  • orchestrate_query(prompt, context, **params) - Auto-route query
  • route_task_to_model(task, context) - Determine best model
  • query_grok(prompt, **params) - Direct Grok query
  • query_gemini(prompt, **params) - Direct Gemini query
  • query_jules(prompt, repo_context) - Direct Jules query

๐Ÿ—๏ธ Architecture

Nexus Delta SDK v2.1.0
โ”œโ”€โ”€ Core SDK (Agent Marketplace)
โ”‚   โ”œโ”€โ”€ Agent registration & discovery
โ”‚   โ”œโ”€โ”€ Tool execution
โ”‚   โ””โ”€โ”€ Firebase integration
โ”œโ”€โ”€ Multi-Model AI Orchestration
โ”‚   โ”œโ”€โ”€ Intelligent routing engine
โ”‚   โ”œโ”€โ”€ Model integrations (Grok, Gemini, Jules)
โ”‚   โ””โ”€โ”€ Context-aware processing
โ””โ”€โ”€ CLI Tools
    โ”œโ”€โ”€ Command-line interface
    โ”œโ”€โ”€ Status monitoring
    โ””โ”€โ”€ API key management

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ”— Links

๐Ÿ†˜ Support


Built with โค๏ธ by the CensaiOS Team


Copyright ยฉ 2025 CensaiOS. All rights reserved.

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

nexusdelta_sdk-2.1.0a2.tar.gz (46.4 kB view details)

Uploaded Source

Built Distribution

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

nexusdelta_sdk-2.1.0a2-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file nexusdelta_sdk-2.1.0a2.tar.gz.

File metadata

  • Download URL: nexusdelta_sdk-2.1.0a2.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nexusdelta_sdk-2.1.0a2.tar.gz
Algorithm Hash digest
SHA256 05d8aea1d59551a8c9cf25f64da614608d70f8b09b0ff9bc20c7d25208a857b0
MD5 87e3e8b1b1f48aa09ed0a8364891a8e0
BLAKE2b-256 6279fa2914a05465a7d5a852b550d3471ad16cbef8d09faeb17fe3072faa7fb6

See more details on using hashes here.

File details

Details for the file nexusdelta_sdk-2.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for nexusdelta_sdk-2.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 031c9aa3d17468aa6366cacf91fc4a1b93de18a920650d6ab8edf8bd1f9bd6e2
MD5 56f0a38576a347843221fe4428a62ae4
BLAKE2b-256 967d28c2c1fe84a338a248681488ed3bfa1303999d397a7a96686f3a11112666

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