Role: Build applications that use PraisonAI recipes to deliver AI-powered features to end users.
Primary Goals
- Integrate recipes into applications with minimal friction
- Handle errors gracefully to maintain good UX
- Optimize latency for responsive user experiences
- Stream results for real-time feedback
Recommended Integration Models
Embedded SDK
Best for Python apps - Lowest latency, direct integration
CLI Invocation
Best for scripts - Simple, language-agnostic
Local HTTP Sidecar
Best for microservices - Polyglot, HTTP-based
Plugin Mode
Best for extensions - IDE/CMS integration
Typical Workflow
1
Discover Available Recipes
2
Integrate into Application
3
Add Streaming for Better UX
4
Handle Errors Gracefully
Key Concerns
Latency Optimization
Error Recovery
User Experience
Common Patterns
Request-Response Pattern
Fire-and-Forget Pattern
Batch Processing Pattern
Troubleshooting
Recipe runs slowly
Recipe runs slowly
- Check network latency to recipe server
- Use streaming for perceived performance
- Consider caching for repeated inputs
- Profile to find bottlenecks
Intermittent failures
Intermittent failures
- Implement retry logic with exponential backoff
- Add circuit breaker for failing recipes
- Log errors with context for debugging
- Set appropriate timeouts
Memory issues
Memory issues
- Stream large outputs instead of buffering
- Process results incrementally
- Clear caches periodically
- Monitor memory usage
Security Checklist
- Validate user input before passing to recipes
- Don’t expose recipe errors directly to users
- Store API keys securely (env vars, secrets manager)
- Implement rate limiting on your API
- Log recipe calls for audit trail
- Sanitize recipe output before displaying
Next Steps
- Embedded SDK - Detailed Python integration
- Use Cases - Implementation patterns
- Platform/DevOps Persona - Deployment guidance

