A collection of standalone example projects showing how to use @webamigos/ragen-sdk-ts and the Ragen API.
Each example lives in its own folder under examples/ and is fully independent — install and run it directly, no workspace setup required.
| Example | Description |
|---|---|
nextjs-example |
Next.js (App Router) app that calls the Ragen SDK from a server action triggered by a button click. |
express-example |
Express server exposing a POST /ask endpoint that proxies questions to the Ragen SDK. |
express-streaming-example |
Express server that streams Ragen completions over SSE and chunked plain text, with a browser demo page. |
express-embedded-chat-example |
Embedded chat widget on Ragen's native /v1/chat: sends the host page as context and renders model reasoning separately from the answer. |
fastify-example |
Fastify server with schema-validated POST /ask endpoint that calls the Ragen SDK. |
hono-streaming-example |
Hono server that streams Ragen completions back to the client over SSE and chunked plain text. |
aws-lambda-example |
AWS Lambda handler bundled with esbuild and deployable via AWS SAM behind an HTTP API. |
nestjs-example |
NestJS app with an injectable RagenService wired through a Nest module and exposed via a POST /ask controller. |
Pick an example, then follow its README:
cd examples/nextjs-example
cp .env.example .env.local # fill in RAGEN_API_KEY and RAGEN_ASSISTANT_ID
npm install
npm run devYou will need a Ragen API token and an Assistant ID — see the Ragen docs for setup.
Pull requests with new examples or improvements to existing ones are very welcome. See CONTRIBUTING.md for the layout, naming conventions, and PR checklist. CI runs tsc --noEmit against every example on every PR.
Licensed under the Apache License 2.0. See NOTICE for
attribution requirements.
Security issues go through SECURITY.md, never a public issue.