From 0b08c4ed6ad045fb923860b0bc791d7e7cd8a2a2 Mon Sep 17 00:00:00 2001 From: Matthew Zhou Date: Wed, 24 Sep 2025 17:04:50 -0700 Subject: [PATCH] fix: Fix agents preview payload (#4924) Fix agents endpoint --- letta/server/rest_api/routers/v1/agents.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py index 0c5e8d46..2596fd4b 100644 --- a/letta/server/rest_api/routers/v1/agents.py +++ b/letta/server/rest_api/routers/v1/agents.py @@ -1777,7 +1777,9 @@ async def preview_raw_payload( be sent to the LLM provider. Useful for debugging and inspection. """ actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id) - agent = await server.agent_manager.get_agent_by_id_async(agent_id, actor, include_relationships=["multi_agent_group"]) + agent = await server.agent_manager.get_agent_by_id_async( + agent_id, actor, include_relationships=["multi_agent_group", "memory", "sources"] + ) agent_eligible = agent.multi_agent_group is None or agent.multi_agent_group.manager_type in ["sleeptime", "voice_sleeptime"] model_compatible = agent.llm_config.model_endpoint_type in [ "anthropic",