{"schemaVersion":"1.0","source":"The Workflow Finder","sourceUrl":"https://www.theworkflowfinder.com","license":"Free to use with attribution and a link to the cited page","generated":"2026-08-28","workflow":{"title":"Connect an Agent to Your Own Data Safely","slug":"connect-an-agent-to-your-own-data-safely","url":"https://www.theworkflowfinder.com/workflows/connect-an-agent-to-your-own-data-safely","description":"Give an agent retrieval access to your own documents without pointing it at everything, scoping both what gets indexed and what a given query can actually pull back.","difficulty":"Advanced","timeEstimate":"3-4 hours, one-time setup","schemaDuration":"PT4H","expectedResult":"An agent with retrieval access scoped to exactly the data its task requires, with sensitive content excluded before indexing and access enforced again at query time, plus a log of every retrieval it makes.","tags":["Agents","Privacy","Retrieval"]},"steps":[{"position":1,"title":"Map the Agent's Actual Task to a Specific Data Scope","instructions":"Name exactly which documents, folders, or sources the agent's task requires. Resist the default of pointing it at an entire shared drive 'to be safe' -- a narrower scope isn't just cleaner, it's a smaller blast radius if something later goes wrong with the agent or its credentials.","input":"Workflow inputs: the topic, goal, or raw materials the user is starting from.","output":"Handoff artifact consumed by Step 2 (\"Exclude Sensitive Content Before It's Ever Indexed\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[]},{"position":2,"title":"Exclude Sensitive Content Before It's Ever Indexed","instructions":"Before ingesting anything with LlamaIndex, explicitly exclude folders and document types that carry secrets, credentials, PII, or HR and financial records. Excluding at ingestion is more reliable than trying to filter sensitive content back out after it's already been embedded into the index.","input":"Output of Step 1 (\"Map the Agent's Actual Task to a Specific Data Scope\").","output":"Handoff artifact consumed by Step 3 (\"Enforce Access Scope Again at Query Time\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[{"slug":"llamaindex","name":"LlamaIndex","url":"https://www.theworkflowfinder.com/tools/llamaindex","category":"Developer Tools","pricing":"free","capabilities":["API integration","Multi-step agent orchestration"]}]},{"position":3,"title":"Enforce Access Scope Again at Query Time","instructions":"Store a scope tag with every indexed chunk and use Qdrant's payload filtering to constrain retrieval to only the tags a given agent or user is allowed to see. This means a mistake in the indexing scope doesn't automatically become a mistake in what the agent can retrieve -- query-time filtering is a second, independent check, not a restatement of the first one.","input":"Output of Step 2 (\"Exclude Sensitive Content Before It's Ever Indexed\").","output":"Handoff artifact consumed by Step 4 (\"Use Read-Only Credentials and Log Every Retrieval\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[{"slug":"qdrant","name":"Qdrant","url":"https://www.theworkflowfinder.com/tools/qdrant","category":"Developer Tools","pricing":"freemium","capabilities":["API integration"]}]},{"position":4,"title":"Use Read-Only Credentials and Log Every Retrieval","instructions":"Connect the ingestion pipeline with read-only access wherever the source system allows it, and log every query the agent makes against the index, what it asked and what it got back, so there's an audit trail to check if something looks wrong later.","input":"Output of Step 3 (\"Enforce Access Scope Again at Query Time\").","output":"Handoff artifact consumed by Step 5 (\"Know Where This Still Isn't Bulletproof\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[]},{"position":5,"title":"Know Where This Still Isn't Bulletproof","instructions":"Query-time filtering only protects what was tagged correctly at ingestion -- if a sensitive document was already indexed elsewhere without the same exclusion rules, scoping this agent's queries doesn't undo that. Semantic search can also occasionally surface a near-miss result that a keyword-based exclusion rule wouldn't have caught; exclusion at ingestion and filtering at query time are complementary layers, not a single guarantee.","input":"Output of Step 4 (\"Use Read-Only Credentials and Log Every Retrieval\").","output":"Final workflow output: An agent with retrieval access scoped to exactly the data its task requires, with sensitive content excluded before indexing and access enforced again at query time, plus a log of every retrieval it makes.","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[]}]}