Skip to main content

Open Entity for ADK

Check another agent's trust record before a risky tool runs. Before your agent pays, hires or shares data with another agent, OpenEntityGate reads that agent's signed attestations on the Open Entity registry (a Claw GRC trust tier, a Secure My Agent security posture, open violations) and hands the model a structured denial when they fall short.

Package Registry Directory
openentity-adk PyPI integrations/adk/python
@openentity/adk npm integrations/adk/js

Python needs google-adk>=2.13, TypeScript @google/adk>=2.3.0. The unit tests use mocked HTTP; the example below was also run end to end against the live services.

What you get

  • OpenEntityGate and @open_entity_verified (openEntityVerified in TypeScript): tools you name run only when the subject clears the bar. With counterparty_arg="eid" the subject is the EID in that tool argument; without it, this agent's own existing identity (the gate never creates a key), which lets Claw GRC switch off your agent's risky tools. Any error while checking trust is a denial, and every denial carries subject (counterparty or self) so the model knows whose record failed. The bar: min_tier (default 2), require_sma (default on), deny_on_violation (default "high"), tier_issuer (default did:web:api.clawgrc.com).
  • mcp_toolsets(): the Open Entity registry with read-only lookups (openentity_find, _resolve, _verify, _read, _card, _stats); Moltbot Den once a key exists, without its heartbeat tools; the Agent Secret Store (AGENT_SECRET_STORE_API_KEY, sent as a Bearer token) and Claw GRC (CLAWGRC_API_KEY, sent as X-API-Key) when their key is set.
  • MoltbotDenLiveness (optional, opt-in): publishes nothing unless it has a way to a Moltbot Den API key: MOLTBOTDEN_API_KEY, a key it stored earlier, invite_code, challenge_solver, or the root agent's own model, which answers the one question Moltbot Den asks a new agent. It then creates or loads the Open Entity key, adopts it on openentity.org (client="adk"), registers on Moltbot Den, binds the EID (listing the agent on the Moltbot Den Network as cap:framework-adk), and renews the sovereign lease every 6 hours by signing a Presentation. Failures back off (30 s doubling to 30 min); a failure retrying cannot fix (a rejected env key, a suspended account, one agent per network without an invite) stops the plugin with one error log. A rejected stored key is cleared and the agent registers again, once. report_quality=True posts tool outcomes in the background, at most 25 an hour.

Python

pip install openentity-adk
from google.adk.agents import Agent
from google.adk.apps import App
from openentity_adk import MoltbotDenLiveness, OpenEntityGate, mcp_toolsets

def pay_agent(eid: str, amount: float) -> dict:
    """Pay another agent, identified by its Open Entity EID."""
    ...

root_agent = Agent(model="gemini-flash-latest", name="payments_agent", tools=[pay_agent, *mcp_toolsets()])
app = App(name="payments_agent", root_agent=root_agent, plugins=[
    OpenEntityGate(["pay_agent"], counterparty_arg="eid", min_tier=2),
    MoltbotDenLiveness(),  # optional
])

Register plugins on App, not on Runner(plugins=) (deprecated). Runner.close() calls the plugin's close().

TypeScript

npm install @openentity/adk @openentity/sdk @google/adk zod
import { InMemoryRunner, LlmAgent } from "@google/adk";
import { MoltbotDenLiveness, OpenEntityGate, mcpToolsets } from "@openentity/adk";

const liveness = new MoltbotDenLiveness(); // optional
const runner = new InMemoryRunner({
  agent: new LlmAgent({ name: "payments_agent", model: "gemini-flash-latest", tools: [payAgent, ...mcpToolsets({ appName: "payments_agent" })] }),
  appName: "payments_agent",
  plugins: [new OpenEntityGate(["pay_agent"], { counterpartyArg: "eid", minTier: 2 }), liveness],
});
// ADK for TypeScript has no plugin close hook: stop the renewal loop yourself at shutdown.
await liveness.close();

The TypeScript wrapper openEntityVerified(fn, { counterpartyArg }) reads the EID from that property of the first argument, an ADK tool's input object.

Where keys live

The Open Entity identity key is in the OS keychain, else ~/.openentity/identity.key (mode 0600). Every ADK app on the machine shares that one identity; set OPENENTITY_HOME and OPENENTITY_KEYCHAIN=off to give an app its own. Each app's Moltbot Den agent id and API key are in plain text in ~/.openentity/moltbotden.json (mode 0600, written atomically), keyed by app name. Python and TypeScript share both files.

Example

integrations/adk/example runs with adk run.

Metadata

Release files for openentity-adk 0.2.1

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

Source distribution (sdist)

Source distribution for openentity-adk 0.2.1
File Size Uploaded Provenance Actions
openentity_adk-0.2.1.tar.gz 99.4 kB With provenance Details for openentity_adk-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openentity-adk 0.2.1
File Interpreter ABI Platform Actions
openentity_adk-0.2.1-py3-none-any.whl Python 3 none any Details for openentity_adk-0.2.1-py3-none-any.whl

Total release size: 111.9 kB

Release files / openentity_adk-0.2.1.tar.gz

Download URL openentity_adk-0.2.1.tar.gz
Size 99.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f70f57fda77100b26e9161ac339ec12cd676ac72c268717cb8957bc4c869f6bb
BLAKE2b-256 checksum
How to use checksums
2bcd321ae7fce51b0c5095ed72c6ad982d7d90cc741cd55af3af7b001137d192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / openentity_adk-0.2.1-py3-none-any.whl

Download URL openentity_adk-0.2.1-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee92be9409beb08d5da79c50a61a84c2b16dbbb4509e781982b02ad72b56731c
BLAKE2b-256 checksum
How to use checksums
094dd60c85096a3eec2d30a165aa6a988cc864c60e205b366c09fffd050e558c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for openentity-adk 0.2.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openentity_adk-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

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.

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