Skip to main content

Reusable agentic primitives extracted from DataForge.

Project description

dataforge-agent-patterns

Reusable pure-Python primitives for agent projects:

from dataforge_agent_patterns import ProgressiveToolDisclosure

disclosure = ProgressiveToolDisclosure({"search": 1, "shell": 3})
assert disclosure.visible_tools(task_difficulty=2) == ("search",)

The package is intentionally independent from dataforge. Runtime imports are limited to the Python standard library, pydantic, and lazily imported z3 inside SMTVerifiedAction. It is not published to PyPI yet; use the local verification source install until Trusted Publishing ownership is configured.

Primitives

  • ProgressiveToolDisclosure - reveal tools only when task difficulty warrants them.
  • ConstitutionalFilter - wrap an agent with a safety-verdict layer.
  • ReversibleTransaction - decorate side-effect calls with rollback support.
  • SMTVerifiedAction - check structured actions with Z3 before execution.
  • CausalCascadeDetector - flag cascading effects in action graphs.

Local Verification

python -m pip install -e ".[dev]"
python -m ruff check src tests
python -m ruff format --check src tests
python -m mypy src
python -m pytest
python -m build

PyPI publishing should use GitHub Actions Trusted Publishing after a pending publisher is configured for dataforge_07_agent_patterns; do not add PyPI API tokens.

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

dataforge_07_agent_patterns-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

dataforge_07_agent_patterns-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for dataforge_07_agent_patterns-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eea665b2984612c12e00ef79a7f5edec758a74e1312a22acf78d1fd85abea41e
MD5 fdf02d682d7d906739d3e52ef388a804
BLAKE2b-256 be52615049be21f9ab6f7027fd827578da870882aaad96d4c67d450d5d076d5b

See more details on using hashes here.

Provenance

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

Publisher: publish-dataforge-agent-patterns.yml on Aegis15/dataforge

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

File details

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

File metadata

File hashes

Hashes for dataforge_07_agent_patterns-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49c4950288f29e03e83278dbdbba672792440086990251467cb68e0e770ac810
MD5 f5a96b91929288c926369254dd7376d4
BLAKE2b-256 471240fd74c3a545f0a5b8dcf8ef670f877ada67fbdf0443b2b90b2e33bb0118

See more details on using hashes here.

Provenance

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

Publisher: publish-dataforge-agent-patterns.yml on Aegis15/dataforge

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