Getting Started with Temporal
OpenBox integrates with Temporal by wrapping the worker process — your workflows, activities, and agent logic stay exactly as they are.
One Code Change
The entire integration is a single import swap:
- Temporal
- OpenBox
worker.py
import asyncio
from temporalio.client import Client
from temporalio.worker import Worker
from your_workflows import YourWorkflow
from your_activities import your_activity
async def main():
client = await Client.connect("localhost:7233")
worker = Worker(
client,
task_queue="agent-task-queue",
workflows=[YourWorkflow],
activities=[your_activity],
)
await worker.run()
asyncio.run(main())
worker.py
import os
import asyncio
from temporalio.client import Client
from openbox import create_openbox_worker # Changed import
from your_workflows import YourWorkflow
from your_activities import your_activity
async def main():
client = await Client.connect("localhost:7233")
# Replace Worker with create_openbox_worker
worker = create_openbox_worker(
client=client,
task_queue="agent-task-queue",
workflows=[YourWorkflow],
activities=[your_activity],
# Add OpenBox configuration
openbox_url=os.getenv("OPENBOX_URL"),
openbox_api_key=os.getenv("OPENBOX_API_KEY"),
)
await worker.run()
asyncio.run(main())
Choose Your Path
I already use Temporal
Add the trust layer to your existing agent in 5 minutes. Install the SDK, swap one import, and your agent is governed.
I'm new to Temporal
Learn the core concepts (Workflows, Activities, Workers), then run the demo to see OpenBox in action.
Run the Demo
Clone, configure, and run the reference demo end-to-end.