How infobip/omnia-sdk works
Project type and purpose
• This is an open-source Python SDK (omnia_sdk) for building and deploying AI-driven, stateful workflows (e.g., chatbots) on Infobip’s distributed CPaaS/AI platform.
• It provides a LangGraph-based orchestration layer, helper “tools” modules (AI, channels, localization, contact center, etc.), and examples for local development, code submission, and HTTP APIs.
File structure
• Top level:
– omnia_sdk/ – the SDK package
• examples/ – sample scripts (http_api_example.py, tiny_chatbot.py)
• workflow/ – core orchestration modules:
• chatbot (configuration, state, constants)
• langgraph (graph definitions, commands, checkpointing)
• script_examples – ready-to-run sample workflows (get_logs, code_submission, etc.)
• tools/ – pluggable adapters: ai (LLM, RAG, prompts), channels (WhatsApp, OmniChannels), cdp, contact_center, localization, rest (retry client)
• tests/ – unit tests covering workflows, tools, retryable HTTP client, translation
– pyproject.toml – build and dependency management
– code_submission.py (under script_examples) – client for packaging & uploading to the platform
Extract insights from the README
• SDK targets Infobip’s platform to ensure distributed session management, HA, scalability, automatic language detection/localization.
• Workflows run locally or on the platform via two HTTP entry points (/inbound-api, /inbound-api-callback) and via OmniChannel API.
• Deployment: zip project tree + required YAMLs (chatbot_configuration.yaml, translation_table.yaml, optional build.yaml).
Main components
A. Developer Environment
– Local code (examples + user workflows)
– omnia_sdk library
– Code submission client (script or REST call)
B. Infobip Platform
– REST endpoints for deployment (code submission)
– Workflow runtime cluster (distributed, stateful inference servers)
– HTTP endpoints for inbound traffic (/inbound-api, /inbound-api-callback)
– OmniChannel API gateway for external channels (WhatsApp, SMS, etc.)
– State store (session database/checkpointing)
– Logging & monitoring services
C. Workflow Runtime (inside platform)
– LangGraph orchestrator
• Chatbot graph nodes
• Checkpointer (state persistence)
– Tools modules
• AI adapter (LLM, RAG, prompts)
• Channels adapter (send/receive)
• Localization adapter
• Contact center adapter
• CDP adapter
• Retryable HTTP client
D. External Services
– LLM providers (OpenAI, etc.)
– CPaaS/SaaS endpoints (Infobip)
– Third-party APIs used in tools
Relationships and interactions
1. Developer → (uses omnia_sdk) → Local workflow code
2. Developer → (code_submission.zip) → Platform deployment endpoint
3. Platform → (unpacks & loads) → Workflow runtime
4. End user → (message) → OmniChannel API → /inbound-api → LangGraph orchestrator
5. Orchestrator → (executes graph nodes) → Tools modules → External services (LLM, translation, channels, CDP)
6. Orchestrator → (state changes) → State store
7. Orchestrator → (logging) → Logging service
8. Platform → (callbacks) → /inbound-api-callback (for async flows)
Architectural patterns and design principles
• Modular, pluggable “tools” architecture for each external integration
• Graph-based workflow orchestration (LangGraph) with explicit state checkpointing
• Separation of concerns: orchestration vs. integration adapters vs. configuration
• Distributed, stateful service mesh (for HA and scalability)
Relevant technologies & frameworks
• Python 3.12+
• LangGraph (workflow DSL)
• HTTP/REST (retryable client)
• YAML configuration (chatbot_configuration.yaml, translation_table.yaml, build.yaml)
• Infobip OmniChannel & CPaaS APIs
Detail without overthinking
– Break the system into as many logical components as you see in the file tree: workflow/core, tools/ai, tools/channels, etc.