decart-oasis, is the thin client that talks to it: it handles the gRPC session and VP9/JPEG frame decoding, and nothing heavier.
Want to try it first? A playable, realtime web version of Oasis 3 Preview runs in your browser at oasis3-preview.decart.ai — drive the model live, no setup. To build with it, use the Python gRPC SDK below: install
decart-oasis and set DECART_API_KEY.Quick start
1
Install
2
Set your API key
3
Drive the world model
A2VClient is a context manager. Entering it calls initialize() (opening the session); exiting it calls close() (releasing the session and the gRPC channel) even if an error is raised.How a session works
Every interaction is one stateful session with four phases. The context-manager form above runs the lifecycle for you; you can also drive it explicitly:1
Initialize
Opens a session, authenticates, and negotiates the output format. Returns the streams the server advertises (for Oasis 3 Preview:
left_forward, front, right_forward).2
Prompt
Sets the scene the model generates. A new prompt resets the world-model context and the rollout, so the action sequence restarts. Call it before your first
infer, and again any time you want a fresh scene.3
Infer
Sends exactly four
[throttle, steering] actions and returns four generated frames for each stream. Call it in a loop to keep driving.4
Finish
Releases the session and the channel.
Authentication
Connecting requires a Decart API key. Pass it explicitly or set theDECART_API_KEY environment variable — the SDK reads the environment when no key is given.
Actions and frames
Eachinfer call is one client-visible tick: a chunk of four actions in, four frames per stream out.
A2VResult:
Actions must be finite and within
[-1, 1], and the chunk must be shape (4, 2) — otherwise infer raises ValueError before any request is sent.Streaming frames live
A2VClient accepts a frame_consumer: any object with submit(frames) and new_clip() methods (the FrameConsumer protocol). The client hands every decoded chunk to it as inference runs, so you can render or record without re-fetching. A ready-made notebook preview ships in oasis-demo (oasis_demo.live_preview.LiveCameraPreview).
Client configuration
Endpoint
The SDK uses the hosted endpoint by default. Override it per-client, or via theDECART_ROBOTICS_ENDPOINT environment variable with from_env():
After
Initialize, the load balancer pins the session by returning an x-session-target header. The SDK captures it and replays it on every later Prompt, Infer, and Finish — no action needed.API reference
Complete example
Error handling
All SDK errors derive fromDecartRoboticsError. Errors returned by the service are raised as A2VError, which carries the code, message, and details from the server.
Reinforcement learning
Because Oasis 3 Preview turns actions into the next frames in real time, it is a learned driving simulator you can train a policy in — set a scene, let an agent drive, and reward the behavior you want. The easiest way to see this end-to-end is our Colab notebook, which trains a small PPO policy to drive inside Oasis 3 Preview, with a live preview.Train a driving policy with RL in Oasis 3 Preview
Open the end-to-end Colab notebook
1
Drive the simulator by hand
Send a fixed chunk of
[throttle, steering] actions and stream the returned frames into a live left | front | right video with a collision-risk bar — a quick check that the API works.2
Score each step with a reward
A depth model on the
front frame measures how much of the scene is dangerously close. The reward rewards forward progress, penalizes net turning, and terminates the episode on a likely collision.3
(Optional) Warm-start with behavior cloning
Clone the policy on recordings of people driving Oasis so it starts from human-like driving instead of random exploration.
4
Train the policy with RL
PPO drives the agent in Oasis, scores each step with the reward, and improves the policy. Every step is a live Oasis call, so the loop is small by default — enough to see it work.
5
Watch it drive
Roll out one clean, deterministic episode of the policy you trained and watch it in the live preview.
Technical specifications
Next steps
Try Oasis 3 Preview live
Drive the model in your browser — a playable realtime web version, no setup.
RL training notebook
Train a PPO driving agent in Oasis 3 Preview end-to-end, with a live preview.
decart-robotics on GitHub
The SDK source, the RL examples, and the training notebook.
decart-oasis on PyPI
Install the lightweight Python SDK.
All Models
Compare all Decart models side by side.