A Python SDK for Osmosis LLM training workflows: reward/rubric validation and remote rollout.
Project description
osmosis-ai
⚠️ Warning: osmosis-ai is still in active development. APIs may change between versions.
Python SDK for Osmosis AI training workflows. Supports two training modes with shared tooling for testing and evaluation.
Osmosis AI is a platform for training LLMs with reinforcement learning. You define custom reward functions, LLM-as-judge rubrics, and agent tools -- then Osmosis handles the training loop on managed GPU clusters. This SDK provides everything you need to build and test those components locally, from @osmosis_reward decorators and MCP tool definitions to a full CLI for running agents against datasets before submitting training runs.
Quick Start
Pick a training mode and follow the example repo:
- Local Rollout (recommended for most users): osmosis-git-sync-example
- Remote Rollout (custom agent architectures): osmosis-remote-rollout-example
Two Training Modes
Osmosis supports Local Rollout and Remote Rollout as parallel approaches to training with reinforcement learning:
| Local Rollout | Remote Rollout | |
|---|---|---|
| How it works | Osmosis manages the agent loop. You provide reward functions, rubrics, and MCP tools via a GitHub-synced repo. | You implement and host a RolloutAgentLoop server. Full control over agent behavior. |
| Best for | Standard tool-use agents, fast iteration, zero infrastructure | Custom agent architectures, complex orchestration, persistent environments |
| Example repo | osmosis-git-sync-example | osmosis-remote-rollout-example |
Installation
Requires Python 3.10 or newer. For development setup, see CONTRIBUTING.md.
Prerequisites
- Python 3.10+
- An LLM API key (e.g., OpenAI, Anthropic, Groq) -- required for
osmosis testandosmosis eval. See supported providers. - Osmosis account (optional) -- needed for platform features like
osmosis login, workspace management, and submitting training runs. Sign up at platform.osmosis.ai.
pip
pip install osmosis-ai # Core SDK
pip install osmosis-ai[server] # FastAPI server for Remote Rollout
pip install osmosis-ai[mcp] # MCP tool support for Local Rollout
pip install osmosis-ai[full] # All features
uv
uv add osmosis-ai # Core SDK
uv add osmosis-ai[server] # FastAPI server for Remote Rollout
uv add osmosis-ai[mcp] # MCP tool support for Local Rollout
uv add osmosis-ai[full] # All features
Local Rollout
Osmosis manages the agent loop. You provide reward functions, rubrics, and MCP tools via a GitHub-synced repo.
Get started: osmosis-git-sync-example | Docs
Remote Rollout
You implement and host a RolloutAgentLoop server. Full control over agent behavior.
Get started: osmosis-remote-rollout-example | Docs
Testing & Evaluation
Both modes share the same CLI tools: Test Mode | Eval Mode | CLI Reference
Contributing
See CONTRIBUTING.md for development setup, testing, linting, and PR guidelines.
License
MIT License - see LICENSE file for details.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file osmosis_ai-0.2.17.tar.gz.
File metadata
- Download URL: osmosis_ai-0.2.17.tar.gz
- Upload date:
- Size: 132.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87094a108d5e223c542c8c08d922e1e053b31bf7e548fe4390722fb5b4d0a953
|
|
| MD5 |
7333ec406d7cb6e3eb5cf474e09bbfb0
|
|
| BLAKE2b-256 |
67f8a50c12d88514a667811972916836266323ed3fd07da54f53b1566c4031d6
|
File details
Details for the file osmosis_ai-0.2.17-py3-none-any.whl.
File metadata
- Download URL: osmosis_ai-0.2.17-py3-none-any.whl
- Upload date:
- Size: 159.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a3ee9c57685162e45317c2d5bea85c2e6a26755c8d43177c9050e4f741953de
|
|
| MD5 |
10ee0c14f8fc08e0e20d35b41d2f9a96
|
|
| BLAKE2b-256 |
30618920eca4f7c94b4def98d20830c8f496ca56b4978ec66d26d650be62fd17
|