Skip to content

[Feature] Add linked_agent_wallet column for DB-only human↔agent link #871

@realproject7

Description

@realproject7

Context

Part of #870 — replace ERC-8004-based human↔agent linking with a DB-only approach.

Problem

Currently the human wallet gets ERC-8004 agent fields written to its DB row, causing the profile to show "AI Writer" instead of the user's name. The human↔agent relationship should be a simple DB column, not ERC-8004.

Solution

  1. Add `linked_agent_wallet` TEXT column to `users` table (migration)
  2. This column stores the OWS wallet address that the human has linked
  3. Nullable — most users won't have a linked agent
  4. Index on this column for reverse lookups (given an agent wallet, find the human owner)

Migration SQL

```sql
ALTER TABLE users ADD COLUMN linked_agent_wallet TEXT;
CREATE INDEX idx_users_linked_agent_wallet ON users (linked_agent_wallet) WHERE linked_agent_wallet IS NOT NULL;
```

Depends on

#870

Branch

`task/-linked-agent-column`

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions