Required Folder Structure
Osmosis relies on convention-over-configuration to auto-discover your components. Set up the directories below, and everygit push will sync your tools, reward functions, and rubrics to the platform.
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 serverserver/mcp_server.py- FastMCP server configurationtools/- 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 modelsreward_rubric_anthropic.py- Rubric using Anthropic models
pyproject.toml - Dependencies
Defines your Python package dependencies:
Optional Directories
You can also include:tests/- Unit tests for your components.github/workflows/- CI/CD automationdocs/- Additional documentation
Next Steps
MCP Tools
Learn to create MCP tools
Reward Functions
Build reward functions
Reward Rubrics
Implement rubric scoring