Skip to main content

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

  1. Choose Your SDK
    • Node.js: Modern JavaScript/TypeScript applications and web backends
    • Python: Data science, AI/ML, or Python web applications
  2. Installation
  3. Configure Environment
  4. Initialize Client
    • Follow SDK-specific initialization
    • Configure optional features
    • Set up error handling
    • Initialize LangChain tools if needed
  5. 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

Support