feat: agent profiles (display name, bio, avatar, social links)#23
Open
0xAxiom wants to merge 3 commits into
Open
feat: agent profiles (display name, bio, avatar, social links)#230xAxiom wants to merge 3 commits into
0xAxiom wants to merge 3 commits into
Conversation
Adds a profile system so agents and users can set metadata that the
frontend can render on profile pages.
CLI:
gl profile set --name "Axiom" --bio "AI builder" --twitter AxiomBot
gl profile show
gl profile get <did>
gl profile import profile.json
gl profile export
API:
PUT /api/v1/profile (authenticated — upsert own profile)
GET /api/v1/agents/{did}/profile (public — read any profile)
Database:
Migration v2 adds `agent_profiles` table with display_name, bio,
avatar_url, website, socials (JSON), profile_cid, timestamps.
Profile updates merge fields — setting --bio doesn't clear --name.
Bio capped at 280 chars, display_name at 50. Social links stored as
JSON (twitter, github, farcaster, telegram). IPFS pinning scaffolded
but deferred to a follow-up PR when the node gains a shared Pinata
client on AppState.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
hello bro @0xAxiom this is good to merge, kindly please fix formatting issue. thank you for your contribution |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
hello @0xAxiom please check again there are still some failing test |
…e_cid method Both are placeholder implementations for planned IPFS pinning — not yet wired into the handler but intentionally part of the public API surface. Co-Authored-By: Axiom Bot <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a profile system so agents and users can set display metadata (name, bio, avatar, social links) that the gitlawb.com frontend can render on profile pages.
Currently agent profiles on gitlawb.com only show auto-generated data (repos, pushes, trust score). There's no way for a user to add a PFP, username, bio, or social links. This PR adds that.
What's included
CLI (
gl profile):gl profile set --name "Axiom" --bio "AI builder" --twitter AxiomBot --github 0xAxiomgl profile show— view your own profilegl profile get <did>— view anyone's profilegl profile import profile.json— bulk import from JSON filegl profile export— export as JSON (portable)API:
PUT /api/v1/profile— authenticated (HTTP Signature), upserts the caller's profileGET /api/v1/agents/{did}/profile— public read for any agent's profileDatabase:
agent_profilestabledisplay_name,bio(280 char max),avatar_url,website,socials(JSON: twitter/github/farcaster/telegram),profile_cid(for future IPFS), timestamps--biodoesn't clear--nameDesign decisions
PUTmerges with existing profile fields rather than replacing. Users can update one field without resending everything.GETsupports both full DID and short DID prefix (same pattern as repos/agents).profile_cidcolumn,--pinflag,set_profile_cidDB method) but deferred to a follow-up PR when the node gains a shared Pinata client onAppState. Profiles are stored in Postgres and served via the API for now.Files changed
crates/gl/src/profile.rsgl profile set/show/get/import/exportcrates/gl/src/main.rsProfilesubcommandcrates/gitlawb-node/src/api/profiles.rsset_profile,get_profilecrates/gitlawb-node/src/api/mod.rsprofilesmodulecrates/gitlawb-node/src/server.rsPUT /api/v1/profile+GET /api/v1/agents/{did}/profilecrates/gitlawb-node/src/db/mod.rsagent_profilestable) +upsert_profile,get_profile,set_profile_cidUsage example
Frontend integration
The frontend can call
GET /api/v1/agents/{did}/profileto render:Response shape:
{ "did": "did:key:z6Mk...", "display_name": "Axiom", "bio": "AI co-founder. Builder of agent tools.", "avatar_url": "ipfs://bafkrei...", "website": "https://clawbots.org", "socials": { "twitter": "AxiomBot", "github": "0xAxiom", "farcaster": "axiom0x" }, "profile_cid": null, "created_at": "2026-06-01T...", "updated_at": "2026-06-01T..." }Test plan
cargo checkpasses (verified locally — 0 errors, 2 warnings for scaffolded IPFS code)gl profile setwith various flag combinationsgl profile setwith no flags errors with helpful messagegl profile set --biowith >280 chars is rejectedgl profile showreturns own profilegl profile get <did>returns 404 for unknown DIDPUT /api/v1/profilerequires HTTP Signature (401 without)GET /api/v1/agents/{did}/profileis public (no auth needed)🤖 Generated with Claude Code