Skip to content

This is archived documentation for Robota SDK v2.0.0. For the latest version, see the current documentation.

Robota SDK (v2.0.0) โ€‹

A powerful TypeScript library for building AI agents with multi-provider support, function calling, and tool integration.

๐Ÿš€ Why Choose Robota SDK? โ€‹

๐ŸŽฏ Streamlined Configuration โ€‹

  • Runtime Model Switching: Switch between AI providers and models dynamically using setModel()
  • Centralized Model Configuration: Single source of truth for model settings through defaultModel

๐Ÿ”’ Enterprise-Grade Type Safety โ€‹

  • 100% TypeScript: Complete type coverage โ€” any prohibited in production code
  • Compile-time Validation: Catch errors before they reach production
  • IntelliSense Everything: Full IDE support for all APIs

โšก Performance & Efficiency โ€‹

  • Streaming Support: Real-time responses from all providers with runStream()
  • Built-in Analytics: Monitor performance, costs, and usage patterns through plugins
  • Conversation Management: Built-in history tracking and context preservation

๐ŸŒ True Multi-Provider Freedom โ€‹

  • Provider Agnostic: Switch between OpenAI, Anthropic, and Google seamlessly
  • Unified Interface: Same code works with all providers
  • Cross-Provider Workflows: Mix different AI models in one workflow

๐ŸŒ Universal Platform Support โ€‹

  • Cross-Platform: Works in Node.js, browsers, and WebWorkers
  • Zero Breaking Changes: Existing code runs everywhere unchanged
  • Framework Agnostic: React, Vue, Svelte, or vanilla JavaScript
  • Security First: Proxy server patterns for secure browser deployment

Features โ€‹

  • Multi-Provider Support: OpenAI, Anthropic, Google AI with seamless switching
  • Cross-Platform Compatibility: Node.js, browsers, WebWorkers support
  • assignTask MCP Tools: Use @robota-sdk/agent-team for assignTask tool collection (team creation removed)
  • Type-Safe Function Calling: Zod schemas and tool integration
  • Plugin System: Extensible architecture with conversation history, analytics, and error handling plugins
  • Streaming Support: Real-time responses from all providers
  • Conversation Management: Built-in history and context management
  • Team Workflow Analysis: Generate flowcharts and relationship diagrams
  • Modular Architecture: Clean separation of concerns

Quick Start โ€‹

Single Agent โ€‹

typescript
import { Robota } from '@robota-sdk/agent-core';
import { OpenAIProvider } from '@robota-sdk/agent-provider-openai';

const openaiProvider = new OpenAIProvider({ apiKey: process.env.OPENAI_API_KEY });

const robota = new Robota({
  name: 'MyAssistant',
  aiProviders: [openaiProvider],
  defaultModel: {
    provider: 'openai',
    model: 'gpt-4',
    systemMessage: 'You are a helpful AI assistant.',
  },
});

const response = await robota.run('Hello! How can I help you today?');
console.log(response);

assignTask MCP Tool Collection (team package) โ€‹

typescript
import {
  createAssignTaskRelayTool,
  listTemplatesTool,
  getTemplateDetailTool,
} from '@robota-sdk/agent-team';
import { Robota } from '@robota-sdk/agent-core';
import { OpenAIProvider } from '@robota-sdk/agent-provider-openai';

const openaiProvider = new OpenAIProvider({ apiKey: process.env.OPENAI_API_KEY });

const tools = [
  listTemplatesTool,
  getTemplateDetailTool,
  // NOTE: eventService must be ownerPath-bound via bindWithOwnerPath()
  createAssignTaskRelayTool(eventService),
];

const robota = new Robota({
  name: 'Assistant',
  aiProviders: [openaiProvider],
  defaultModel: {
    provider: 'openai',
    model: 'gpt-4',
  },
  tools,
});

const result = await robota.run('Summarize the advantages of TypeScript for large codebases.');
console.log(result);

Browser Usage โ€‹

