Skip to main content

decionis-autogen

Add a Decionis policy decision immediately before an AutoGen tool executes. The package supports the current AutoGen Core tool interface and the legacy AutoGen 0.2 UserProxyAgent execution hook.

Current AutoGen

pip install decionis-autogen
from autogen_core.tools import FunctionTool
from decionis import DecionisClient
from decionis_autogen import guard_tool

refund_tool = FunctionTool(send_refund, description="Issue a customer refund.")
guarded_refund = guard_tool(
    inner_tool=refund_tool,
    client=DecionisClient(api_key="..."),
    tenant_id="your-org-uuid",
    workflow_key="refund_execution",
    site_base_url="https://decionis.com",
)

agent = AssistantAgent(..., tools=[guarded_refund])

The wrapper preserves the inner tool schema. An ALLOW verdict delegates to the tool. BLOCK, REVIEW_REQUIRED, and ESCALATE raise DecionisToolRefusal before the side effect runs.

AutoGen 0.2 UserProxyAgent

The requested execute_function interception applies to AutoGen 0.2. Install the legacy extra on Python 3.10–3.12:

pip install 'decionis-autogen[legacy]'
from decionis import DecionisClient
from decionis_autogen import DecionisUserProxyAgent

executor = DecionisUserProxyAgent(
    "executor",
    decionis_client=DecionisClient(api_key="..."),
    tenant_id="your-org-uuid",
    function_map={"send_refund": send_refund},
    human_input_mode="NEVER",
)

The subclass overrides both execute_function and a_execute_function. A blocked call returns a structured function error with the dossier id and never invokes the registered function.

For either API, set shadow_mode=True to record would-block verdicts while still executing the inner tool. Enforcement is fail closed: evaluation errors do not silently fall through to the tool.

Compatibility: Python 3.10+, AutoGen Core 0.4–0.7; legacy AutoGen AgentChat 0.2 on Python 3.10–3.12.

Download files

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

Source Distribution

decionis_autogen-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

decionis_autogen-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: decionis_autogen-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for decionis_autogen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef4c7c4f3b48569ac7760010018b1da31583fb966e3f4a3efb4e5172d2cb82b7
MD5 44a455820f6b4819448ef2c753248208
BLAKE2b-256 b7d4cd90526665ed8a2ffad7c67c15de16025cc676b6b5e69d935bf5bec5f16c

See more details on using hashes here.

Provenance

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

Publisher: release-sdks.yml on decionis/Decionis

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

File details

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

File metadata

File hashes

Hashes for decionis_autogen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69cb6c4b3e5e9afac32674d48a71a4e2eae7e7a21951fcff09713c3019de2c77
MD5 dbfa7786421c34299e431d8fde9833f2
BLAKE2b-256 2521e078029efd1e4ab711ebf05abc3b3a472651da049d4931f421846bf3f67c

See more details on using hashes here.

Provenance

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

Publisher: release-sdks.yml on decionis/Decionis

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

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