managed agents: surface prompt on AgentOut

Reads the existing prompt column on the agent row and includes it on
GET /agents and GET /agents/{id} responses. The agent-platform UI
needs it to show a one-line description on the root agents list.
This commit is contained in:
Ishaan Jaffer 2026-05-07 17:11:43 -07:00
parent f2e3cf4e64
commit 269260a160
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -46,6 +46,7 @@ def _agent_row_to_out(row) -> AgentOut:
id=row.agent_id,
name=row.agent_name,
model=row.model,
prompt=getattr(row, "prompt", None),
template_id=row.template_id,
branch=row.branch,
pfp_url=pfp_url if isinstance(pfp_url, str) else None,

View file

@ -100,6 +100,7 @@ class AgentOut(BaseModel):
id: str
name: Optional[str] = None
model: str
prompt: Optional[str] = None
template_id: str
branch: str
pfp_url: Optional[str] = None