-
Notifications
You must be signed in to change notification settings - Fork 0
fix: align frontend AgentConfig type with actual backend API response shape #878
Copy link
Copy link
Closed
Labels
spec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:human-interactionDESIGN_SPEC Section 13 - Human Interaction LayerDESIGN_SPEC Section 13 - Human Interaction Layertype:fixBug fixes and correctionsBug fixes and correctionsv0.5Minor version v0.5Minor version v0.5
Description
Problem
The frontend AgentConfig interface in web/src/api/types.ts declares fully typed sub-objects (PersonalityConfig, ModelConfig, SkillSet, etc.) and includes id, status, hiring_date fields. However, the backend AgentConfig in src/synthorg/config/schema.py uses dict[str, Any] for personality/model/memory/tools and does not have id, status, or hiring_date fields.
This means the frontend types model a richer shape than the backend currently serves. The frontend will receive data that does not match its type expectations at runtime.
Options
- Create a dedicated backend API DTO that enriches
AgentConfigwith runtime fields (AgentIdentitydata) - Have the controller return
AgentIdentityobjects instead ofAgentConfig - Align the frontend type to match the current backend shape and progressively add fields as the backend enriches its response
Blocked by
- feat: agent performance metrics and activity timeline endpoints #772 (agent performance/activity endpoints may also address this)
Found during PR #874 review (api-contract-drift agent).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
spec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:human-interactionDESIGN_SPEC Section 13 - Human Interaction LayerDESIGN_SPEC Section 13 - Human Interaction Layertype:fixBug fixes and correctionsBug fixes and correctionsv0.5Minor version v0.5Minor version v0.5