Skip to content

fix: align frontend AgentConfig type with actual backend API response shape #878

@Aureliolo

Description

@Aureliolo

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

  1. Create a dedicated backend API DTO that enriches AgentConfig with runtime fields (AgentIdentity data)
  2. Have the controller return AgentIdentity objects instead of AgentConfig
  3. Align the frontend type to match the current backend shape and progressively add fields as the backend enriches its response

Blocked by

Found during PR #874 review (api-contract-drift agent).

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec:agent-systemDESIGN_SPEC Section 3 - Agent Systemspec:human-interactionDESIGN_SPEC Section 13 - Human Interaction Layertype:fixBug fixes and correctionsv0.5Minor version v0.5

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions