Skip to main content

Open Entity for the OpenAI Agents SDK

Function tools that give an agent its own Open Entity identity and let it check other agents.

pip install openentity-openai-agents
from agents import Agent, Runner
from openentity_openai_agents import openentity_tools

agent = Agent(name="Buyer", instructions="Adopt an identity named Buyer. Trust-check any counterparty EID before a deal.",
              tools=openentity_tools())
result = Runner.run_sync(agent, "Check did:key:z6Mk... for me.")
print(result.final_output)
Tool What it does
openentity_adopt Creates the key on first use (OS keychain, else ~/.openentity/identity.key at 0600) and adopts it with the unsigned client label openai-agents. Safe to repeat.
openentity_self Reads the agent's own entity from the registry.
openentity_record_stance Appends a stance (refusal, correction, limit assertion) to the Development Record.
openentity_record_arc Opens or closes an arc.
openentity_verify Verifies a counterparty's Entity Document and Declaration signatures locally.
openentity_trust A TrustReport for a counterparty (Claw GRC tier, Secure My Agent posture, violations); ok false means untrusted.

The registry is $OPENENTITY_REGISTRY, default https://openentity.org. The key is never returned to the model. Tests run against an in-process registry stub.

Pair with the owner (OpenEntity app)

from openentity_openai_agents import owner_tools, pair

pair("OE-7K4M-Q2XP")   # the code the owner's OpenEntity app shows; prints Match: ... and waits for the owner
tools = owner_tools()  # or OpenEntityOwner.pair(...) and OpenEntityOwner.tools(), the one-liner the app shows

pair(code) runs once, from your code: it adopts this machine's identity when the registry does not know it yet (adopting signs the Open Entity Declaration, and it says so), prints the four match items the owner compares with the app, and waits for the owner to confirm. Its result carries the owner DID, the granted permissions and any product keys (credentials): keep those out of the model's context. Every owner tool signs with the same key and returns ok: false with the service's error code (agent_paused, not_paired, rate_limited) instead of raising. The account is OPENENTITY_ACCOUNT, else https://account.openentity.org.

Tool Does
owner_message Messages the owner in the OpenEntity app
owner_status Reports running, idle, blocked, error or done with a one-line summary; the app shows it live
owner_inbox Returns and acknowledges what the owner sent: messages, commands (checkup, fix, pause, resume), approval results, permission changes
owner_ask_approval Asks the owner to approve something first; the app labels it "Written by the agent", and the decision arrives in the inbox

Metadata

Release files for openentity-openai-agents 0.2.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 openentity-openai-agents 0.2.0
File Size Uploaded Provenance Actions
openentity_openai_agents-0.2.0.tar.gz 96.3 kB With provenance Details for openentity_openai_agents-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openentity-openai-agents 0.2.0
File Interpreter ABI Platform Actions
openentity_openai_agents-0.2.0-py3-none-any.whl Python 3 none any Details for openentity_openai_agents-0.2.0-py3-none-any.whl

Total release size: 102.9 kB

Release files / openentity_openai_agents-0.2.0.tar.gz

Download URL openentity_openai_agents-0.2.0.tar.gz
Size 96.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e4b2a3ceae5ff5cb7d4ac5438a7678a2dd4a6dcb2172158c2703417369b09e15
BLAKE2b-256 checksum
How to use checksums
26cd6d5c59dd56fe4fe1153179ab2f21b8839c57744f5ee61d4245ec353b5394
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 Nov 15, 2026.

Transparency log

Release files / openentity_openai_agents-0.2.0-py3-none-any.whl

Download URL openentity_openai_agents-0.2.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97364bddae2aaf27077fb66077e02fb4829ca6beb097565a3dbb82d75221aaee
BLAKE2b-256 checksum
How to use checksums
2de88e49bad3134e58566a61c90851db44b4ed31812dda57e371544f6f49ab65
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 Nov 15, 2026.

Transparency log

Security for openentity-openai-agents 0.2.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openentity_openai_agents-0.2.0.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 Nov 15, 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full 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