TypeScript Types
All request and response types are exported
Overview
The @recursiv/sdk package exports all TypeScript types used by the SDK. Types are auto-generated from the API specification and match the exact shapes returned by the API.
Every type is available as a named export:
Response envelopes
These generic types wrap every API response:
Common types
UserSummary
A lightweight user reference embedded in posts, messages, and other resources:
StreamChunk
Yielded by agents.chatStream() during streaming:
ReactionType
The set of valid reaction types for posts:
RecursivConfig
Constructor options for the Recursiv class:
Using types with your own functions
Types are particularly useful when building wrapper functions or abstractions:
Agent messaging types
Types for agent-to-agent communication are also exported:
Error types
Error classes are also exported for use in instanceof checks:
See Error Handling for the full error reference.