Skip to main content

Mirobody is a Python package for processing and analyzing health data.

Project description

๐Ÿš€ Mirobody

Open Source AI-Native Data Engine for Your Personal Data

Demos Theta Wellness

Privacy-first data platform that bridges your data with the latest AI capabilities

Key Features:

  • ๐ŸŒ HTTP Remote MCP Server - Deploy and access MCP tools over HTTPS
  • ๐ŸŽฏ Claude Agent Skills Support - Develop tools using standard Skills format (SKILL.md)
  • ๐Ÿ”„ Universal Tool Adapter - Works with ChatGPT, Claude, Cursor, and more
  • ๐Ÿ”Œ Pluggable Data Providers - Connect any data source via Providers API
  • ๐Ÿค– Custom Agents - Create your own conversational agents via Agents API

๐Ÿ“– Table of Contents


โœจ Why Mirobody?

๐Ÿ”„ Write Tools Once, Run Everywhere

Forget about complex JSON schemas, manual bindings, or router configurations. In Mirobody, your Python code is the only definition required.

  • Tools built here instantly work in ChatGPT (via Apps-SDK) and the entire MCP Ecosystem (Claude, Cursor, IDEs).
  • Mirobody works simultaneously as an MCP Client (to use tools) and an OAuth-enabled MCP Server (to provide data), creating a complete data loop.
  • ๐ŸŒ HTTP Remote MCP Support: Mirobody supports HTTP-based remote MCP servers, enabling cloud deployments and cross-network tool access. Configure MCP_PUBLIC_URL to expose your MCP server over HTTPS for ChatGPT Apps and other remote integrations.

๐Ÿ’Ž Your Data Is an Asset, Not a Payload

Mirobody is built for Personal Intelligence, not just local storage. We believe the next frontier of AI is not knowing more about the world, but knowing more about you.

  • General AI creates generic answers. Mirobody uses your data to create a Personal Knowledge Base, enabling AI to give answers that are truly relevant to your life.
  • You can run the entire engine locally on your machine. We provide the architecture to unlock your data's value without ever compromising ownership.

๐Ÿค– Native Agent Engine

  • Powered by a self-developed agent engine that fully reproduces Claude Code's autonomous capabilities locally.
  • ๐ŸŽฏ Skills-Based Tool Development: Mirobody supports developing tools using Claude Agent Skills format (SKILL.md files). You can create reusable tools that work seamlessly across the MCP ecosystem. Simply structure your tools as Skills and drop them into the skills/ directory - Mirobody will automatically discover and expose them.
  • Designed to load Claude Agent Skills SKILL.md files, turning your private data into an actionable knowledge base.

๐Ÿฅ Theta Wellness: Our Health Intelligence App

Theta Wellness is our flagship application built on Mirobody, demonstrating the platform's capabilities in the Personal Health domain. We have built a professional-grade Health Data Analysis suite that showcases how Mirobody can handle the most complex, multi-modal, and sensitive data environments.

Key Features

  • ๐Ÿ“ฑ Broad Integration: Connects with 300+ devices, Apple Health, and Google Health.
  • ๐Ÿฅ EHR Ready: Compatible with systems covering 90% of the US population's Electronic Health Records.
  • ๐ŸŽฏ Multi-Modal Analysis: Analyze health data via Voice, Image, Files, or Text.

๐Ÿ’ก Empowering the Community

We are open-sourcing the Mirobody engine because the same architecture that powers our medical-grade Health Agent can power your business.

Whether you want to build a Finance Analyzer, Legal Assistant, or DevOps Bot, the infrastructure is ready. We focus on Health; you build the rest. Simply swap the files in the tools/ directory to start your own vertical.


โšก Quick Start

๐Ÿ‘‰ See QUICKSTART.md for a detailed, step-by-step guide.

1. Deploy via Docker

Initialize your environment in seconds:

# This repo uses Git LFS for some binary assets (e.g. mirobody/res/*.bin).
# Install it once before cloning, otherwise those files will be empty pointers:
#   macOS:  brew install git-lfs && git lfs install
#   Ubuntu: sudo apt install git-lfs && git lfs install

git clone https://github.com/thetahealth/mirobody.git
cd mirobody
./deploy.sh

