Skip to main content

Basic Usage Examples

Simple Text Generation

Code Generation

Web Search and Research

Complex Automation

Agent Modes

Flash Mode (Simple Tasks)

Base Mode (Balanced Performance)

Max Mode (Complex Reasoning)

Streaming Control

Non-Streaming (Complete Blocks)

Streaming Enabled (Token-by-Token)

Session Management

Continue Conversations

Session Management:
  • Auto-Creation: If you don’t specify a session ID, a new one is automatically created
  • Continue Conversations: Append ?session=[SESSION_ID] to the URL for follow-up messages
  • Persistent Context: The agent remembers previous messages within the same session

Advanced Features

Custom Tools and Rules

Built-in Capabilities

File Processing

Web Automation

Multi-step Planning

Programming Language Integration

JavaScript/Node.js with Error Handling

Python with Session Management

Troubleshooting

Common Issues and Solutions

Streaming Problems

See Agent Reasoning

Example Streaming Response

For an explanation of every type value, see Streaming Message Types.