Runnable examples and short guides for building with Riven.
Requires pip install riven-sdk and export RIVEN_API_KEY=rvn_....
| File | What it shows |
|---|---|
examples/python/01_chat.py |
A basic, non-streaming chat completion. |
examples/python/02_streaming.py |
Streaming a chat completion token-by-token. |
examples/python/03_council.py |
Creating a council task and reading the multi-model verdict. |
examples/python/04_research_task.py |
Creating, running, and polling a research task via the Computer API. |
Requires npm install @rivenai/sdk and export RIVEN_API_KEY=rvn_....
| File | What it shows |
|---|---|
examples/javascript/01_chat.mjs |
A basic, non-streaming chat completion. |
examples/javascript/02_streaming.mjs |
Streaming a chat completion token-by-token with async iteration. |
examples/curl.md — every endpoint called directly
with curl, including streaming and Computer API tasks. Useful if you're
not using Python or JavaScript, or just want to see the raw HTTP shape.
| Guide | Covers |
|---|---|
guides/quickstart.md |
From zero to first API call in 5 minutes — sign up, get a key, make your first request. |
guides/build-a-chatbot.md |
Build a production chatbot with streaming, context management, and multi-model routing. |
guides/choosing-a-model.md |
Which model to use for which kind of request, and how to check what's available to your account. |
guides/agent-tasks.md |
How the Computer API's task lifecycle works (research, synthesis, planner, council, probe). |
guides/mcp-setup.md |
Setting up riven-mcp with Claude Desktop, Cursor, or any MCP client. |
All examples need a Riven API key (prefixed rvn_), set as RIVEN_API_KEY
in your environment:
export RIVEN_API_KEY=rvn_...Full API reference: docs.rivenai.io
MIT © 2026 RivenAI. See LICENSE.