Saibre for Python. Data control for agentic execution.

    Data control for agentic execution. An in-process replacement for your model calls — no proxy, no gateway, no service to deploy. Your OpenAI, Anthropic, and Gemini requests are masked inside your own process before the SDK ever sends a byte.

    bash
    pip install saibre

    On PyPI: pypi.org/project/saibre

    Adding it to an existing agent is a two-line diff:

    diff
      from openai import OpenAI
    + import saibre
    
    - client = OpenAI()
    + client = saibre.wrap_openai(OpenAI())
    
      # every call through this client is masked in-process. Nothing else changes.
    python
    from openai import OpenAI
    import saibre
    
    client = saibre.wrap_openai(OpenAI())
    
    # Secrets in the prompt are masked in-process, before the SDK sends anything.
    response = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": f"Audit this config: {config}"}],
    )

    The wrapper covers sync and async clients, streaming responses, and tool inputs — the same masking applies on every path.

    Every other entry point is one line

    python
    # Anthropic and Gemini, same shape
    client = saibre.wrap_anthropic(Anthropic())
    client = saibre.wrap_google_genai(genai.Client())
    
    # LangChain: wrap the chat model you already build
    llm = saibre.wrap_langchain(ChatOpenAI(model="gpt-4o"))
    
    # Google ADK agents
    agent = saibre.wrap_google_adk(my_adk_agent)
    
    # Or guard any function that talks to a model
    @saibre.guard
    def summarize(document: str) -> str:
        ...

    One honest footnote: Raw binary file uploads (files.upload) need an explicit mask_file() call.

    Built for agents, not just chat calls

    An agent leaks through more than its prompts: tool calls, retrieval, memory writes, sub-agent handoffs, and the traces you ship to an observability backend all carry the same data. A gateway in front of the model never sees those paths. Because Saibre runs inside your process, it covers the execution graph, not just the chat completion.

    That's also why it works with locally deployed models. A cloud gateway adds nothing when the model is on your own hardware; an in-process wrapper works the same either way.

    Saibre ships two ways. Saibre Desktop protects the whole machine at the network level. Saibre for Python protects the code you write — agents, scripts, backends — in-process. Same engine, different deployment.

    saibre on PyPI

    The package ships as readable Python source — the code you audit is the code you install.

    Free for development, personal, and non-commercial use. Running it in production? Contact us.

    Building for yourself, not just your code?

    Get Saibre Desktop