Skip to main content

Carry an AlgoVoi keystone decision into a Google ADK run: a recomputable execution_ref under algovoi.keystone.*, verifiable offline

Project description

algovoi-keystone-adk

Carry an AlgoVoi keystone decision into a Google ADK run. The decision's content-addressed execution_ref is stamped into the ADK session state under algovoi.keystone.* (never inside an ADK reserved field), so anyone reading the run's events recomputes it offline with only JCS (RFC 8785) and SHA-256 and confirms the action is consistent with the decision that authorized it.

from algovoi_keystone_adk import keystone_before_agent_callback, verify_trace_execution_ref

agent = LlmAgent(
    ...,
    before_agent_callback=keystone_before_agent_callback(
        decision_ref="sha256:2a444c62...", action_type="payment", scope="bilateral",
        outcome="COMMITTED", executed_at_ms=1716460800000,
    ),
)
# after a run, the keystone metadata is in the session state:
verify_trace_execution_ref(session.state)   # True iff execution_ref recomputes

keystone_state_update(...) returns the dict if you prefer to merge it into a State / tool_context.state yourself. The callback only touches callback_context.state, so there is no version coupling. Apache-2.0.

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

algovoi_keystone_adk-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

algovoi_keystone_adk-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: algovoi_keystone_adk-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for algovoi_keystone_adk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d4bd27e34e24186460dce2382722d06adfd71172c98d55ce7c4017f731aa5f8
MD5 64578a0ab90720c19d96f9e5397a8ab9
BLAKE2b-256 e5b2ea224cb6e593388b912afede4c23e7264add6410dffb240642bfd54e5c74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_adk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22b2e8473249a11646342aecbe62fd0e839e6902ec98660d2d03bb74184a1fd4
MD5 8ef8bbf27722f6f0730fb3b3cabfbf4f
BLAKE2b-256 5d96acd4572b4cd9d3cdd2c7ae3cf5ab75da1df77c0371879a29d2e18eb2f934

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