Backend SDKs Overview
Official server-side SDKs for integrating Suada with your backend services
Introduction
Suada provides official backend SDKs to help you integrate AI-powered chat and analysis capabilities into your server-side applications. Our SDKs are designed with developer experience in mind, offering type safety, comprehensive documentation, and intuitive APIs.
Available SDKs
Node.js SDK
Modern JavaScript/TypeScript SDK
- Built-in TypeScript support
- Node.js 18+ compatibility
- LangChain integration
Python SDK
Pythonic SDK with async support
- Python 3.8+ support
- Pydantic type validation
- LangChain integration
Core Features
🔐 Authentication & Security
Both SDKs support secure authentication using API keys and include privacy features:
🤖 LangChain Integration
Both SDKs provide seamless integration with LangChain for advanced AI capabilities:
💬 Chat Interface
The chat endpoint is the primary way to interact with Suada. Both SDKs provide a consistent response format:
👤 User Context Management
Both SDKs support passthrough mode for integrating with your application’s user system:
Key Benefits
Type Safety
- Built-in TypeScript definitions (Node.js)
- Pydantic model validation (Python)
- IDE autocompletion support
- Runtime type checking
LangChain Support
- Tool creation for LangChain agents
- Memory management for conversations
- Custom agent configurations
- Structured prompt templates
Error Handling
- Structured error types
- Detailed error messages
- Automatic retry mechanisms
- Rate limit handling
Performance
- Connection pooling
- Automatic retries
- Concurrent request support
- Efficient resource management
Security
- Secure API key handling
- Privacy mode option
- User isolation in passthrough mode
- Rate limiting protection
Getting Started
-
Choose Your SDK
- Node.js: Modern JavaScript/TypeScript applications and web backends
- Python: Data science, AI/ML, or Python web applications
-
Installation
-
Configure Environment
-
Initialize Client
- Follow SDK-specific initialization
- Configure optional features
- Set up error handling
- Initialize LangChain tools if needed
-
Make Your First Request
- Send a test message
- Handle the response
- Implement error handling
Best Practices
Security
- Store API keys in environment variables
- Enable privacy mode for sensitive data
- Implement proper error handling
- Use secure user identification
LangChain Integration
- Use clear tool descriptions
- Implement proper memory management
- Handle agent errors gracefully
- Monitor agent performance
Performance
- Reuse SDK and agent instances
- Implement appropriate timeouts
- Handle rate limits gracefully
- Use async/await where available
Development
- Use type checking tools
- Write comprehensive tests
- Follow SDK-specific conventions
- Keep dependencies updated
FAQ
Which SDK should I choose?
- Choose Node.js for JavaScript/TypeScript applications and modern web backends
- Choose Python for data science, AI/ML applications, or Python web services
How do I handle rate limits?
Both SDKs implement automatic exponential backoff. You can customize retry behavior through configuration options.
Can I use the SDKs in serverless environments?
Yes, both SDKs are compatible with serverless environments like AWS Lambda, Google Cloud Functions, and Vercel.
How do I debug SDK issues?
Both SDKs provide detailed logging options:
- Node.js: Debug environment variable
- Python: Standard logging module
Is local development supported?
Yes, both SDKs support local development with:
- Custom base URLs
- Debug logging
- Test environments
- Mock responses
Support & Resources
Documentation
- Node.js SDK Documentation
- Python SDK Documentation
- LangChain Documentation (JavaScript)
- LangChain Documentation (Python)
Support
- Email: support@suada.ai