Skip to main content

Zubbl SDK

Self-Evolving AI Agent SDK — Wrap any AI agent. It learns, recovers from failures, and gets better over time.

Install

pip install zubbl-sdk

Quick Start (3 Lines)

from zubbl import ZubblClient

zubbl = ZubblClient(api_key="zubbl_xxx")
agent = zubbl.wrap(your_agent)

result = agent("Review this PR for security issues")

That's it. Your agent now:

  1. Auto-recovers from failures — retries with fixes, no crash
  2. Learns from every run — records trajectories, extracts patterns
  3. Injects proven strategies — prepends natural-language guidance before each task
  4. Gets better over time — policies improve as data accumulates

How It Works

wrap(agent) → Agent runs → Trajectory recorded
                              ↓
                     Patterns extracted by task type
                              ↓
                     Policy built (confidence grows with data)
                              ↓
                     Next run: natural-language guidance prepended
                              ↓
                     Agent performs better — zero code changes

Framework Examples

OpenAI

import openai
from zubbl import ZubblClient

client = openai.OpenAI()
zubbl = ZubblClient(api_key="zubbl_xxx")

def my_agent(task):
    return client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": task}],
    ).choices[0].message.content

agent = zubbl.wrap(my_agent)
result = agent("Write unit tests for auth.py")

LangChain

from langchain_openai import ChatOpenAI
from zubbl import ZubblClient

llm = ChatOpenAI(model="gpt-4o")
zubbl = ZubblClient(api_key="zubbl_xxx")

agent = zubbl.wrap(llm.invoke)
result = agent("Explain this error traceback")

Any Callable

zubbl = ZubblClient(api_key="zubbl_xxx")
agent = zubbl.wrap(any_function_that_takes_a_task)

Auto-Recovery

When your agent fails, Zubbl catches the error and retries with a fix:

agent = zubbl.wrap(my_agent)  # auto_recover=True by default

# If my_agent crashes internally:
# 1. Zubbl catches the error
# 2. Applies a fix (prompt patch, retry, model swap)
# 3. Returns the correct result
# No crash. No code change.

Custom Policy Hook

Control exactly how learned strategies are injected:

def my_hook(args, policy):
    task = args[0]
    tips = "\n".join(policy.recommended_actions[:3])
    return (f"Tips from past runs:\n{tips}\n\nTask: {task}",) + args[1:]

agent = zubbl.wrap(my_agent, policy_hook=my_hook)

Dashboard

  1. Agent runs are recorded automatically
  2. Visit app.zubbl.in to view trajectories and rate runs
  3. Your feedback improves policies — no code changes needed

Research Foundations

Built on peer-reviewed research:

  • Training-Free GRPO (2025) — compact policy injection
  • AgentHER (2026) — learn from failures via hindsight relabeling
  • ETO (ACL 2024) — contrastive trajectory optimization
  • Reflexion (NeurIPS 2023) — verbal self-reflection on failures

License

MIT

Metadata

Release files for zubbl-sdk 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zubbl-sdk 0.4.0
File Size Uploaded Provenance
zubbl_sdk-0.4.0.tar.gz 34.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zubbl-sdk 0.4.0
File Interpreter ABI Platform
zubbl_sdk-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 71.8 kB

Release files / zubbl_sdk-0.4.0.tar.gz

Download URL zubbl_sdk-0.4.0.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6506c39f18d05e16ee205b4b90ab17c3dcf2df93ac0f68a64ce883c03a0edc44
BLAKE2b-256 checksum
How to use checksums
1f3e2949d26ff00733f7a43b3699bcbafd207cc9fdb593290b47779e48e84ecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.

Transparency log

Release files / zubbl_sdk-0.4.0-py3-none-any.whl

Download URL zubbl_sdk-0.4.0-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4aa07cb95582aaca3fd623160798b2abb9b4c923b96265288693d9bbdb91fb32
BLAKE2b-256 checksum
How to use checksums
807ac7b565b9a3843fbab41d00504f55295ee00a1d7990459bccb75ca5dca8c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.

Transparency log

Security for zubbl-sdk 0.4.0

Provenance

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for zubbl_sdk-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.

Transparency log

A note on package security

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page