Build with Mavaia
Comprehensive SDK, API documentation, and module development resources for building sovereign cognitive systems
Quick Start
Installation
pip install mavaia-corePython Client
from mavaia_core import MavaiaClient
client = MavaiaClient()
# Generate with cognitive orchestration
response = client.generate(
query="Explain quantum entanglement",
reasoning_strategy="tree_of_thought",
memory_enabled=True
)
print(response["result"])OpenAI-Compatible API
import openai
client = openai.OpenAI(
base_url="http://localhost:8000/v1",
api_key="not-needed"
)
response = client.chat.completions.create(
model="mavaia-cognitive",
messages=[{"role": "user", "content": "..."}]
)
print(response.choices[0].message.content)API Reference
Chat Completions
OpenAI-compatible endpoint with extended cognitive capabilities
POST /v1/chat/completions
{
"model": "mavaia-cognitive",
"messages": [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Explain relativity"}
],
"temperature": 0.7,
"stream": false
}Module Execution
Direct access to individual brain modules
POST /v1/modules/{module_name}/execute
{
"operation": "generate",
"params": {
"query": "...",
"reasoning_strategy": "tree_of_thought",
"memory_enabled": true
}
}Memory Operations
Store and retrieve from the Memory Graph
POST /v1/modules/memory_graph/execute
{
"operation": "store_memory",
"params": {
"content": "Important information to remember",
"context": {"topic": "quantum_physics"}
}
}
POST /v1/modules/memory_graph/execute
{
"operation": "retrieve_memory",
"params": {
"query": "quantum physics",
"limit": 5
}
}Module Development
Extend Mavaia's capabilities by building custom brain modules
Creating a Custom Module
from mavaia_core.brain.base_module import BaseBrainModule, ModuleMetadata
from typing import Any
class CustomAnalyzer(BaseBrainModule):
"""Custom module for domain-specific analysis"""
@property
def metadata(self) -> ModuleMetadata:
return ModuleMetadata(
name="custom_analyzer",
version="1.0.0",
description="Domain-specific analysis module",
operations=["analyze", "classify", "extract"],
dependencies=["numpy", "scikit-learn"],
enabled=True,
model_required=False
)
def execute(self, operation: str, params: dict[str, Any]) -> dict[str, Any]:
"""Execute the requested operation"""
if operation == "analyze":
return self._analyze(params)
elif operation == "classify":
return self._classify(params)
elif operation == "extract":
return self._extract(params)
else:
raise ValueError(f"Unknown operation: {operation}")
def _analyze(self, params: dict[str, Any]) -> dict[str, Any]:
text = params.get("text", "")
# Your custom analysis logic
return {
"analysis": {...},
"confidence": 0.95
}
# Module is automatically discovered and available via:
# POST /v1/modules/custom_analyzer/executeAuto-Discovery
Place your module in the modules directory and it's automatically discovered, registered, and available via API.
Isolated Execution
Each module runs independently with automatic metrics tracking, error handling, and resource management.
Composable Workflows
Modules can call other modules, enabling complex cognitive workflows and multi-step reasoning.
Testing & Validation
Built-in testing framework and evaluation harness for validating module behavior and performance.
Resources
GitHub Repository
Access the source code, examples, and contribute to Mavaia's development.
View on GitHub →Module Development Guide
Comprehensive guide for building, testing, and deploying custom brain modules.
Read the guide →Request Private Deployment
Deploy Mavaia within your institutional boundaries. No cloud dependency, full governance control.
Contact SalesBecome a Design Partner
Shape Mavaia's development alongside government agencies and research institutions.
Developer Access
Explore the SDK, API documentation, and module development resources.