Skip to main content

dapr-agents-ext-drasi

Drasi extension for Dapr Agents, enabling resilient, scalable, and business event-driven AI agents through Drasi's change notification capabilities.

Features

  • Directly trigger agents from Drasi change events via Dapr pub/sub

Getting Started

Prerequisites

This extension is installed as an optional dependency on the core dapr-agents package; see the Getting Started section in the root README for a list of prerequisites.

Installation

uv add dapr-agents[drasi]

Public API

from dapr_agents.ext.drasi import (
    drasi_trigger,                  # Register Drasi query subscriptions for agents
    DrasiChangeEvent,               # Type for Drasi change events
    DrasiOperation,                 # Operation type for Drasi change events
)

Usage

Register a Drasi query subscription on an agent before hosting:

agent = DurableAgent(...)

drasi_trigger(
    agent,
    query_id="<YOUR_DRASI_QUERY_ID>",
    task_mapper=lambda event, ctx: TriggerAction(task="<AGENT_TASK_MESSAGE>")
)

runner = AgentRunner()
try:
    runner.subscribe(agent)
    await wait_for_shutdown()
finally:
    runner.shutdown(agent)

Examples

Development

Install extension in editable mode

From the project root:

uv venv
source .venv/bin/activate
uv sync --active --group dev --group test --extra drasi

Run extension tests

uv run --group test pytest ext/dapr-agents-ext-drasi -m "not integration" -v

Extension code quality

See the Code Quality section in the development README for code quality commands.

Regenerate Drasi models

See the provenance file for context.

./scripts/regen-drasi-models.sh

Metadata

Release files for dapr-agents-ext-drasi 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dapr-agents-ext-drasi 0.1.0
File Size Uploaded Provenance Actions
dapr_agents_ext_drasi-0.1.0.tar.gz 26.9 kB Without provenance Details for dapr_agents_ext_drasi-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dapr-agents-ext-drasi 0.1.0
File Interpreter ABI Platform Actions
dapr_agents_ext_drasi-0.1.0-py3-none-any.whl Python 3 none any Details for dapr_agents_ext_drasi-0.1.0-py3-none-any.whl

Total release size: 51.7 kB

Release files / dapr_agents_ext_drasi-0.1.0.tar.gz

Download URL dapr_agents_ext_drasi-0.1.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
221f58d91eb81c6a8ffb6e98bbabc58372b3caed4478510c6246adb9452f27ca
BLAKE2b-256 checksum
How to use checksums
cba87281ee3419ec55e01dcc194fdb7a5ed8d41c3bcbbf15f1cf8650f09f4263
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / dapr_agents_ext_drasi-0.1.0-py3-none-any.whl

Download URL dapr_agents_ext_drasi-0.1.0-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0385fa9a89ae521f6a3b54df7900dc174b15da5948cf428c4bf82c5401121987
BLAKE2b-256 checksum
How to use checksums
7627ff3f18a803de6683d09f5f545e664d2a61eb2d615ae493957a2552cb44bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Security for dapr-agents-ext-drasi 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page