Skip to main content

ARK - Agent Reliability Kit. Trust infrastructure for AI agents.

Project description

ARK โ€” Agent Reliability Kit ๐Ÿ›ก

Trust infrastructure for AI agents. Stripe-level idempotency ร— Sentinel circuit breakers ร— OpenTelemetry tracing ร— IDE-style validation. For AI agents.

Tests Python Version License


๐Ÿค” Why ARK?

Your AI agent says it sent an email. Did it really? Your AI agent says it charged $10. Did it charge $10... or $100? Your AI agent retries on failure. Did it just send 3 duplicate payments?

"Agent does not actually invoke tools, only simulates tool usage with fabricated output" โ€” CrewAI Bug #?, 63 comments

ARK proves every agent action is real.

โšก Quick Start

pip install ark-trust
from ark import IdempotencyGuard, CircuitBreaker, OutputValidator

# ๐Ÿ›ก 1. Never run duplicate payments
guard = IdempotencyGuard()

@guard.wrap
def charge(amount: float):
    return stripe.charge(amount)

charge(99.99)  # โœ… Charged
charge(99.99)  # ๐Ÿ›ก Intercepted โ€” no duplicate!

# โšก 2. Auto-fallback when models fail
breaker = CircuitBreaker("gpt-4", failure_threshold=3)

result = breaker.call(
    primary=lambda: gpt4.generate(prompt),
    fallback=lambda: claude.generate(prompt)  # Auto-switch!
)

# ๐Ÿ”ง 3. Validate agent output
from pydantic import BaseModel

class PaymentResult(BaseModel):
    amount: float
    txn_id: str

validator = OutputValidator()
result = validator.validate(PaymentResult, agent_output)
if not result.valid:
    print(f"ARK blocked invalid output: {result.errors}")

๐Ÿ”ฑ The Four Pillars

Pillar Gene Source What It Does
๐Ÿ›ก Idempotency Guard Stripe payments Prevents duplicate tool execution
โšก Circuit Breaker Sentinel microservices Auto-meltdown โ†’ safe fallback
๐Ÿ”ง Output Validator IDE type checking Validates agent output against schema
๐Ÿ‘ Trace OpenTelemetry Full execution trace visibility

๐Ÿ“Š What ARK Catches

CrewAI agents fake tool calls     โ†’ ARK validates real execution
GPT-4 fails 6 times in a row      โ†’ ARK auto-switches to Claude
Agent retries a payment 3 times   โ†’ ARK blocks duplicates 2&3
Streaming response returns null   โ†’ ARK detects + reloads

๐ŸŽฏ The Numbers

  • 8847 error issues across top 3 agent frameworks
  • 50+ comments on a single "duplicate payment" bug
  • 75% of agent outputs need validation
  • 0 existing products in this space (max competitor: 129โญ)

๐Ÿ— Architecture

Your Agent
    โ†“
โ”Œโ”€โ”€โ”€ ARK Trust Layer โ”€โ”€โ”€โ”
โ”‚  ๐Ÿ›ก Guard   โšก Breaker โ”‚
โ”‚  ๐Ÿ”ง Validator ๐Ÿ‘ Trace โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ†“
Your Tools & APIs

๐Ÿš€ Roadmap

  • MVP โ€” 4 core pillars (v0.1.0)
  • LangChain integration โ€” ARKCallbackHandler (v0.1.0)
  • CrewAI integration โ€” ARKCrewCallback (v0.1.1)
  • Auto-detect frameworks (v0.2.0)
  • Reliability Score + Schema Registry โ€” 13 schemas (v0.2.0)
  • Dashboard UI โ€” real-time trust monitoring (v0.3.0)
  • Achievement system โ€” gamified reliability badges (v0.3.0)
  • PyPI publish automation (v0.3.0)
  • Community Schema Hub (v0.4.0)
  • Benchmarks โ€” 7 performance baselines (v0.4.0)
  • OpenTelemetry Exporter โ€” 8 reliability event types (v0.5.0)
  • Zero-touch instrumentation โ€” one env var to activate (v0.5.0)

๐Ÿ”ญ OpenTelemetry Integration (v0.5.0)

ARK reliability events are emitted to your observability stack via standard OTLP/JSON. Zero code changes to existing agents โ€” set one env var:

export ARK_OTEL_ENDPOINT="http://otel-collector:4318/v1/events"
Event Type Trigger
ark.idempotency.miss Tool first called
ark.guardian.intercept Duplicate call blocked (saves real ms)
ark.circuit.open Breaker tripped
ark.circuit.half_open Recovery probe
ark.circuit.close Service recovered
ark.validation.pass Output schema valid
ark.validation.fail Output schema invalid

Compatible with Langfuse, Jaeger, Tempo, Honeycomb โ€” any OTLP receiver.

โšก 5-Minute Live Demo

See ARK events flow into Langfuse with one command:

cd examples/langfuse-demo
docker compose up -d
pip install -e ../..
python app.py
# Open http://localhost:3000 โ†’ watch ARK reliability events stream in

๐Ÿ“œ License

MIT โ€” Free forever. ARK is open infrastructure.


Built with ๐Ÿงฌ gene recombination: Stripe ร— Sentinel ร— OpenTelemetry ร— IDE

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

ark_trust-0.5.1.tar.gz (67.7 kB view details)

Uploaded Source

Built Distribution

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

ark_trust-0.5.1-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

Details for the file ark_trust-0.5.1.tar.gz.

File metadata

  • Download URL: ark_trust-0.5.1.tar.gz
  • Upload date:
  • Size: 67.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ark_trust-0.5.1.tar.gz
Algorithm Hash digest
SHA256 06e0692b7cef61b089c337385c1f907a985e0e0045b3c343b4af6d876fc46730
MD5 d32fb57c2b8c37e7fdeb522e8627c219
BLAKE2b-256 c3b373fabc6904af91690a5f020def6445f6bb612230743eda5e7886bf411b90

See more details on using hashes here.

File details

Details for the file ark_trust-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: ark_trust-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 49.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ark_trust-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 adfd005d1c8dd414e4b5449282ce4b528a8fd67ab86c759a948290acb3296c0f
MD5 6a5104f6519419d647a5899e0072f084
BLAKE2b-256 e0e001eb970c5b45cd04a17c2d5535eb24eb58c108feeb383f12797773cf757c

See more details on using hashes here.

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