Self-hosted deterministic execution for evaluators, reward functions, policy gates, and other bounded generated logic. The hosted endpoint exists for demos and evaluation. Production deployments run on your own gateway.
Your model or application calls the local gateway. No container boot. No per-task Docker startup. The strongest current fit is hot-path logic that benefits from determinism and bounded behavior, not arbitrary general-purpose code execution.
pip install synapserunfrom synapse import Synapse
client = Synapse(
base_url="http://localhost:8000",
)
result = client.execute_python("""
result = 0
for i in range(1, 11):
result = result + i
""")
print(result.result) # 55
print(result.latency_ms)sdk/js/ # in-repo package; start with the Python SDK for the most stable integration pathcurl -X POST http://localhost:8000/v1/execute/python \
-H "Content-Type: application/json" \
-d '{"code":"result = 21 + 21"}'from synapse.integrations import SynapseTool
tools = [SynapseTool(client)]
agent = initialize_agent(
tools, llm,
agent=AgentType.OPENAI_FUNCTIONS
)from synapse.integrations import SynapseCrewTool
agent = Agent(
role="compute",
tools=[SynapseCrewTool(client)]
)Synapse integrations are best used for bounded logic in agent loops, especially evaluators, reward functions, and policy gates.
Framework integrations call the same local gateway through the Python SDK. Start there if you want the simplest integration path.
Use Synapse when you need deterministic execution for generated logic.
Good fits right now: evaluators, reward functions, policy gates, bounded transforms, and auditable agent-side business logic.
Not a fit for arbitrary Linux workloads, general sandboxing, or a fully managed cloud execution platform.
The hosted gateway is for demos and evaluation. Production deployments run on your own infrastructure.
Synapse is not a generic code sandbox. It is deterministic, auditable execution for generated logic that needs to be replayable and defensible.