Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

passport source realm

Package passport is an on-chain identity and lifecycle registry for autonomous (AI) agents.

Overview

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.

Constants 1

Functions 15

func AddEndpoint

crossing Action
1func AddEndpoint(cur realm, id, kind, uri string)
source

AddEndpoint advertises a discovery/interaction endpoint.

func AddOperator

crossing Action
1func AddOperator(cur realm, id string, op address)
source

AddOperator authorizes an additional address to act as this agent.

func DeclareCapability

crossing Action
1func DeclareCapability(cur realm, id, capab string)
source

DeclareCapability 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

Action
1func Exists(id string) bool
source

Exists reports whether an id is registered.

func IsActive

Action
1func IsActive(id string) bool
source

IsActive reports whether the agent exists and is in the active state.

func IsOperator

Action
1func IsOperator(id string, addr address) bool
source

IsOperator 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 Action
1func Reactivate(cur realm, id string)
source

Reactivate returns a suspended agent to active. A retired agent cannot be reactivated.

func Register

crossing Action
1func Register(cur realm, id, runtimeDesc string)
source

Register creates a new agent identity owned by the caller. The id must be a non-empty, previously unused slug.

func Render

1func Render(path string) string
source

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 SetRuntime

crossing Action
1func SetRuntime(cur realm, id, runtimeDesc string)
source

SetRuntime 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 Action
1func Suspend(cur realm, id string)
source

Suspend and Retire move the lifecycle forward. Retire is terminal.

func Transfer

crossing Action
1func Transfer(cur realm, id string, newOwner address)
source

Transfer 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

Action
1func Get(id string) Agent
source

Get returns a copy of the agent record; panics if unknown.

Types 4

type Agent

struct
 1type Agent struct {
 2	ID        string
 3	Owner     address
 4	Operators []address
 5	Runtime   string // free-form runtime descriptor, e.g. "claude-opus-4-8@<commit>"
 6	Endpoints []Endpoint
 7	Caps      []string // declared capability slugs
 8	Status    Status
 9	CreatedAt int64
10	UpdatedAt int64
11	History   []Event
12}
source

Agent 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

struct
1type Endpoint struct {
2	Kind string // "mcp", "a2a", "did", "url", ...
3	URI  string
4}
source

Endpoint 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

struct
1type Event struct {
2	Height int64
3	Actor  address
4	Kind   string // "register", "transfer", "add-operator", "set-runtime", ...
5	Detail string
6}
source

Event is one entry in an agent's append-only lifecycle log.

type Status

ident
1type Status string
source

Status is the lifecycle state of an agent identity.

Imports 5

Source Files 2