Skip to main content

Declarative framework for enterprise workflows with MCP integration - Client SDK

Project description

Memra SDK

A declarative orchestration framework for AI-powered business workflows. Think of it as "Kubernetes for business logic" where agents are the pods and departments are the deployments.

๐Ÿš€ Team Setup

New team member? See the complete setup guide: TEAM_SETUP.md

This includes:

  • Database setup (PostgreSQL + Docker)
  • Local development environment
  • Testing instructions
  • Troubleshooting guide

Quick Start

from memra.sdk.models import Agent, Department, Tool

# Define your agents
data_extractor = Agent(
    role="Data Extraction Specialist",
    job="Extract and validate data",
    tools=[Tool(name="DataExtractor", hosted_by="memra")],
    input_keys=["input_data"],
    output_key="extracted_data"
)

# Create a department
dept = Department(
    name="Data Processing",
    mission="Process and validate data",
    agents=[data_extractor]
)

# Run the workflow
result = dept.run({"input_data": {...}})

Installation

pip install memra

API Access

Memra requires an API key to execute workflows on the hosted infrastructure.

Get Your API Key

Contact info@memra.co for API access.

Set Your API Key

# Set environment variable
export MEMRA_API_KEY="your-api-key-here"

# Or add to your shell profile for persistence
echo 'export MEMRA_API_KEY="your-api-key-here"' >> ~/.zshrc

Test Your Setup

python examples/accounts_payable_client.py

Architecture

The Memra platform consists of three main components:

  • Memra SDK (this repository): Client library for building and executing workflows
  • Memra Server: Hosted infrastructure for heavy AI processing tools
  • MCP Bridge: Local execution environment for database operations

Tools are automatically routed between server and local execution based on their hosted_by configuration.

Documentation

Documentation is coming soon. For now, see the examples below and in the examples/ directory.

Example: Propane Delivery Workflow

See the examples/propane_delivery.py file for a complete example of how to use Memra to orchestrate a propane delivery workflow.

Contributing

We welcome contributions! Please see our contributing guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Repository Structure

โ”œโ”€โ”€ examples/                       # Example workflows and use cases
โ”‚   โ”œโ”€โ”€ accounts_payable_client.py  # API-based accounts payable workflow
โ”‚   โ”œโ”€โ”€ accounts_payable_mcp.py     # MCP-enabled accounts payable workflow
โ”‚   โ”œโ”€โ”€ invoice_processing.py       # Simple invoice processing example
โ”‚   โ””โ”€โ”€ propane_delivery.py         # Propane delivery domain example
โ”œโ”€โ”€ memra/                          # Core SDK package
โ”‚   โ”œโ”€โ”€ __init__.py                 # Package initialization
โ”‚   โ”œโ”€โ”€ tool_registry.py            # Tool discovery and routing
โ”‚   โ””โ”€โ”€ sdk/                        # SDK components
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ client.py               # API client
โ”‚       โ”œโ”€โ”€ execution_engine.py     # Workflow execution
โ”‚       โ””โ”€โ”€ models.py               # Core data models
โ”œโ”€โ”€ docs/                           # Documentation
โ”œโ”€โ”€ tests/                          # Test suite
โ”œโ”€โ”€ local/dependencies/             # Local development setup
โ””โ”€โ”€ scripts/                        # Utility scripts

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

memra-0.2.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

memra-0.2.2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file memra-0.2.2.tar.gz.

File metadata

  • Download URL: memra-0.2.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for memra-0.2.2.tar.gz
Algorithm Hash digest
SHA256 09fe9b9de07c211c85bc6c0909ba4e962dff1e59ca3f114202de0bd5781d840f
MD5 85d59566a23c94e57977e9ed90432644
BLAKE2b-256 476176a7ba237a5823f97407e25c8f0db762e2d395258a1542fe43071788c65c

See more details on using hashes here.

File details

Details for the file memra-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: memra-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for memra-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 63ef618cb139245d5c107b9e20c5264f2b10a79d40dd7c71c1a960d0eb9e9971
MD5 70360c466a518bb218068b435d68a3d7
BLAKE2b-256 d91a76a41b38ba9349dab6dd56bd7850b2d36f851abc46233e982ac3c58a9db5

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