Declarative framework for enterprise workflows with MCP integration
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
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.
Examples
├── examples/
│ ├── accounts_payable_client.py # API-based example
│ ├── accounts_payable.py # Local example
│ ├── invoice_processing.py # Simple workflow
│ └── propane_delivery.py # Domain example
├── memra/ # Core SDK
├── logic/ # Tool implementations
├── local/dependencies/ # Database setup & schemas
└── docker-compose.yml # Database setup
✨ New: MCP Integration
Memra now supports Model Context Protocol (MCP) integration, allowing you to execute operations on your local infrastructure while leveraging Memra's cloud-based AI processing.
Key Benefits:
- 🔒 Keep sensitive data local - Your databases stay on your infrastructure
- ⚡ Hybrid processing - AI processing in the cloud, data operations locally
- 🔐 Secure communication - HMAC-authenticated requests between cloud and local
- 🛠️ Easy setup - Simple bridge server connects your local resources
Quick Example:
# Agent that uses local database via MCP
agent = Agent(
role="Data Writer",
tools=[{
"name": "PostgresInsert",
"hosted_by": "mcp", # Routes to your local infrastructure
"config": {
"bridge_url": "http://localhost:8081",
"bridge_secret": "your-secret"
}
}]
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memra-0.2.0.tar.gz.
File metadata
- Download URL: memra-0.2.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b027884abba383d5c892f1da7a326faf65a85e5d02366abc457e2c05d582520
|
|
| MD5 |
3551030f7ff2ef9870dd149c81f71414
|
|
| BLAKE2b-256 |
a36b492e56182e73bb1ed6b5002fc256d772779d1b34fe60248b483d06b87b09
|
File details
Details for the file memra-0.2.0-py3-none-any.whl.
File metadata
- Download URL: memra-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6920b26e0cdd8a04b05a1289d971b452c3364c7813b81aa76bd6e1243c44ef1
|
|
| MD5 |
d02707257687939fcb8d8f35f7f69efa
|
|
| BLAKE2b-256 |
858c7aae49fe83b7f569120c7a0747e16e36b3b05b45e521108cd3b4facc5052
|