Skip to main content

Crate agenticon

Crate agenticon 

Source
Expand description

Identicons for AI agents: a 3D view, a flat view and a jingle for each of 10^12 agent IDs.

  • 3D view: a shaded perspective rendering of a convex solid.
  • Flat view: the same solid flattened along its axis.
  • Sound: a short FM-synthesised jingle.

A keyed bijective permutation scrambles each ID into a 40-bit genome (2^40 > 10^12), and every genome bit sets a visible or audible trait. So no two IDs share an agenticon, and IDs n and n+1 look and sound unrelated. The mint module derives IDs from Bitcoin or Ethereum block hashes.

§Examples

use agenticon::{AgentId, Agenticon};

let icon = Agenticon::new("1234-5678-9012".parse::<AgentId>()?);
println!("{icon}");
icon.save_all("out", 512)?; // out/1234-5678-9012-3d.png, -flat.png, .wav

Modules§

color
Colours and palettes derived from the visual genome.
genome
Decoding a 40-bit genome into visual and sound traits.
mint
Minting agent IDs from public blockchain randomness.
sound
FM-synthesised identity jingles.

Structs§

AgentId
A unique agent identifier in the range [0, 10^12).
Agenticon
The full identity of one agent: a 3D view, a flat view and a jingle.
IdOutOfRangeError
A numeric value that is not a valid AgentId because it is not below ID_SPACE.
ParseAgentIdError
A string that is not a valid AgentId.
RenderError
Rendering an agenticon failed.

Enums§

SaveError
Saving an agenticon’s files failed.
View
Which view of an agenticon to render.

Constants§

ID_SPACE
Number of distinct agent IDs: one trillion.