A compiler and runtime for AI agent workflows: faster and cheaper runs, with side effects protected and every change checked by a firewall.
pip install halfabyte-synapse==0.3.3 Copy PIP instructions
pip install halfabyte-synapse synapse demo That runs a built-in sample on a fake provider, with no key needed. To use it on your own agent, change one line:
import synapse from openai import OpenAI client = synapse.wrap(OpenAI()) # your calls behave as before # ...run your agent... print(client.synapse_report()) # real calls, tokens, repeats and waste Nothing leaves your process. Or point base_url at synapse proxy, or at a hosted workspace. The package is halfabyte-synapse; the command and the import are both synapse.
Built by team Half a Byte for the BitNBuild 2026 "Around the World" final round (GDG On Campus, Fr. Conceicao Rodrigues College of Engineering), AI/ML problem statement 2.
Agents run steps one after another even when nothing connects them, repeat calls they have already made, and send context nobody reads. Fixing that by hand is easy to get wrong: run two steps together, and a model may answer differently. Cache a step, and an email may never get sent.
Held-out tasks on Groq qwen/qwen3.8-27b, memoize and parallelize, cold cache. Costs use Groq's listed prices.
Fake-provider demos measure scheduling, not a model, so don't read them as model performance. "Verified" here means on these tasks, not proven for every input.
Every step has one, and it decides what Synapse may do. An undeclared tool is assumed to be external.
synapse passes prints each one's safety rule, and synapse explain PASS explains one.
from synapse import Effect, node, workflow @node(kind="retrieval", target="web_search", effect=Effect.READ, staleness_s=3600) def search(query: str) -> list[str]: ... @node(kind="io", target="send_email", effect=Effect.EXTERNAL) def send(text: str) -> str: ... @workflow(name="my_agent") def my_agent(question: str): ... Multi-agent workflows wrap steps in with agent("researcher"):, and they're still one graph.
Prompts and answers never leave your process with wrap. A report holds model names, timings, token counts, a one-way hash of each request and the workflow's shape.
Hosted, the Connect screen gives you a private address per provider, such as https://HOST/w/TOKEN/groq/v1. Your key goes through to your provider and is never stored. Prompts stay in memory for up to 24 hours, and never reach disk. It can also run the concurrency audit on your own model.
synapse proxy --upstream https://api.groq.com/openai/v1 Point your client's base_url at http://127.0.0.1:8030/v1. Synapse records every call and serves exact repeats only when temperature is 0. GET /synapse/report shows the waste. It sees model calls, not your tools. Streaming isn't supported yet.
synapse mcp is an MCP server with 21 tools, such as optimize, why_not_optimized, verify, savings and inject_fault. synapse skill --target openclaw installs a lean Skill instead (hermes, claude or a folder also work). Start a new agent session afterwards.
synapse bot gives you tappable WhatsApp menus through Twilio, and buttons in Slack. Send hi, or type a command such as health, spend, verify research_fanout, chaos research_fanout crash, pending or ship. Only signed requests from allowed numbers get in. Nothing runs live, and ship refuses anything the firewall hasn't approved. Email is outbound only.
synapse bot --port 8010 ngrok http 8010 # any tunnel works; set SYNAPSE_BOT_URL to its address Install options pip install "halfabyte-synapse[ui]" # the API server pip install "halfabyte-synapse[cloud]" # MongoDB or Atlas as the store pip install "halfabyte-synapse[ml]" # the learned pass policy pip install "halfabyte-synapse[all]" # all of the above, plus benchmark loaders pip install "halfabyte-synapse[crewai]" # or [langgraph], or [adk] crewai and adk can't share an environment, because their OpenTelemetry requirements clash.
Settings live in .env, and models live in models.yaml. Everything is optional.
Runs are stored locally by default, as digests rather than full outputs, for 30 days, with a 256 MB cache. synapse storage shows what's held.
Half a Byte: Aryan Lomte (Aryan-lomte05), Radhesh (rad117), Aditya (02Aditya2323), Advay Chavan (advay1608).
Author: Aryan Lomte, Radhesh, Aditya, Advay Chavan
ui ml bench cloud crewai langgraph adk dev all
ai-agents llm compiler optimization workflow intermediate-representation agent-runtime scheduling caching profiling observability mcp benchmarking groq ollama crewai langgraph google-adk whatsapp
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