typescript
// Works the same way in browsers!
import { Robota, LoggingPlugin } from '@robota-sdk/agent-core';
import { OpenAIProvider } from '@robota-sdk/agent-provider-openai';

const robota = new Robota({
  name: 'BrowserAgent',
  aiProviders: [
    new OpenAIProvider({
      apiKey: process.env.NEXT_PUBLIC_OPENAI_API_KEY, // or use proxy
    }),
  ],
  plugins: [
    new LoggingPlugin({ strategy: 'console', level: 'info' }), // browser-friendly
  ],
});

const response = await robota.run('Hello from browser!');

Installation โ€‹

bash
# Core package
npm install @robota-sdk/agent-core

# AI Providers (choose one or more)
npm install @robota-sdk/agent-provider-openai openai
npm install @robota-sdk/agent-provider-anthropic @anthropic-ai/sdk
npm install @robota-sdk/agent-provider-google @google/generative-ai

# assignTask tool collection (team package)
npm install @robota-sdk/agent-team

๐Ÿ“ฆ Package Ecosystem โ€‹

@robota-sdk/agent-core โ€‹

The Core Intelligence Hub

  • ๐Ÿง  Complete agent implementation with plugin system
  • ๐Ÿ”Œ Extensible architecture for custom functionality
  • ๐Ÿ“Š Built-in performance monitoring and analytics
  • ๐Ÿ› ๏ธ Type-safe tool integration framework

@robota-sdk/agent-provider-openai โ€‹

OpenAI Integration Excellence

  • โœจ Full GPT-4, GPT-3.5 model support
  • ๐Ÿ”„ Automatic retry with exponential backoff
  • ๐Ÿ“ˆ Token usage tracking and optimization
  • ๐Ÿ–ผ๏ธ Vision model support (GPT-4V)

@robota-sdk/agent-provider-anthropic โ€‹

Claude AI Mastery

  • ๐ŸŽญ Claude 3.5 Sonnet & Claude 3 family support
  • ๐Ÿ“š 100K+ token context window handling
  • ๐Ÿงช Advanced reasoning capabilities
  • ๐Ÿ”’ Privacy-focused AI interactions

@robota-sdk/agent-provider-google โ€‹

Google AI Innovation

  • ๐ŸŒŸ Gemini 1.5 Pro & Flash models
  • ๐ŸŽจ Native multimodal support
  • ๐Ÿ“ 1M+ token context capability
  • ๐Ÿš€ Fastest response times

@robota-sdk/agent-team โ€‹

assignTask Tool Collection

  • MCP-style tools: listTemplateCategories, listTemplates, getTemplateDetail, assignTask
  • Built-in templates stored in package JSON
  • Team creation removed; use Robota agents + assignTask tools instead

Documentation โ€‹

For Users โ€‹

For Developers โ€‹

  • Development - Development guidelines and setup
  • Project - Project roadmap and information
  • Packages - Individual package documentation

Supported Providers โ€‹

ProviderModelsFeaturesBest For
OpenAIGPT-4, GPT-3.5Function calling, streaming, visionGeneral purpose, code generation
AnthropicClaude 3.5 Sonnet, Claude 3Large context, advanced reasoningComplex analysis, ethical considerations
GoogleGemini 1.5 Pro, Gemini FlashMultimodal, long contextSpeed, multimedia processing

assignTask Tool Collection โ€‹

  • MCP-style tools - listTemplateCategories, listTemplates, getTemplateDetail, assignTask
  • Bundled templates - JSON templates shipped with @robota-sdk/agent-team
  • No team creation APIs - Use Robota agents + tools; relationships come from events/ownerPath only

๐ŸŽฏ Key Benefits โ€‹

  • Rapid Development: Build AI agents with minimal boilerplate code
  • Type Safety: Complete TypeScript coverage โ€” any prohibited in production code
  • Provider Flexibility: Easy switching between OpenAI, Anthropic, and Google AI
  • Extensible Architecture: Plugin system for custom functionality

License โ€‹

MIT License - see LICENSE file for details.

Released under the MIT License.