Skip to main content

Framework-agnostic middleware for approving or denying AI agent tool calls.

Project description

Doberman

Framework-agnostic middleware for approving or denying AI agent tool calls before they execute.

Doberman sits between an AI agent and its tools. Instead of allowing an agent to directly execute a function, the call is first routed through Doberman, which decides whether to allow or block it based on user-defined policies or an interactive approval prompt.

Features

  • Approve or deny tool calls before execution
  • Allow once / deny once
  • Always allow / always deny
  • Persistent permission storage (policies.json)
  • CLI for managing permissions
  • Framework-agnostic design
  • Zero external runtime dependencies

Installation

pip install doberman-agent

Or install from source:

git clone https://github.com/DakshSharma304/Doberman.git
cd Doberman
pip install -e .

Quick Example

from doberman import doberman

tool_call = {
    "tool": "gmail",
    "args": {
        "action": "send_email",
        "to": "alice@example.com",
        "subject": "Hello",
        "body": "Hi!"
    }
}

tools = {
    "gmail": gmail_tool
}

result = doberman(tool_call, tools)

If the permission has never been seen before, Doberman asks the user:

Doberman permission request

Tool: gmail
Action: send_email

1 = Allow once
2 = Always allow
3 = Deny once
4 = Always deny

Future requests follow the stored policy automatically.

Example

A complete Gemini + Gmail example is included:

examples/gemini_gmail_agent.py

Install the example dependencies:

pip install -r requirements-examples.txt

CLI

List permissions:

doberman list

Allow permissions:

doberman allow gmail.send_email

Allow multiple permissions:

doberman allow gmail.send_email gmail.read_latest

Deny permissions:

doberman deny gmail.send_email

Remove permissions:

doberman remove gmail.send_email

Project Structure

doberman/
    __init__.py
    cli.py
    doberman.py
    policy.py

examples/
    gemini_gmail_agent.py

Roadmap

  • Desktop approval dialog
  • Wildcard policies (gmail.*)
  • Conditional policies
  • Framework adapters (OpenAI, Anthropic, LangGraph, CrewAI)
  • Logging and auditing
  • PyPI release

Contributing

Issues and pull requests are welcome.

License

Licensed under the GNU GPL v3.

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

doberman_agent-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

doberman_agent-0.1.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file doberman_agent-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for doberman_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2bddac7bf8b12a4b93e003ef64d696b05e5686bdd4aeaed5b3b42e0789c53b4d
MD5 0d9366f590b5f2ea316583ba8cd2c9eb
BLAKE2b-256 3693fe17c9ae7200a59575c433a00c2080e6f7d6e5e272b16dfe9f5dc9585bcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for doberman_agent-0.1.0.tar.gz:

Publisher: publish.yml on DakshSharma304/Doberman

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

File details

Details for the file doberman_agent-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for doberman_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3b15903e8746ab92e53f5c7a71f069358969c9bdd6cb42af47eacdf6002cae3
MD5 5d663fad77611ba79fd9c46fa289c46c
BLAKE2b-256 1f21d630d5b9ff0f73dd359f77f99e38e711545b58560491c3a1aa51520d60dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for doberman_agent-0.1.0-py3-none-any.whl:

Publisher: publish.yml on DakshSharma304/Doberman

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