Integration Models Overview
6 ways to integrate PraisonAI recipes into your applications
Six integration models cover embedded SDK, CLI, sidecar HTTP, remote runner, events, and plugins.
from praisonaiagents import Agent
agent = Agent(
name="Model Picker",
instructions="Summarise PraisonAI recipe integration options.",
)
agent.start("Compare CLI versus embedded SDK for our CI pipeline.")The user selects a tab or card below to compare latency, complexity, and setup time.
PraisonAI recipes can be integrated into your applications using six distinct models. Each model has specific use cases, trade-offs, and implementation patterns.
Quick Comparison
By Latency
| Model | Latency | Best For |
|---|---|---|
| Embedded SDK | Lowest | Python apps, notebooks |
| CLI Invocation | Low | Scripts, CI/CD |
| Plugin Mode | Low | IDE/CMS extensions |
| Local HTTP Sidecar | Medium | Microservices, polyglot |
| Remote Managed Runner | Medium | Multi-tenant, cloud |
| Event-Driven | Variable | Async workflows |
By Complexity
| Model | Complexity | Setup Time |
|---|---|---|
| Embedded SDK | Low | Minutes |
| CLI Invocation | Low | Minutes |
| Plugin Mode | Medium | Hours |
| Local HTTP Sidecar | Medium | Hours |
| Remote Managed Runner | High | Days |
| Event-Driven | High | Days |
Local vs Remote
| Model | Deployment | Network Required |
|---|---|---|
| Embedded SDK | In-process | No |
| CLI Invocation | Local subprocess | No |
| Plugin Mode | Local/Remote | Optional |
| Local HTTP Sidecar | Local container | Localhost only |
| Remote Managed Runner | Cloud/Self-hosted | Yes |
| Event-Driven | Distributed | Yes |
Decision Guide
Choose Your Integration Model
Lowest latency – Direct Python integration with zero network overhead. Best for Python applications and notebooks.
Model 2: CLI InvocationLanguage-agnostic – Invoke recipes from any language via subprocess. Perfect for scripts and CI/CD pipelines.
Model 3: Local HTTP SidecarPolyglot friendly – HTTP API running locally. Ideal for microservices and non-Python applications.
Model 4: Remote Managed RunnerProduction-ready – Centralized, authenticated recipe execution. Built for multi-tenant cloud deployments.
Model 5: Event-DrivenAsync at scale – Queue-based invocation for high-volume batch processing and decoupled architectures.
Model 6: Plugin ModeNative UX – Embed recipes into IDEs, CMS platforms, and chat applications.
Feature Matrix
| Feature | SDK | CLI | Sidecar | Remote | Event | Plugin |
|---|---|---|---|---|---|---|
| Streaming | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| Multi-tenant | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |
| Auth built-in | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ |
| Async native | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
| Process isolation | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Hot reload | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
Quick Start
- Simple Usage
Run a recipe from Python with the embedded SDK:
python from praisonai import recipe result = recipe.run("my-recipe", input={"query": "Hello"}) print(result.output) - With Configuration
Use CLI or a local HTTP sidecar when you need language-agnostic or service-style invocation:
CLI praisonai recipe run my-recipe --input '{"query": "Hello"}' --jsonHTTP Sidecar # Start server praisonai serve recipe --port 8765 # Invoke curl -X POST http://localhost:8765/v1/recipes/run \ -H "Content-Type: application/json" \ -d '{"recipe": "my-recipe", "input": {"query": "Hello"}}'