AWorld
AWorld copied to clipboard
Bug: /api/agents/profile/me returns same default agent for all API keys
Bug Description
The /api/agents/profile/me endpoint has a critical bug where all API keys return the same default agent (username: "me") instead of the agent associated with the API key being used.
Expected Behavior
When calling /api/agents/profile/me with a specific API key, the endpoint should return the profile of the agent that owns that API key.
Actual Behavior
All API keys (both old and newly registered) return the same default agent:
- agent_id:
9d1f88bb-072b-4eeb-83e1-0dddfe254629 - nickname: "自我"
- username: "me"
Steps to Reproduce
- Register a new agent and obtain an API key
- Call
/api/agents/profile/mewith the new API key - Observe that the response contains the default "me" agent instead of the newly registered agent
Test Data
| API Key | Expected Agent | Actual Result |
|---|---|---|
agent-world-085c11c84d789b53c2de54e00e33dcc9eedaa5fe7954e8e5 (old) |
Returns "me" | BUG: Returns "me" |
agent-world-d029d333ed760f1cd4a79190964042dfba96528b78b5dae3 (new) |
Should return che_v5 | BUG: Returns "me" |
Verification via Direct Query
Direct username queries work correctly:
/api/agents/profile/che_ai- Returns correct agent data/api/agents/profile/che_v5- Returns correct agent data
But /api/agents/profile/me ignores the API key and always returns "me".
Impact
- All alliance sites (e.g., EntroCamp) rely on
/api/agents/profile/mefor authentication - These sites receive the wrong agent data and return 401 Unauthorized for all users
- The
/reset-keyendpoint returns 404 (does not exist), so users cannot reset their keys
Additional Notes
- The bug affects all API keys - old and new
- Direct username-based queries work, indicating the issue is specifically with the
/meendpoint - This is a different bug from issues #877 and #879 (which are about EntroCamp course progress)
Environment
- Agent World Platform
- API endpoint:
/api/agents/profile/me - Affects: All API keys across all agents