passport source realm
Package passport is an on-chain identity and lifecycle registry for autonomous (AI) agents.
Package passport is an on-chain identity and lifecycle registry for autonomous (AI) agents.
The premise: a long-lived agent identity is *weak* evidence. The code, model, prompt, owner, operating keys and runtime behind an identity can all change silently. A blockchain cannot preserve an agent's cognition; it can only preserve the *history* of what an identity claimed to be and who controlled it, in an order nobody can rewrite.
So this realm does not try to prove an agent is trustworthy. It records registration, ownership transfers, operator changes and — crucially — runtime changes, and it surfaces them so a reader can judge how much the identity has drifted since it was created.
1
15
func AddEndpoint
crossing ActionAddEndpoint advertises a discovery/interaction endpoint.
func AddOperator
crossing ActionAddOperator authorizes an additional address to act as this agent.
func Count
ActionCount returns the number of registered agents.
func DeclareCapability
crossing ActionDeclareCapability records a capability the agent claims to offer. Note: this is a *claim*, not proof. Validation belongs to other realms (see the receipt and gnomem demos).
func Exists
ActionExists reports whether an id is registered.
func IsActive
ActionIsActive reports whether the agent exists and is in the active state.
func IsOperator
ActionIsOperator reports whether addr is the owner or a listed operator of an active agent — the check other realms should gate agent actions on.
func Reactivate
crossing ActionReactivate returns a suspended agent to active. A retired agent cannot be reactivated.
func Register
crossing ActionRegister creates a new agent identity owned by the caller. The id must be a non-empty, previously unused slug.
func Render
Render shows the registry, or a single agent's profile + lifecycle log at r/moul/agents/passport:<id>. The profile deliberately foregrounds drift: how many owner and runtime changes have happened since creation.
func Retire
crossing Actionfunc SetRuntime
crossing ActionSetRuntime records a change of the agent's runtime/model. This is logged loudly: a runtime change means the thing acting under this identity is (partly) a different thing than before.
func Suspend
crossing ActionSuspend and Retire move the lifecycle forward. Retire is terminal.
func Transfer
crossing ActionTransfer hands ownership of an agent to a new address. Only the current owner may call it. Ownership changes are the single most important thing to keep visible: the operator behind an identity may become someone else.
func Get
ActionGet returns a copy of the agent record; panics if unknown.
4
type Agent
structAgent is a persistent, importable identity object. Other realms can import this package and ask questions like IsActive / IsOperator directly, instead of parsing NFT metadata scattered across contracts.
type Endpoint
structEndpoint advertises where the agent can be reached or discovered (e.g. an MCP server, an A2A endpoint, a DID document, an ENS name).
type Event
structEvent is one entry in an agent's append-only lifecycle log.
type Status
identStatus is the lifecycle state of an agent identity.
5
- chain stdlib
- chain/runtime stdlib
- gno.land/p/nt/avl/v0 package
- gno.land/p/nt/ufmt/v0 package
- strings stdlib