Developer SDK

Embed AI in Any Application

Developer-first SDK for seamless AI integration. Build applications withAI avatars, deploy agents from our marketplace, and integrate security automation. Production-ready tools, comprehensive TypeScript support, and framework-specific optimizations.

0+ weekly downloads
0/5 developer rating
0 framework integrations

5-Minute Quickstart

0 min setup

Step 1: Install SDK

Add the Swfte SDK to your project

npm install @swfte/sdk

Framework Integrations

Purpose-built SDKs for your favorite frameworks and libraries.

React Integration

import { useSwfte } from '@swfte/react';

function ChatComponent() {
  const { createChat, loading } = useSwfte();

  const handleMessage = async (message) => {
    const response = await createChat({
      agent: 'support-bot',
      message: message,
      stream: true
    });

    return response;
  };

  return (
    <div className="chat-container">
      {/* Your chat UI */}
    </div>
  );
}
Install Framework SDKterminal
npm install @swfte/react

Features Included

TypeScript definitions included
Tree-shakeable ES modules
Framework-specific optimizations
Hot module replacement support
Comprehensive error handling
Built-in development tools

Built for Developers

Everything you need to build, test, and deploy AI-powered applications with production-ready SDKs. Comprehensive developer tools, enterprise-grade security, and intelligent automation capabilities for modern software development.

Lightning Fast Integration

Get up and running in minutes with our developer-first SDK. Intuitive APIs, comprehensive TypeScript support, and zero-config setup.

  • One-line initialization
  • Auto-generated TypeScript types
  • Hot module replacement support
  • Built-in error handling

Framework Agnostic

Works seamlessly with React, Vue, Angular, Svelte, or vanilla JavaScript. Purpose-built SDKs for each framework with idiomatic patterns.

  • React hooks and components
  • Vue 3 composables
  • Angular services and pipes
  • Svelte stores and actions

Production Ready

Enterprise-grade security, comprehensive error handling, and built-in monitoring. Designed for scale from prototype to production.

  • Automatic retry logic
  • Circuit breaker pattern
  • Request/response middleware
  • Built-in analytics

Optimized Performance

Minimal bundle size, intelligent caching, and streaming responses. Optimized for both developer experience and end-user performance.

  • Tree-shakeable modules
  • Automatic response caching
  • WebSocket streaming
  • Background sync

Integration Patterns

Choose the right integration pattern for your architecture.

Easy

Frontend Integration

Embed AI directly into your React, Vue, or Angular applications with real-time streaming and beautiful UI components.

Use Cases:

Chat InterfacesReal-time AssistanceForm Auto-completion
Medium

Backend Integration

Integrate AI processing into your Node.js, Python, or Go backends with robust error handling and scalable patterns.

Use Cases:

API EndpointsBackground JobsData Processing
Advanced

Webhook Integration

Set up event-driven AI workflows that respond to external events and integrate with your existing systems.

Use Cases:

Event ProcessingAutomated WorkflowsThird-party Integrations

Production Examples

Real-world examples you can copy and customize.

Real-time Chat ComponentChatComponent.tsx
import { useSwfte, StreamingResponse } from '@swfte/react';
import { useState } from 'react';

interface Message {
  id: string;
  content: string;
  role: 'user' | 'assistant';
  timestamp: Date;
}

export function ChatComponent() {
  const [messages, setMessages] = useState<Message[]>([]);
  const [input, setInput] = useState('');
  const { stream, loading } = useSwfte();

  const sendMessage = async () => {
    if (!input.trim()) return;

    const userMessage: Message = {
      id: crypto.randomUUID(),
      content: input,
      role: 'user',
      timestamp: new Date()
    };

    setMessages(prev => [...prev, userMessage]);
    setInput('');

    const assistantMessage: Message = {
      id: crypto.randomUUID(),
      content: '',
      role: 'assistant',
      timestamp: new Date()
    };

    setMessages(prev => [...prev, assistantMessage]);

    await stream({
      agent: 'support-agent',
      message: input,
      onChunk: (chunk) => {
        setMessages(prev => prev.map(msg =>
          msg.id === assistantMessage.id
            ? { ...msg, content: msg.content + chunk }
            : msg
        ));
      }
    });
  };

  return (
    <div className="chat-container">
      <div className="messages">
        {messages.map(message => (
          <div key={message.id} className={message.role}>
            {message.content}
          </div>
        ))}
      </div>
      <div className="input-area">
        <input
          value={input}
          onChange={(e) => setInput(e.target.value)}
          onKeyPress={(e) => e.key === 'Enter' && sendMessage()}
          placeholder="Type your message..."
          disabled={loading}
        />
        <button onClick={sendMessage} disabled={loading}>
          Send
        </button>
      </div>
    </div>
  );
}
Backend API Integrationapi/agents.ts
import { SwfteClient } from '@swfte/node';
import { NextApiRequest, NextApiResponse } from 'next';

const client = new SwfteClient({
  apiKey: process.env.SWFTE_API_KEY!,
  environment: 'production'
});

export default async function handler(
  req: NextApiRequest,
  res: NextApiResponse
) {
  if (req.method !== 'POST') {
    return res.status(405).json({ error: 'Method not allowed' });
  }

  try {
    const { message, userId, agentId } = req.body;

    // Validate input
    if (!message || !userId || !agentId) {
      return res.status(400).json({
        error: 'Missing required fields'
      });
    }

    // Create chat completion
    const response = await client.chat.create({
      agent: agentId,
      message: message,
      context: {
        userId: userId,
        timestamp: new Date().toISOString(),
        requestId: crypto.randomUUID()
      },
      stream: false
    });

    // Log for analytics
    console.log('Chat completion:', {
      userId,
      agentId,
      responseLength: response.content.length,
      duration: response.metadata.duration
    });

    res.status(200).json({
      message: response.content,
      metadata: response.metadata
    });

  } catch (error) {
    console.error('Chat API error:', error);
    res.status(500).json({
      error: 'Internal server error'
    });
  }
}

Developer Tools Included

Everything you need for a smooth development experience.

CLI Development Tools

Scaffold, test, and deploy agents from command line

Inspector & Debugger

Real-time debugging and performance profiling

Analytics Dashboard

Monitor usage, performance, and costs in real-time

Interactive Documentation

Live examples, API explorer, and tutorials

Development Workflow

1
Initialize project
swfte init my-agent
2
Develop locally
swfte dev --watch
3
Test integration
swfte test --coverage
4
Deploy to staging
swfte deploy --env staging
5
Ship to production
swfte deploy --env production

Start Building with AI Today

Join 0+ developers already building with our SDK. Get started in minutes.

Free developer account
No credit card required
Deploy in 5 minutes

Frequently Asked Questions

What is an embeddable agent orchestration SDK?
An embeddable agent orchestration SDK is a developer toolkit that lets you integrate AI agent capabilities directly into your applications with just a few lines of code.
How quickly can I integrate the composable intelligence framework?
Most developers can integrate basic agent capabilities in under 2 hours. Full orchestration features typically take 1-2 days to implement with our comprehensive documentation.
Are the plug-play cognitive components customizable?
Yes! Every component is fully customizable with theming, behavior modifications, and white-label options for seamless brand integration.

Complete Your AI Stack