Hello Meenakshi Kathiresan,
Welcome to Microsoft Q&A and Thank you for reaching out.
This is the correct direction, and your assumptions are valid. Let me clarify how the Azure AI Foundry Agents system handles files today, and what the expected pattern is when using persistent threads + annotations.
1. Should files be persisted instead of deleted?
Yes, if you need citations later
Agents do not copy file contents into the thread. They only keep a file ID reference, and annotations/citations point back to that file ID.
If the file is deleted:
- the thread history still shows citations
but the underlying file is gone
therefore citations can’t be resolved
So if your product allows users to reopen older messages or view citations, the file must remain available.
If you want annotations to work later → don’t delete files immediately. Keep them for as long as the conversation history needs to remain valid.
2. Do files get chunked/embedded automatically? Do I need a vector store per thread?
When you attach a file to a message, the agent chunks and processes the file for that run only.
That embedding is not stored anywhere permanently.
Each new run processes the file again.
You only need a vector store if:
the same documents must be reused across many conversations,
you want global semantic search,
or this is acting like a knowledge base.
You do not need a vector store per thread unless conversations are extremely long and reuse large numbers of documents. For typical file uploads inside a single thread, a vector store is unnecessary.
3. Files vs Vector Store — What’s the trade-off?
Keeping files (recommended for your scenario):
Pros
Required for citations to work
Simple, native agent workflow
No extra infra
Cons
You pay for storage
You must clean up old files
Vector Store:
Pros
Helps when many threads or users need to reuse the same documents
Faster retrieval for large corpora
Good for building a knowledge base
Cons
- More architecture and cost
- Does not eliminate the need to keep original files if you rely on citations (citations always reference the file ID, not the vector entry)
Do not delete the uploaded files immediately. Keep them for as long as users need to view past messages or citations.
Use a retention policy. Example: keep files for 30 days or until the thread is archived, then delete safely.
Only introduce a vector store if you need cross-conversation retrieval or a shared knowledge base. It is not required for normal citation-based workflows.
This approach preserves citation integrity while keeping your storage footprint predictable. your storage footprint predictable.
I Hope this helps. Do let me know if you have any further queries.
If this answers your query, please do click Accept Answer and Yes for was this answer helpful.
Thank you!