Overview
The Upstreet Agents SDK is the first React-based SDK for building and deploying headless AI agents, locally and in the cloud.
React Agents is a groundbreaking framework that brings the power and familiarity of React to AI agent development. Built on React's reconciliation engine, it enables developers to create intelligent, autonomous agents using the same tools and patterns they love from React development.
Quick Start
Core Concepts
The React Agents Architecture
React Agents leverages the React Reconciler API to create a custom renderer specifically designed for AI agents. This architecture provides several key advantages:
- Server-First Design: Optimized for server-side execution
- Platform Agnostic: Ready for multi-platform and edge deployments
- Declarative: Uses React's component model and lifecycle
- Type Safety: Full TypeScript support throughout the stack
Traditional React vs React Agents
Let's compare how you'd implement similar functionality in traditional React versus React Agents:
Traditional React
React Agents
The key difference lies in the focus: traditional React components render user interfaces, while React Agents components render agent behaviors and capabilities.
Core Components
Agent
The root component that initializes an agent instance.
Action
Defines discrete capabilities that an agent can perform.
How It Works
React Agents operates through a sophisticated pipeline:
- JSX Transformation: Your component code is transformed into an agent execution plan
- Prompt Generation: The execution plan is converted into a series of prompts
- Chain-of-Thought Runtime: Prompts are processed through a reasoning engine
- Action Execution: The agent performs actions based on its reasoning
- State Updates: Results are reconciled back through React's system
Best Practices
1. Schema Definition
Always define precise schemas for your actions:
2. Provide Examples
Include clear examples for better agent understanding:
3. Error Handling
Implement robust error handling in your handlers:
Command Reference
For a complete list of available commands and their usage, refer to our Command Reference Guide.
Advanced Topics
Custom Renderers
Create specialized renderers for unique use cases:
State Management
Integrate with existing React state management solutions: