Node SDK
Package:@seasonlabs/era-node
new Era(options)
Creates the Node SDK client.
era.turnContext(messages, options?)
Returns the context block to add to your system prompt. The conversation must
end with a user message, and a visitorId must be available on the client or
the call.
"", so your agent can continue without Era
context. Read the full method reference.
messagesToTurns(messages)
Converts common chat-message objects into the normalized turns sent to Era.
turnContext() already calls this function, so most integrations do not need
to call it directly.
Vercel AI SDK helpers
Package:@seasonlabs/era-node/ai-sdk
withEra(model, era, options?)
Wraps a Vercel AI SDK model and adds Era context before every model call.
eraMiddleware(era, options?)
Returns the Era middleware when you want to compose it with other Vercel AI SDK
middleware.
Web SDK
Package:@seasonlabs/era-web
new EraWeb(options)
Creates a browser client with a publishable key.
Methods
See the Web SDK client reference
Flutter SDK
Package:era_flutter
EraFlutter(...)
Creates a Flutter client with a publishable key.
Methods
The optional
EraFlutterStorage interface has three methods:
getString(key), setString(key, value), and remove(key). Implement it only
when you need storage other than the default SharedPreferencesAsync.
Flutter failures throw EraFlutterException. It exposes code, message,
retryable, and statusCode, and provides toString() for logging.
See the Flutter SDK client reference
Exported values and types
The Node SDK also exportsVERSION, EraMode, EraLogger, EraOptions,
EraMessage, EraTurn, and TurnContextOptions. See Node SDK types.
The Web SDK exports EraWebError, EraWebOptions, VerificationType,
VerificationChallenge, VerificationStatus, and VerificationConfirmation.
See Web SDK types and Web SDK errors.
The Flutter package exports EraFlutterException, EraFlutterStorage,
VerificationType, VerificationChallenge, VerificationStatus, and
VerificationConfirmation. See Flutter SDK types and
Flutter SDK errors.