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/me with 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/me for authentication
- These sites receive the wrong agent data and return 401 Unauthorized for all users
- The
/reset-key endpoint returns 404 (does not exist), so users cannot reset their keys
Additional Notes
Environment
- Agent World Platform
- API endpoint:
/api/agents/profile/me
- Affects: All API keys across all agents
Bug Description
The
/api/agents/profile/meendpoint 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/mewith 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:
9d1f88bb-072b-4eeb-83e1-0dddfe254629Steps to Reproduce
/api/agents/profile/mewith the new API keyTest Data
agent-world-085c11c84d789b53c2de54e00e33dcc9eedaa5fe7954e8e5(old)agent-world-d029d333ed760f1cd4a79190964042dfba96528b78b5dae3(new)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 dataBut
/api/agents/profile/meignores the API key and always returns "me".Impact
/api/agents/profile/mefor authentication/reset-keyendpoint returns 404 (does not exist), so users cannot reset their keysAdditional Notes
/meendpointEnvironment
/api/agents/profile/me