Python SDK Guide
Use the roam-python package when you want to integrate ROAM into Python applications, automation workflows, and service-side tooling without giving up a script-friendly developer experience.
Why Choose The Python SDK
- Build Python services and internal tools that need direct access to ROAM capabilities.
- Add ROAM-backed workflow automation to notebooks, jobs, and lightweight application code.
- Move quickly with a familiar Python surface while staying aligned with the public ROAM contract.
Installation
pip install roam-python
What You Get
The Python SDK gives you:
- A Python-first client surface for integrating ROAM into application and automation code.
- Typed bindings over the public runtime model so Python code stays aligned with the supported ROAM contract.
- Utility helpers and examples that make it easier to adopt ROAM in real product and workflow scenarios.
Quick Start
from roam.mirror import ReflectionEngine
from roam.executor import GrpcServer
# Initialize reflection
engine = ReflectionEngine()
# Start server
server = GrpcServer()
server.run()
This is the fastest path when you want to stand up a Python-based integration, validate connectivity, and start building application logic around ROAM.
Runtime Augmentation
ROAM runtime calls can carry runtime-augmentation selection metadata so your application can attach stable request context before validation or execution.
Use the public runtime headers when you need ROAM behavior to reflect product context such as the calling tool, organization, or domain.
The key runtime headers are:
x-roam-runtime-augmentation-idto reference a specific augmentation identifierx-roam-runtime-augmentation-keyto reference a stable augmentation keyx-roam-tool-name,x-roam-tool-intent,x-roam-user-id,x-roam-organization-id,x-roam-domain-tags, andx-roam-table-namesto provide matching context
ROAM emits resolved augmentation identity into normal query events, while sensitive rendered content remains reserved for dedicated audit handling.
Suggested Starting Points
- Building automation, internal tools, or orchestration logic in Python: start here.
- Prototyping a ROAM integration before standardizing it across services: start here.
- Passing runtime context from application code into ROAM execution paths: start with the runtime-augmentation headers above.
Contributing
For Rust Core Changes
If you need to change the shared public runtime or core ROAM behavior:
- File an issue in roam-public
- Submit a PR to roam-public (see Contribution Workflow)
- Once merged and exported, the change flows to roam-python automatically
For Python Layer Improvements
To improve the Python experience, add helpers, or expand documentation:
- Fork roam-python
- Create a feature branch
- Make changes in
roam/(Python layer only) - Submit PR to roam-python/main
- We’ll review and merge
Example:
# Add a utility function
# roam/utils/config.py
def load_config_from_file(path: str) -> dict:
"""Load ROAM configuration from YAML file."""
...
API Reference
See the full API docs for the Python package surface, method signatures, and integration details.