Skip to main content

Open-source agent operations SDK — integration discovery, security scanning, autonomy rules, HITL primitives, and capability management for Python agentic systems.

Project description

agent-operations-sdk

Give Python agents the ability to operate real organization systems — CRMs, WMSes, email, databases, admin consoles, arbitrary web apps — with onboarding-time integration discovery, security scanning, autonomy rules, human-in-the-loop primitives, and test-before-publish staging.

Status: Alpha (0.1.0, in development). Extracted from iv-bknd's AT (Agent Technology Department) agent, consolidating patterns from skill-builder, nanoclaw, and mcp-tester. Pre-release — see docs/TODO.md.

Why this exists

Every agent framework needs to let agents do things in the real world. Building that safely means solving nine hard problems simultaneously:

  1. Discover how to talk to a system (API? scraper? browser?)
  2. Generate a working client
  3. Scan it for dangerous patterns
  4. Register it as agent-callable tools
  5. Permission-gate who can use what
  6. Pause the agent and ask a human when needed
  7. Escalate high-risk actions to HITL
  8. Roll back when something breaks
  9. Audit every decision for later

This SDK bundles all nine. One install, one configuration, done.

Install (pre-release)

pip install -e 'git+https://github.com/95percent-ai/agent-operations-sdk.git#egg=agent-operations-sdk[all]'

Once published, just:

pip install agent-operations-sdk

Quickstart

import asyncio
from agentops.agent import AgentTechDept
from agentops.runtime import MemoryChannel, ToolOutcome
from agentops.credentials import Credential
from agentops.credentials.store import AuthType

async def main():
    # 1. Spin up the ops agent — one line, everything wired up
    at = AgentTechDept(channel=MemoryChannel())
    await at.load_default_policy()  # reads allowed, writes ask, rest deny

    # 2. Register an integration (auto-scans for security)
    status = await at.register_remote(
        name="crm",
        url="https://crm.example.com/sse",
        token="...",
    )
    # status is IntegrationStatus.GREEN / AMBER / RED / PENDING

    # 3. Store credentials so the agent doesn't see tokens
    await at.credentials.store.put(
        "crm", Credential("real-token", auth_type=AuthType.BEARER, system="crm"),
    )

    # 4. Grant an agent scoped access
    await at.assign("sales-bot", "crm", allowlist=["get_contact", "create_order"])

    # 5. Hand the agent a Toolbelt; executor is YOUR business logic
    async def executor(qualified, params):
        # Use at.credentials.authorized_client("crm") or your own dispatch
        return {"ok": True, "called": qualified}

    tools = at.for_agent("sales-bot", executor=executor)

    # 6. Agent calls tools — autonomy gate + HITL + audit automatic
    r = await tools.execute_capability("crm.get_contact", params={"id": "C-1"})
    assert r.outcome == ToolOutcome.OK

asyncio.run(main())

See examples/minimal/autonomy_hitl.py for a complete runnable version showing all four decision outcomes (ALLOW / ASK / HITL / DENY) with a 3-layer policy.

Components

Module Purpose
agentops.registry Register / resolve / unregister integrations (MCP, OpenAPI, REST, local).
agentops.security Schema + code + pattern scanning; quarantine for red flags.
agentops.discover 12-tier integration discovery — HTTPS → TLS fingerprint → Playwright → cache relay.
agentops.capability Capability generation, staging, test-before-publish with automated rollback.
agentops.autonomy Rule-based decision engine with audit trail.
agentops.runtime Agent-facing toolbelt + pluggable HITL channel.
agentops.credentials Credential proxy — secrets never visible to agent code.
agentops.worker Background task queue + health loops.
agentops.agent.AgentTechDept Battery-included reference agent.
agentops.integrations.langgraph First-class LangGraph nodes.
agentops.integrations.deepagents deepagents wrapper.
agentops.integrations.generic Framework-agnostic adapter.
agentops.testing Fake MCP + fake target system + pytest fixtures for users' tests.

Design principles

  • Extract, don't copy. Patterns from production (AT, skill-builder, nanoclaw) are ported with added tests that prove real behavior.
  • No mockup success. Every feature has at least one test that exercises it against a realistic fake server and asserts on observable behavior — not "function returned True."
  • Rollback-first. Any state-modifying action can be reverted.
  • Credentials never cross the agent boundary. Proxy injects auth; agent code cannot read secrets.
  • Autonomy is data. Rules are readable, editable, auditable — never hardcoded.
  • Security as a layer, not a feature. Every registration / generation / assignment passes through Scanner.

License

MIT. Free for commercial use, no obligations.

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

agent_operations_sdk-0.4.0.tar.gz (79.8 kB view details)

Uploaded Source

Built Distribution

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

agent_operations_sdk-0.4.0-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_operations_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 79.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for agent_operations_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 521ef24c0395cd6fe7526aa6d81b5ce3e94a602f9a906c0d531029f2de373487
MD5 82d1dc8c0f93ffcedfbb9b718b072167
BLAKE2b-256 51fa4cb57a8e865822cc5cc036e8f4bc33df7e11fa718e408f15b54c20cc1111

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_operations_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a069572110fced28b314672fdb168bd76ea21ccb11a33bbe9b5ece6b0f685030
MD5 576f64fc66af531664916059585f9ba6
BLAKE2b-256 718a499c770b69ca99a35223cc4a804e9652ab07e517f38e19dbf9a8e53672d3

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