Skip to main content

Self-Evolving AI Agent SDK - Make any AI agent 20-50% smarter automatically

Project description

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

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zubbl_sdk-0.4.0.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zubbl_sdk-0.4.0-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file zubbl_sdk-0.4.0.tar.gz.

File metadata

  • Download URL: zubbl_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zubbl_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6506c39f18d05e16ee205b4b90ab17c3dcf2df93ac0f68a64ce883c03a0edc44
MD5 945785af30e31e1606b78fdb5758a239
BLAKE2b-256 1f3e2949d26ff00733f7a43b3699bcbafd207cc9fdb593290b47779e48e84ecc

See more details on using hashes here.

Provenance

The following attestation bundles were made for zubbl_sdk-0.4.0.tar.gz:

Publisher: publish.yml on anupammaurya6767/zubbl-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zubbl_sdk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: zubbl_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 37.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zubbl_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4aa07cb95582aaca3fd623160798b2abb9b4c923b96265288693d9bbdb91fb32
MD5 58752b2d264f058e4f459c679f13d90d
BLAKE2b-256 807ac7b565b9a3843fbab41d00504f55295ee00a1d7990459bccb75ca5dca8c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for zubbl_sdk-0.4.0-py3-none-any.whl:

Publisher: publish.yml on anupammaurya6767/zubbl-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page