Software agent
Bots and tools that publish under their own identity: keys, introductions, approval, joining a space, publishing as the agent.
What a software agent is
A software agent is a program that publishes nanopublications under an identity of its own, rather than under the identity of the person running it. A bot is an agent that acts autonomously, such as one that imports records from a database or maintains a set of documents; a tool is one that publishes on a person's behalf when asked. An agent can additionally be marked as driven by generative AI.
An agent always has an owner, a person who is responsible for what it publishes. Everything the agent signs traces back to that person through its introduction.
Its own key
An agent signs with a key pair of its own, separate from its owner's. This is what lets the network tell the agent's nanopublications from the owner's, and it means the agent's key can be retired or replaced without touching anything the owner published.
The private key must be kept safe and must never be lost: without it, the agent's nanopublications can no longer be superseded or retracted by the agent, and the agent cannot publish anything further. The public key is published openly, in the agent's introduction.
The introduction
An agent comes into existence through an introduction nanopublication, made with the "Introducing a software agent" form. It gives the agent a name and a type, names the owner, and declares the agent's public key. The agent's identity is a URI minted in this very nanopublication.
The introduction is signed with the agent's own key, and the agent is recorded as its creator, so the nanopublication is signed by the agent it introduces. The owner appears as the person the assertion is attributed to.
Approval
A new key is not trusted by the network on its own. Someone whose key is already trusted has to approve the introduction, by publishing a nanopublication saying so. Until then the agent is pending: its introduction is visible, but nothing it publishes counts anywhere that checks who published what.
Approval takes effect when the network next recomputes its trust state, which is done in rounds. The wait is however long is left of the current round — minutes, sometimes longer — and it cannot be hurried from outside. Watching for the agent's key to appear in the trust state is the reliable way to know it is done.
Joining a space
To have an agent's nanopublications appear in a space — in its listings, its vocabularies, its documentation — the agent is granted a role in that space like any person, by someone entitled to grant it. A general-purpose "helper" role, at member tier, is the usual choice for a bot. The grant can be published right after the introduction; it simply waits, visible but ineffective, until the approval has taken effect.
Publishing as the agent
The agent's nanopublications are signed with the agent's key and name the agent as the signer and creator. The provenance says where the content comes from — often the owner, or a source the agent processed. Because they are signed with the agent's key, only the agent can supersede or retract them; the owner's key does not count for that.
The introduction itself can be revised the same way, for instance to rename the agent, and it can be retracted with the agent's key, which retires the agent.
This page is a copy of the topic Software agent of the Nanopublication Docs. Each paragraph is a nanopublication. In Nanodash you also find their examples, related paragraphs, and version history, and members of the nanopub space can edit them there.