Then open http://localhost:18080 in your web browser.

๐Ÿ“ Configuration Notes:

  • A .env file will be created automatically with two variables:
    • ENV: The name of the current config.
    • CONFIG_ENCRYPTION_KEY: A 32-byte string used for encrypting sensitive variablThe default configuration template is config.yaml. ๐Ÿ‘‰ See CONFIG.md for a detailed configuration guide. ๐Ÿ‘‰ See DATABASE.md for database schema and initialization details.

During deployment, a config.localdb.yaml (or similar env-specific file) is created for your overrides. default config values in this file.

  • Tip: Check EMAIL_PREDEFINE_CODES for predefined email accounts and verification codes used for user login.
  • LLM Setup: OPENROUTER_API_KEY is required for the Deep agent.
  • Auth Setup: To enable Google/Apple OAuth or Email Verification, set the respective variables in config.{env}.yaml.
  • All API keys will be encrypted automatically once Mirobody loads them using the CONFIG_ENCRYPTION_KEY value.

2. Create Your Tools

Mirobody adopts a "Tools-First" philosophy. No complex binding logic is required:

  • Python Tools: Drop your Python scripts into the tools/ directory. ๐Ÿ‘‰ See TOOLS.md for a developer guide.
  • Claude Agent Skills: Place SKILL.md files in the skills/ directory (content loaded directly as agent instructions)
  • โœจ Zero Config: The system auto-discovers your funtions and skills.
  • ๐Ÿ Pure Python: Use the libraries you love (Pandas, NumPy, etc.).
  • ๐ŸŽฏ Skills Support: Develop tools using Claude Agent Skills SKILL.md format - write instructions freely, they become agent context.
  • ๐Ÿ”ง Universal: A single tool file works for both REST API and MCP (local and remote HTTP).

Example Tools structure:

# tools/my_tools.py
def analyze_data(input_data: str) -> dict:
    """
    Description of this tool.

    Args:
        input_data: Description of this argument.

    Returns:
        Description of the return value.
    """
    return {"result": "analysis"}

๐Ÿ” JWT Authentication: If your tool requires JWT authentication, add a user_id: str parameter. This parameter will be automatically injected by Mirobody from the JWT token and should NOT be included in the docstring's Args section. Example:

# tools/my_authenticated_tools.py
def get_user_data(user_id: str, query: str) -> dict:
    """
    Retrieves user-specific data.

    Args:
        query: The search query.

    Returns:
        User data matching the query.
    """
    # user_id is automatically provided by Mirobody from JWT
    return {"user_id": user_id, "data": "..."}

๐ŸŽฏ Developing Tools with Claude Agent Skills

Mirobody supports the Claude Agent Skills specification, allowing you to create sophisticated, reusable tools:

  • ๐Ÿ“‹ Standards Compliant: Follows the official Agent Skills format with YAML frontmatter
  • ๐Ÿ” Auto-Discovery: Place Skills in the skills/ directory - Mirobody automatically detects and loads them
  • โœ๏ธ Flexible Content: SKILL.md body is loaded directly into agent context - write comprehensive instructions freely
  • ๐ŸŒ MCP Native: Skills work seamlessly across the entire MCP ecosystem

โš ๏ธ Current Implementation Status

Mirobody currently supports SKILL.md files with metadata.json. The following features from the full Agent Skills specification are not yet implemented:

  • โŒ scripts/ directory execution
  • โŒ references/ directory loading
  • โŒ assets/ directory resources
  • โŒ Sandbox environment for script execution
  • โŒ allowed-tools field enforcement

What works:

  • โœ… SKILL.md files with YAML frontmatter - loaded directly into agent context
  • โœ… metadata.json files - required by Mirobody for skill discovery

๐Ÿ’ก Simple but Powerful: The entire SKILL.md body becomes part of the agent's instructions. Write comprehensive guides, detailed workflows, examples, and troubleshooting tips - all will be available to the agent. Full specification support is planned for future releases.

A skill is a directory containing a SKILL.md file and a metadata.json file:

skills/
โ””โ”€โ”€ my-custom-skill/
    โ”œโ”€โ”€ metadata.json     # Required by Mirobody: Skill metadata for discovery
    โ””โ”€โ”€ SKILL.md          # Required by spec: Skill definition with YAML frontmatter

