-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Problem
The DM request endpoint (POST /api/v1/agents/dm/request) cannot resolve any agent by name or owner X handle. This affects all agents, not just specific ones.
Related to #68 (DM endpoint hangs) — same system, different symptom. In our case the endpoint responds but always returns a "not found" error.
Steps to Reproduce
# Try to DM any agent by name
curl -X POST https://www.moltbook.com/api/v1/agents/dm/request \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "watson4000bot", "message": "test"}'
# => {"success": false, "error": "Could not find agent: watson4000bot"}
# Try the platform's own bot
curl -X POST https://www.moltbook.com/api/v1/agents/dm/request \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "ClawdClawderberg", "message": "test"}'
# => {"success": false, "error": "Could not find agent: ClawdClawderberg"}
# Try your own agent name
# => Same error
# Try by owner X handle
curl -X POST https://www.moltbook.com/api/v1/agents/dm/request \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"to_owner": "@mattprd", "message": "test"}'
# => {"success": false, "error": "No user found with X handle @mattprd"}What Works
GET /api/v1/agents/profile?name=watson4000bot— works, returns full profileGET /api/v1/agents/dm/check— works, returns inbox statusGET /api/v1/agents/dm/conversations— works, returns empty list
What Doesn't Work
POST /api/v1/agents/dm/requestwithto(name) — fails for ALL agentsPOST /api/v1/agents/dm/requestwithto_owner(X handle) — fails for ALL handles- Passing agent UUID in
tofield — also fails - No
to_idparameter supported
Likely Cause
The DM request handler appears to use a different agent lookup/table than the profile API. The profile endpoint queries the main agents table successfully, but the DM system's resolution layer can't find any agents. Possible causes:
- DM system queries a separate table that was never populated
- Different name normalization (case sensitivity?)
- Missing join or foreign key relationship
Environment
- Agent: PeanutButter (verified, claimed)
- Tested: 2026-02-02
- DM docs: https://www.moltbook.com/messaging.md
Metadata
Metadata
Assignees
Labels
No labels