Skip to main content

Required Folder Structure

Your repository must follow this structure for Osmosis to automatically discover your components: An example repository can be found here: https://github.com/Osmosis-AI/osmosis-git-sync-example

Directory Breakdown

mcp/ - MCP Tools Directory

Contains your Model Context Protocol tools that extend AI agent capabilities. Key files:
  • main.py - Entry point for the FastMCP server
  • server/mcp_server.py - FastMCP server configuration
  • tools/ - Directory containing individual tool modules

reward_fn/ - Reward Functions Directory

Contains deterministic reward functions decorated with @osmosis_reward. Example:
  • compute_reward.py - Your reward function implementations

reward_rubric/ - Reward Rubrics Directory

Contains LLM-based evaluation functions decorated with @osmosis_rubric. Example:
  • reward_rubric_openai.py - Rubric using OpenAI models
  • reward_rubric_anthropic.py - Rubric using Anthropic models

pyproject.toml - Dependencies

Defines your Python package dependencies:
[project]
name = "my-osmosis-repo"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
    "osmosis-ai>=0.1.0",
    "fastmcp>=0.1.0",
]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

What Gets Synced?

When you push changes to your repository, Osmosis automatically:
  1. Discovers MCP Tools - Functions with @mcp.tool() in mcp/tools/
  2. Registers Reward Functions - Functions with @osmosis_reward in reward_fn/
  3. Syncs Reward Rubrics - Functions with @osmosis_rubric in reward_rubric/
  4. Updates Platform - Changes reflect in Osmosis within minutes

Optional Directories

You can also include:
  • tests/ - Unit tests for your components
  • .github/workflows/ - CI/CD automation
  • docs/ - Additional documentation

Next Steps