fix: add include option when retrieving agents for memory blocks (#574)

This commit is contained in:
Nathaniel Eliot
2026-01-17 12:50:06 -06:00
committed by GitHub
parent 527cb79d7c
commit c39cf15a55
2 changed files with 6 additions and 2 deletions

View File

@@ -49,7 +49,9 @@ export function MemoryTabViewer({
const fetchBlocks = async () => {
try {
const client = await getClient();
const agent = await client.agents.retrieve(agentId);
const agent = await client.agents.retrieve(agentId, {
include: ["agent.blocks"],
});
setFreshBlocks(agent.memory?.blocks || []);
} catch (error) {
console.error("Failed to fetch memory blocks:", error);

View File

@@ -120,7 +120,9 @@ function ProfileSelectionUI({
const fetchedOptions = await Promise.all(
optionsToFetch.map(async (opt) => {
try {
const agent = await client.agents.retrieve(opt.agentId);
const agent = await client.agents.retrieve(opt.agentId, {
include: ["agent.blocks"],
});
return { ...opt, agent };
} catch {
return { ...opt, agent: null };