---
id: get-graph
title: "Get memory graph data"
description: "Retrieve graph data for visualization, optionally filtered by fact_type (world/agent/opinion). Limited to 1000 most recent items."
sidebar_label: "Get memory graph data"
hide_title: true
hide_table_of_contents: true
api: eJzNV21v20YS/iuD7ZfEoCVZTYEDv6mN4zOQOoGt9oDahjEmR+TWy112dyhFJ+i/H2a5lKk4boHiDjh9kbSceWbm2XnjTjFWQeW36lcdOjT638jaWXWfqZJC4XUb/+bqmthrWhNUHtsaSmSElfOwHqtl4KI8GrOFlTZMnkp43MIKC37gbUvwZuO8KadYkeWpa7XVzr6dwEfdaKYS2MHZbDaDxgUGTwVZBs3UhInKlGvJRzuXpcpVRfwQnVGZatFjQ0xeQtkpiw2pXEUjD7pUmdISQ4sswp7+6LSnUuXsO8pUKGpqUOU7JR6qXAX22lYqU6zZyMFCgOCyVPt9dkA/xDTA/9GR3x7hr9CEIwNot59W0cVjUwKbTmxnjNrfPxv/gAXDUh7u5dhTaJ0NFARvPpvJ1/FV3XRFQSGsOgPXSVhlqnCWyXL0om2NLiKT09+D6OxGPrZeeGbdW7Cu7H/EW4jaZan7S/48kuypTDG4x9+pYLU/HKD3uB0RehVR95misvofwJ9HVHmOj4YevNv8920sBRquBVqEHKN56KzmMEokbZkq8mMtkYNfotx+/7W1ce7cJuoHjo6COTY4SpYLKYj3yDi6+a8LuX8AjSvJxBoelTTZsnXaspQbfcGmFdTdcE23O7XyrlG5OosuqFzN1SGIQA1a1oXK1IZ0VbPKZ5N/SM6mJLrdKV0mZYOPZKS0jC4INs4/BUCGC+cqQ8+YsVvE8oia85Hmj+4RNlKXtX5K5Xqkc398/be7vgS+sMrVv5x/Am1XTuhBFq35bP7udHZ2evYDnM3y72dCgGXdp0Zy883n8+ubT1dvs+QnvPl0fbG4uvxtsbz8dPVWGoF4iY/F2fz7dz9MJkJjMvntQKOX49yZ7+WTqXfz+cvK/hWNLmPdwrn3zv/9si6JUZujojgWMK44Lpm/7lxDtu/vX6+aj653UGqmCdWfNd2fKQSs6LkEXxeNZAw98s+LSuLqTSe5UfE809uz+3oY73v6vmVsEPnncvn5BWB/tw1x7dIIi8OLa5WrKbZ6uj7rR2OY7obptZ8OUy4mrNBwNJZ+psb5LSw+X76o9Tu7AKamdR7N6VCe0PQKYRuYmtgAFpfQWwWukSGw8xQy8GnmhwzQluAJg7MB3Jp8D6IpTO7snf3uO/hAyJ2nIH9P4OTkR+SiHny7YeexopOTPP4kaDrDujV0gAFarXShybLZwkZzDdixa1D8lUEL9IU9FhJXj38zRHND6ItaoD/o6KShNVp+Ru6CthVYcQ8NGLRVhxWBTGst/graYcbCh7i1aFtFZyM2YOFdCBD7SvRGCInc9x4lftI2EyCQ7CNMZtujL2ttn+A8tVYBviArqwxBakkdGkAbNuQDPGKgEpxNJnQZ29A2mhiC6nFjs4ejxU3ALy1T5GpNw133Hf5oV+sh3ruia8TM0mPxlMKOv3t7aIWrhFIm4dDfUNcG8gyha1vnOeXBwhe1ZiokGeRoWdOQaV2gkN/ZU2EkJSV81PYpiM2fnLVUjK4tZiJ6gsK4QKAtsG6oVz9c/gv1IcnjBhp0ow36EWuifN7T+ReWJU7psyz+Y0MwDIPkQesJS0mshRB9xL0xOt4ce1yTD9gP2cRhqik0dxbSJ3VxLGIXT9vlUDmROulEMj5knj+LLFosaoL5RGZV52Um1sxtyKfTzWYzwfh44nw1Tbph+vHyp/Orm/PT+WQ2qbkxAiw+9u3ibDKbzOSodYEbtCNbF8THuSTbwtf9Zvc8jf4v3hdSa5YCm7YGdZw6kahdarq3ClutMrWWlaRvgSpT+ejFoe+995mqXWBR2O2kQH/xZr+X437pl7lY6iDrxvPa/0Tbr14T1mg68SiO/TV6LQrfVn6V2DfXaZq9hddCHIaW3Y5tDg4dgotzuiYsyUcf+seLoqCWR4ov1gpx/jDCLs6Xar//Dw9s58g=
sidebar_class_name: "get api-method"
info_path: docs/api-reference/endpoints/agent-memory-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Get memory graph data"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v1/agents/{agent_id}/graph"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Retrieve graph data for visualization, optionally filtered by fact_type (world/agent/opinion). Limited to 1000 most recent items.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"fact_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Type"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges"},"table_rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Table Rows"},"total_units":{"type":"integer","title":"Total Units"}},"type":"object","required":["nodes","edges","table_rows","total_units"],"title":"GraphDataResponse","description":"Response model for graph data endpoint.","example":{"edges":[{"from":"1","to":"2","type":"semantic","weight":0.8}],"nodes":[{"id":"1","label":"Alice works at Google","type":"world"},{"id":"2","label":"Bob went hiking","type":"world"}],"table_rows":[{"context":"Work info","date":"2024-01-15 10:30","entities":"Alice (PERSON), Google (ORGANIZATION)","id":"abc12345...","text":"Alice works at Google"}],"total_units":2}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}}
>
  
</StatusCodes>


      