Metadata-Version: 2.4
Name: zocrity
Version: 0.1.0
Summary: Budget-Safe AI Agents with Local Caching and Circuit Breakers.
Home-page: https://agentegineroom.replit.app
Author: Zocrity
License: MIT
Project-URL: Homepage, https://agentegineroom.replit.app
Project-URL: Repository, https://github.com/zocrity/zocrity
Project-URL: Documentation, https://agentegineroom.replit.app/start
Keywords: ai,agents,safety,budget,llm,openai,langchain,circuit-breaker
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: openai>=1.0.0
Requires-Dist: httpx>=0.24.0
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.20.0; extra == "anthropic"
Provides-Extra: litellm
Requires-Dist: litellm>=1.0.0; extra == "litellm"
Provides-Extra: crewai
Requires-Dist: crewai>=0.1.0; extra == "crewai"
Provides-Extra: llama-index
Requires-Dist: llama-index-core>=0.10.0; extra == "llama-index"
Provides-Extra: server
Requires-Dist: fastapi>=0.110.0; extra == "server"
Requires-Dist: uvicorn>=0.27.0; extra == "server"
Provides-Extra: all
Requires-Dist: langchain-core>=0.1.0; extra == "all"
Requires-Dist: anthropic>=0.20.0; extra == "all"
Requires-Dist: litellm>=1.0.0; extra == "all"
Requires-Dist: crewai>=0.1.0; extra == "all"
Requires-Dist: llama-index-core>=0.10.0; extra == "all"
Requires-Dist: fastapi>=0.110.0; extra == "all"
Requires-Dist: uvicorn>=0.27.0; extra == "all"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# 🛑 Zocrity — The Emergency Brake for AI Agents

**Stop API hallucination loops before they drain your budget.** Zocrity wraps your agent runs with a hard stop so runaway retries, repeated prompts, and token spirals don’t turn into surprise cloud bills.

---

## 🚀 For Replit Users (The 1-Click Install)

If you’re already in this workspace, just hit **Fork** and you’re basically done.

Then feed your own Agent this exact prompt:

```text
Agent: Look at the zocrity/ folder. Import the shield into my main file, wrap my LLM calls in the @zocrity.guard(budget=2.00) decorator, and add ZOCRITY_MAX_SPEND=5.00 to my Secrets.
```

---

## 🧰 For Local / Non-Replit Users (The Manual Install)

If you’re building outside Replit, just copy the `zocrity/` folder into the root of your project and import it like any other package.

### Using VS Code or Cursor?

Because this is a Replit-native launch, you should:

1. Download the `zocrity/` folder from this workspace
2. Drop it into the root of your local project
3. Add `import zocrity` wherever your LLM stack starts
4. Add `ZOCRITY_MAX_SPEND` to your `.env` file

```env
ZOCRITY_MAX_SPEND=5.00
```

---

## ✨ Features

- **Thread-safe micro-budgets** with `zocrity.guard(budget=...)`
- **Per-feature tagging** with `tag="..."`
- **Loop detection** for repeated prompt spirals
- **Local telemetry** for spend tracking and audit trails

---

## 🧪 Example

```python
import zocrity

zocrity.shield()

@zocrity.guard(budget=2.00, tag="checkout_flow")
def run_checkout_agent():
    return do_llm_work()

with zocrity.guard(budget=0.50, tag="summary_job"):
    run_llm_summary()
```

---

## 🔒 What It Does

Zocrity watches your agent loops locally and stops them when the budget is hit. It’s built for developers who want guardrails without giving up control.

---

## 🏁 That’s It

If your agent spends money, it needs a brake pedal.
