TypeScript SDK Overview
The Erdo TypeScript SDK enables you to integrate Erdo’s AI agents directly into your applications. Whether you’re building a Next.js app, a Node.js backend, or a React frontend, the SDK provides everything you need to invoke agents and render their results.
Packages
Installation
Quick Start
1. Create an API Token
Get your API token from the Erdo dashboard.
2. Invoke an Agent
3. Stream Results
For real-time updates, use streaming:
4. Render Results in React
Never expose your API key to the browser. Use one of two secure patterns: ephemeral tokens or proxy streaming.
Option A: Ephemeral Tokens (Recommended)
Your backend creates a short-lived, scoped token. The frontend uses it to stream directly from the Erdo API.
Option B: Proxy Streaming
Your backend proxies the stream. The API key never leaves your server.
See Integration Patterns for complete examples of both approaches.
Use Cases
Embed Data Analysis
Add AI-powered data analysis to your existing application:
Use Erdo as a tool alongside your LLM for data-intensive queries:
Automated Reporting
Generate reports programmatically:
Environment Variables
Configure the SDK using environment variables:
Next Steps