Summary
The appId field uses camelCase in JSON tags while all other API-facing fields use snake_case (agent_id, session_id, memory_type, created_at, etc.). This creates a visible inconsistency in both request and response bodies.
Current state
| Direction |
Behavior |
| Request input |
Accepts both appId (primary) and app_id (legacy fallback) via AppIDLegacy field |
| Response output |
Always returns appId (camelCase) — no dual-serialize |
| Clients |
None of the 4 plugins or dashboard currently read appId from responses |
{
"id": "mem_xxx",
"content": "...",
"appId": "app-1", // ← camelCase, inconsistent
"agent_id": "test-agent", // snake_case
"session_id": "session-1", // snake_case
"memory_type": "insight", // snake_case
"created_at": "..." // snake_case
}
Source
server/internal/domain/types.go:41: AppID string json:"appId,omitempty"
server/internal/handler/memory.go:33-34: dual AppID + AppIDLegacy in request struct
- Introduced by Bosn in
fa23053e (2026-06-04)
Suggested approach
Leave as-is for now. Input side already handles both formats. Output side change would be breaking. Address when designing v3 API with consistent naming.
Summary
The
appIdfield uses camelCase in JSON tags while all other API-facing fields use snake_case (agent_id,session_id,memory_type,created_at, etc.). This creates a visible inconsistency in both request and response bodies.Current state
appId(primary) andapp_id(legacy fallback) viaAppIDLegacyfieldappId(camelCase) — no dual-serializeappIdfrom responses{ "id": "mem_xxx", "content": "...", "appId": "app-1", // ← camelCase, inconsistent "agent_id": "test-agent", // snake_case "session_id": "session-1", // snake_case "memory_type": "insight", // snake_case "created_at": "..." // snake_case }Source
server/internal/domain/types.go:41:AppID string json:"appId,omitempty"server/internal/handler/memory.go:33-34: dualAppID+AppIDLegacyin request structfa23053e(2026-06-04)Suggested approach
Leave as-is for now. Input side already handles both formats. Output side change would be breaking. Address when designing v3 API with consistent naming.