Follow Graph
Birdclaw keeps followers/following in local SQLite and makes graph queries cache-only by default. Agents should use the graph commands for analysis and the sync followers / sync following commands only when a human intentionally refreshes data.
#Safety Contract
birdclaw graph *commands never call X.birdclaw sync followersandbirdclaw sync followingdefault to dry-run.- Live sync requires
--yes. --mode autoprefersbirdand falls back toxurl; use--mode xurlonly when the OAuth2 follow endpoints work for the account.- Fresh sync cache is reused unless
--refreshis passed. - The default follow-graph cache TTL is 24 hours.
- Capped syncs are recorded as incomplete snapshots and are not used for churn events.
- Complete snapshots are diffed into append-only
startedandendedevents.
#Setup
birdclaw init
birdclaw auth status --json
The default account comes from the local Birdclaw account table. Pass --account <accountId> when working with a non-default account.
#Preflight Before Spending X Reads
Always run dry-run first:
birdclaw sync followers --json
birdclaw sync following --json
Dry-run output reports the cache key, whether a fresh cache exists, the page size, caps, and whether a live request would be needed.
#Refresh Followers And Following
Full refresh:
birdclaw sync followers --yes --json
birdclaw sync following --yes --json
Force a transport only when debugging:
birdclaw sync followers --mode bird --yes --json
birdclaw sync followers --mode xurl --yes --json
Capped refresh for cheaper inspection:
birdclaw sync followers --yes --max-pages 1 --allow-partial --json
birdclaw sync following --yes --max-pages 1 --allow-partial --json
Capped syncs are recorded as incomplete snapshots for audit, but they are not used to create churn events or update current edges. --allow-partial acknowledges that expected warning; it is not a persistence gate.
Repeat runs with the same account, page size, and caps reuse fresh cache:
birdclaw sync followers --yes --json
Force a new live fetch only when needed:
birdclaw sync followers --yes --refresh --json
#Agent Query Commands
After at least one complete follower and following snapshot, agents can query locally:
birdclaw graph summary --json
birdclaw graph events --since 2026-05-01 --json
birdclaw graph top-followers --limit 20 --json
birdclaw graph non-mutual-following --sort followers --limit 100 --json
birdclaw graph mutuals --json
birdclaw graph unfollowed --date 2026-05-01 --json
Recommended agent order:
- Run
birdclaw graph summary --json. - If counts are zero or snapshots are stale, ask for a human-approved
sync followers --yesandsync following --yes. - Run only
graphcommands for analysis. - Do not pass
--refreshunless the user explicitly asks to spend live reads.
#Stored Data
The follow graph uses:
follow_snapshotsfor each sync attempt.follow_snapshot_membersfor users seen in each snapshot.follow_edgesfor current complete follower/following edges.follow_eventsfor append-onlystartedandendededge changes.profiles.public_metrics_jsonandprofiles.followers_countfor local sorting.
Incomplete snapshots preserve what was fetched but do not update current edges or churn events. This prevents capped reads from being mistaken for unfollows.