File summaries
Store short per-file summaries and structural information so coding agents can find the right file without rereading the repository.
So that coding agents don't have to reread a repository's files from scratch every time, Agent Memory stores short per-file summaries and structural information. When the agent asks "which file handles payment validation?", it searches these summaries.
What is stored?
One record per file: path, type, size, content digest (hash), summary and purpose, namespace, class and method names, imports/exports, dependencies. Structural information is extracted with patterns for these file types: .cs, .ts / .tsx, .json / .csproj. The summary is generated from the beginning of the file and this information (with an LLM, if one is available).
When a file is sent again, the summary is not regenerated unless its size changed noticeably (about 10%).
Usage
# Document files (at most 50 files per request; content as text)
curl -s -X POST $API/v1/files/document -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d "{\"workspaceId\":\"$WS\",\"files\":{
\"src/Billing/InvoiceNumberGenerator.cs\":\"namespace Shop.Billing; public class InvoiceNumberGenerator { … }\"}}"
# {"documented":1}
# Search
curl -s -X POST $API/v1/files/search -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d "{\"workspaceId\":\"$WS\",\"query\":\"invoice number generation\",\"topK\":5}"
# List
curl -s "$API/v1/files/$WS" -H "Authorization: Bearer $KEY"MCP: search_files(query, topK).
Limits
- Only text content is accepted; PDFs, images, audio and binary files are not processed.
- Files are not split into chunks and searched per chunk; each file has a single summary and a single vector.
- File summaries are not added to the
search_memorycontext automatically; query them separately withsearch_files. - File contents are not written to memory as records; only the summary and structural information are stored.
Related pages
Blocks and user profiles
Pin information the agent should see in every task with memory blocks, and keep per-end-user profiles that join the context when a userId is given.
Feedback and outcomes
Report a task's real outcome and which retrieved memories you used, so Agent Memory can credit exactly the memories it delivered.