Decision Guide

When to use which integration model

Pick the integration model that fits your stack, latency budget, and operational constraints.

python
from praisonaiagents import Agent

agent = Agent(
    name="Integration Advisor",
    instructions="Recommend a PraisonAI recipe integration model for the described app.",
)
agent.start("We need recipes from a Node.js microservice on one machine.")

The user describes their environment; you map it to the right recipe integration pattern below.

Diagram

Decision Guide

📋 Your Stack

🧭 Match Model

✅ Integration Path

Quick Start

  1. Simple Usage

    Describe your environment and let the advisor recommend a model.

    python
    from praisonaiagents import Agent
    
    agent = Agent(name="Integration Advisor", instructions="Recommend a recipe integration model.")
    agent.start("We need recipes from a Node.js microservice on one machine.")
  2. With Configuration

    Once you pick the sidecar model, serve recipes locally.

    bash
    praisonai serve recipe --config agents.yaml

How It Works

Diagram
ModelAdvisorUserModelAdvisorUserDescribe stack and constraintsMatch against the comparison matrixBest-fit integration modelRecommendation + next steps

Quick Decision Tree

Diagram

Yes

No

Yes

No

Yes

No

Yes

No

Yes

No

START HERE

Is your app
written in Python?

Model 1: Embedded SDK
lowest latency

Is this for
scripts/CI/CD?

Model 2: CLI Invocation
simplest

Single machine/
dev environment?

Model 3: HTTP Sidecar
polyglot, local

Need async/
batch processing?

Model 5: Event-Driven
scalable async

Building IDE/
CMS plugin?

Model 6: Plugin Mode
native UX

Model 4: Remote Runner
managed, secure

Comparison Matrix

CriteriaModel 1Model 2Model 3Model 4Model 5Model 6
LatencyLowestLowMediumMediumVariableLow
LanguagePythonAnyAnyAnyAnyPlatform
ComplexityLowLowMediumHighHighMedium
Multi-tenant❌❌❌✅✅❌
Async❌❌❌❌✅❌
Auth built-in❌❌✅✅✅❌
Streaming✅✅✅✅❌✅

By Use Case

Use CasePrimary ModelAlternative
SaaS support repliesModel 3/4Model 1
Meeting notesModel 2/5Model 1
SQL assistantModel 1Model 3
Code reviewModel 6/2Model 3
Marketing contentModel 3Model 5
Customer onboardingModel 4Model 3
Fraud detectionModel 5Model 4
Document Q&AModel 1/3Model 4
Sales coachingModel 5Model 2
Data migrationModel 2Model 1
Multi-agent routerModel 1/3Model 4
LocalizationModel 5/2Model 3

By Environment

Development

  • Recommended: Model 1 (SDK) or Model 2 (CLI)
  • Why: Fast iteration, easy debugging

Staging

  • Recommended: Model 3 (HTTP Sidecar)
  • Why: Mimics production, tests HTTP integration

Production

  • Recommended: Model 4 (Remote Runner) or Model 5 (Event-Driven)
  • Why: Scalable, secure, monitored

Configuration Consolidation

Using agents.yaml for All Config

You can consolidate serve configuration into your existing agents.yaml file instead of maintaining a separate serve.yaml:

yaml
# agents.yaml - unified configuration
framework: praisonai
topic: My Application

# Agent definitions
roles:
  assistant:
    role: AI Assistant
    goal: Help users
    tasks:
      respond:
        description: Respond to {query}

# Server configuration (optional section)
serve:
  host: 127.0.0.1
  port: 8765
  auth: api-key
  preload: true
  recipes:
    - my-recipe
    - another-recipe

Then start the server:

bash
praisonai serve recipe --config agents.yaml

This approach:

  • ✅ Single configuration file
  • ✅ Agent definitions + server config together
  • ✅ Easier to manage
  • ✅ Version control friendly

Best Practices

Let language decide the first branch

Python apps get the Embedded SDK’s lowest latency; anything else starts at CLI, Sidecar, or Remote Runner.

Match the model to the environment, not just the app

Dev favours SDK/CLI for fast iteration; production favours Remote Runner or Event-Driven for scale, auth, and monitoring.

Consolidate config in agents.yaml

A serve: section in agents.yaml keeps agent and server settings in one version-controlled file instead of a separate serve.yaml.

Reach for async models for batch work

Event-Driven is the only model with built-in async, so choose it when throughput and queued processing matter more than latency.


Related