(Optional directories like scripts/, references/, and assets/ are defined in the specification but not yet supported by Mirobody)

metadata.json (Required by Mirobody):

{
  "name": "My Custom Skill",
  "summary": "Extract and analyze data from structured documents",
  "when_to_use": [
    "When user needs to process CSV, Excel, or JSON files",
    "When data extraction or transformation is required",
    "When statistical analysis of structured data is needed"
  ],
  "when_not_to_use": [
    "For unstructured text documents",
    "For image or video processing",
    "When simple file reading is sufficient"
  ],
  "tags": ["data-analysis", "csv", "excel", "statistics"]
}
Field Description Required
name Display name of the skill (can be human-readable with spaces) Yes
summary Brief description for quick reference Yes
when_to_use Array of use case scenarios Yes
when_not_to_use Array of scenarios to avoid this skill Yes
tags Array of tags for categorization Yes

๐Ÿ“ Note:

  • metadata.json is a Mirobody-specific requirement for skill discovery and IDE integration. It's not part of the official Agent Skills specification.
  • The name in metadata.json is for display purposes (can contain spaces and capitals).
  • The name in SKILL.md frontmatter must follow the strict naming convention (lowercase, hyphens only, matching directory name).

SKILL.md Example (Required by Specification):

---
name: my-custom-skill
description: Extract and analyze data from structured documents. Use when working with CSV, Excel, or JSON files that need parsing, transformation, or statistical analysis.
license: MIT
metadata:
  author: your-org
  version: "1.0.0"
---

# My Custom Skill

This skill provides comprehensive data extraction and analysis capabilities for structured documents.

## Instructions

1. **Identify the file format** - Check if the input is CSV, Excel, or JSON
2. **Parse the document** - Use appropriate parsing techniques for the file type
3. **Validate data** - Ensure data integrity and handle missing values
4. **Perform analysis** - Apply requested statistical or transformation operations
5. **Return results** - Format output according to user preferences

## Available Tools

You can use the following MCP tools to accomplish this task:
- Use file reading tools to access the document
- Use data processing tools for transformation
- Use statistical analysis tools for calculations

## Edge Cases

- Handle missing or malformed data gracefully
- Support multiple encodings (UTF-8, Latin-1, etc.)
- For large files, consider processing in manageable chunks

## Example Usage

When user provides sales_data.csv with columns: date, product, revenue
1. Read and parse the CSV file
2. Group data by month
3. Calculate monthly revenue totals
4. Identify trends and generate summary report

๐Ÿ’ก SKILL.md Flexibility

The SKILL.md file content is loaded directly into the agent's context when the skill is activated. This means:

  • โœ๏ธ Write freely: Structure your instructions however works best for your use case
  • ๐Ÿ“ No format restrictions: Use any markdown format - lists, tables, code blocks, etc.
  • ๐ŸŽฏ Be as detailed as needed: Include step-by-step guides, examples, edge cases, or troubleshooting tips
  • ๐Ÿงฉ Think of it as a prompt: The content becomes part of the agent's instructions, so write clearly and comprehensively

The agent will read and follow everything you write in the body section, so make it as helpful and detailed as necessary!

Required Frontmatter Fields:

Field Description Constraints
name Skill identifier (must match directory name) 1-64 chars, lowercase, hyphens only, no leading/trailing hyphens
description What the skill does and when to use it 1-1024 chars, include keywords for discoverability

Optional Frontmatter Fields:

Field Description Example
license License identifier MIT, Apache-2.0, Proprietary
compatibility Environment requirements Requires pandas, numpy, and network access
metadata Additional custom properties author, version, category
allowed-tools Pre-approved tools (not yet enforced) Bash(git:*) Read Write

๐Ÿ’ก Mirobody Requirements: In addition to the standard SKILL.md file, Mirobody requires a metadata.json file for skill discovery and categorization. This is a Mirobody-specific requirement and not part of the official Agent Skills specification.

๐ŸŒ HTTP Remote MCP Server

