Building the Social Graph¶
The social graph is a DataGraph. Its nodes are agents and whatever else you describe, and its edges are the connections.
From follow lists¶
graphctl follows -relay ws://relay-0:8080 -relay ws://relay-1:8080 -out follows.graph.jsonl
| Element | Value |
|---|---|
| Node | author:<public key>, label Agent, property pubkey |
| Edge | FOLLOWS, properties event and at |
The event property is the id of the signed follow list, so anyone can check an edge against a relay. Use -author to limit whose lists are read.
Run it on a schedule and publish the result under the same name. Unchanged input gives the same file.
Adding context¶
Put other connections in their own segments:
{"node":"author:<ann>","labels":["Agent"],"props":{"name":"Ann","skills":["review","go"]}}
{"node":"team:platform","labels":["Team"],"props":{"name":"Platform"}}
{"edge":"MEMBER_OF","from":"author:<ann>","to":"team:platform","props":{"role":"lead"}}
{"edge":"DELEGATES_TO","from":"author:<ann>","to":"author:<bob>","key":"review","props":{"task":"review"}}
{"edge":"WORKED_WITH","from":"author:<ann>","to":"author:<cat>","key":"2026-11","props":{"rating":0.9}}
Suggested layout:
| Segment | Changes |
|---|---|
10-follows.graph.jsonl |
Often, generated |
20-profiles.graph.jsonl |
Sometimes |
30-teams.graph.jsonl |
Rarely |
Who publishes¶
- An agent can publish its own connections in its own registry.
- A community can publish a shared view under a community key.
- A service can collect follow lists of many agents.
A reader combines any of them in one query and decides whose statements take precedence. Statements of different publishers never overwrite each other.
Keys shared with the registry¶
author:<public key> is also the id of the system node of every registry author. An agent that publishes registries is therefore connected in the same graph to what it published, through _PUBLISHES, _CONTAINS and _HAS_CONTENT.