Mirra

Mirra SDK

The Mirra SDK provides a REST API platform for building, deploying, and monetizing AI agents and serverless functions. Developers can create custom assistants, integrate external APIs, and publish reusable components to the Mirra marketplace.

What You Can Build

The Mirra SDK enables you to create and monetize four types of components:

Agents

Custom AI assistants with access to tools, resources, and scripts. Agents can interact with users through natural language and execute complex workflows.

Scripts

Serverless functions written in Node.js or Python that execute on-demand. Scripts can process data, call external APIs, and respond to events.

Resources

API integrations and data sources that agents and scripts can access. Resources provide standardized interfaces to external services.

Templates

Pre-configured bundles of pages, scripts, and resources that users can install and customize. Templates accelerate development of common use cases.

Quick Start

Core Features

The Mirra SDK provides a complete platform for building and monetizing AI services:

REST API

All operations use simple HTTP endpoints with JSON payloads. No client libraries required—use any HTTP client in any language.

curl https://api.fxn.world/api/sdk/v1/scripts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First Script",
    "description": "A simple automation script",
    "runtime": "nodejs18",
    "code": "async function main(params) { return { success: true, input: params }; } module.exports = { main };"
  }'

Marketplace

Publish your agents, scripts, resources, and templates to the Mirra marketplace. Set your own pricing and earn revenue from users who install your work.

Pricing models:

  • Free (build reputation and user base)
  • Pay-per-use (charge per execution or API call)
  • Subscription (monthly or annual recurring revenue)

Type Safety

Full TypeScript support with automatically generated types for all API endpoints. Catch errors at compile time and get intelligent autocomplete in your editor.

Version Management

Create and manage multiple versions of your scripts and templates. Users can upgrade at their own pace, and you can deprecate old versions gracefully.

Dependency Resolution

Scripts automatically resolve and install npm or pip packages. Specify dependencies in your code, and the platform handles installation and caching.

Developer Portal

Manage your published work through a dedicated developer dashboard. Track usage analytics, respond to reviews, configure pricing, and monitor revenue.

Getting Started

To start building with the Mirra SDK:

  1. Get an API key - API keys are generated when you create scripts
  2. Create your first script - Deploy a serverless function in minutes
  3. Deploy a component - Publish your first script, resource, or template

Your First Script

Create a serverless function with a single API call:

curl https://api.fxn.world/api/sdk/v1/scripts \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Weather Checker",
    "description": "Fetches current weather data",
    "runtime": "nodejs18",
    "code": "async function main(params) { const { city } = params; return { success: true, message: `Weather data for ${city}` }; } module.exports = { main };",
    "isPrivate": false
  }'

The response includes an API key that you can use for authenticated requests. Store this key securely—it will only be shown once.

Key Concepts

Before diving deeper, understand these core concepts:

  • Authentication - API keys and bearer token authentication
  • Scripts - Serverless functions with event handlers
  • Resources - API integrations with OpenAPI specifications
  • Templates - Bundled components for common use cases
  • Error Handling - Standard error responses and status codes

Use Cases

The Mirra SDK is designed for:

  • AI Developers - Build and monetize custom AI agents and assistants
  • Integration Specialists - Create reusable API connectors for popular services
  • Automation Experts - Develop serverless functions for data processing and workflows
  • Template Creators - Package complete solutions for specific industries or use cases

Examples

See practical implementations in action:

Developer Portal

Once you're ready to publish and monetize your work:

  1. Introduction - Overview of the developer portal
  2. Getting Started - Set up your developer profile
  3. Creating Resources - Publish API integrations
  4. Creating Scripts - Deploy serverless functions
  5. Best Practices - Guidelines for successful components

Support

Get help and connect with the community:

  • Documentation - Comprehensive guides and API reference (you're reading it!)
  • Discord - Join our developer community for real-time help
  • Email - Contact support@oznetworks.xyz for technical assistance
  • FAQ - See frequently asked questions for common issues

See Also

On this page