Mirobody's MCP server supports HTTP/HTTPS remote access, enabling:

  • Cloud Deployments: Deploy your MCP server on any cloud platform
  • ChatGPT Apps: Integrate with OpenAI's ChatGPT Apps via HTTPS
  • Cross-Network Access: Access tools from anywhere, not just localhost
  • OAuth Security: Secure remote access with OAuth authentication

To enable remote HTTP access, set MCP_PUBLIC_URL in your config.{env}.yaml:

MCP_PUBLIC_URL: "https://yourdomain.com"

Your MCP server will then be accessible at the configured HTTPS endpoint, ready for remote integrations.


๐Ÿ” Access & Authentication

Once deployed, you can access the platform through the local web interface or our official hosted client.

1. Access Interfaces

Interface URL Description
Local Web App http://localhost:18080 Fully self-hosted web interface running locally.
Official Client https://mirobody.ai Recommended. Our official web client that connects securely to your local backend service.
MCP Server (Local) http://localhost:18080/mcp For Claude Desktop / Cursor integration via local connection.
MCP Server (Remote HTTP) https://yourdomain.com/mcp ๐ŸŒ HTTP Remote MCP Support - For ChatGPT Apps and remote integrations. Set MCP_PUBLIC_URL in your config file to enable HTTPS access.

MCP Integration

Mirobody supports both local and remote HTTP MCP connections:

Local Connection (Cursor/Claude Desktop):

{
  "mirobody_mcp": {
    "command": "npx",
    "args": [
      "-y",
      "universal-mcp-proxy"
    ],
    "env": {
      "UMCP_ENDPOINT": "http://localhost:18080/mcp"
    }
  }
}

Remote HTTP Connection (ChatGPT Apps, Cloud Deployments):

Configure MCP_PUBLIC_URL in your config.{env}.yaml:

MCP_PUBLIC_URL: "https://yourdomain.com"

Then access your MCP server via HTTPS at the configured URL. This enables:

  • โœ… ChatGPT Apps integration
  • โœ… Cross-network tool access
  • โœ… Cloud-based deployments
  • โœ… Secure OAuth-enabled remote MCP access

2. Login Methods

You can choose to configure your own authentication providers or use the pre-set demo account.

  • ๐Ÿ” Social Login: Google Account / Apple Account (Requires configuration in config.yaml)
  • ๐Ÿ“ง Email Login: Email Verification Code (Requires configuration in config.yaml)
  • ๐ŸŽฎ Demo Account (Instant Access):
    • Users: demo1@mirobody.ai, demo2@mirobody.ai, demo3@mirobody.ai (More demo users configurable in config.yaml)
    • Password: 777777

๐Ÿ”Œ API Reference

Mirobody provides standard endpoints for integration:

Endpoint Description Protocol
/mcp MCP Protocol Interface JSON-RPC 2.0
/api/chat AI Chat Interface OpenAI Compatible
/api/history Session Management REST

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details on how to submit pull requests, report issues, and contribute to the project.


Built with โค๏ธ for the AI Open Source Community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mirobody-1.0.50.tar.gz (8.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mirobody-1.0.50-py3-none-any.whl (8.5 MB view details)

Uploaded Python 3

File details

Details for the file mirobody-1.0.50.tar.gz.

File metadata

  • Download URL: mirobody-1.0.50.tar.gz
  • Upload date:
  • Size: 8.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for mirobody-1.0.50.tar.gz
Algorithm Hash digest
SHA256 894f7376f208f195e433e77d7d21714a0a6a236ff5304aa4542da34e2779a959
MD5 707fdd6c6819ef527365fc2208418a48
BLAKE2b-256 757bbb42e3cb952994865c3db2843be93e1839ef573fc8e7c92bf91652d9028c

See more details on using hashes here.

File details

Details for the file mirobody-1.0.50-py3-none-any.whl.

File metadata

  • Download URL: mirobody-1.0.50-py3-none-any.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for mirobody-1.0.50-py3-none-any.whl
Algorithm Hash digest
SHA256 a76538675afcffbfd8fea0306018e783f65d6ab799b5af03b5cdae71615a35d1
MD5 2fe2f4e69c48d4abd21eb2c534faa58e
BLAKE2b-256 3ad115821e7a5cce82891ff7f37c70c0387bf2b0499fd90c5c6b7a2fd18d027c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page