Secure Document Agent

    by Rajeetvk

    1

    Private, workspace-isolated PDF Q&A using Supabase pgvector and Gemini for secure, cited document retrieval.

    Free

    Security scanned

    Works with the AI Agents you already use

    Secure Document Agent

    Example session with this skill installed

    Upload the Q3-Financial-Report.pdf to workspace 882 and ask it for the total revenue mentioned in the executive summary.

    • Read your context and instructions
    • Compiled the secure document agent
    • Generated the document

    I have uploaded the document and queried the workspace. The file was processed into 12 chunks.

    Document Analysis: Q3 Financial Report

    AttributeValueSource Citation
    Document NameQ3-Financial-Report.pdfN/A
    Workspace ID882N/A
    Total Revenue$4.2M USDExecutive Summary, Page 2
    YoY Growth12.5%Financial Highlights, Page 4
    StatusProcessedN/A

    Answer from Gemini: According to the Executive Summary on page 2, the total revenue for the third quarter reached $4.2 million USD. This represents a 12.5% increase compared to the same period last year, primarily driven by the new enterprise software vertical.

    Next steps

    1. Run node cli.js ask 882 "Summarize the risk factors section" for a deeper dive.
    2. Use node cli.js tasks 882 to see if any automated follow-ups were generated.
    3. Add node cli.js upload 882 path/to/appendix.pdf if you need to correlate these figures with raw data.

    Q3-Financial-Report.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Managing sensitive document analysis often forces a choice between data privacy and AI utility. This skill provides a self-hosted Node.js environment that processes PDFs locally and stores embeddings in your own Supabase instance, ensuring multi-tenant isolation through workspace-level filtering.

    What it does

    • Isolated RAG provides document Q&A where vector searches are strictly scoped to specific workspace IDs.
    • Local PDF Processing chunks and embeds documents using Gemini before syncing them to your private Supabase pgvector store.
    • Cited Responses generates answers that include specific source document references or a clear refusal if information is missing.
    • Task Integration allows users to create, list, and complete document-related tasks directly through the Q&A interface.
    • Webhook Delivery supports sending summaries or findings to Discord via configured webhooks.

    How it works

    1. Infrastructure Setup involves configuring a Supabase project with pgvector and providing a Google Gemini API key in a local .env file.
    2. Workspace Management uses the CLI to create isolated buckets for different document collections, such as HR or Finance.
    3. Document Ingestion processes local PDF files, generating embeddings that are stored with workspace-specific metadata.
    4. Natural Language Querying executes the ask command to retrieve context-aware answers from the vector database.

    Frameworks & tools

    Node.js 18+, Supabase (pgvector), Google Gemini (gemini-2.5-flash-lite and gemini-embedding-2), and Discord webhooks.

    Why this beats prompting it yourself

    Prompting a standard LLM requires pasting sensitive data into a chat window, risking data leaks and hitting context limits. This skill automates the retrieval-augmented generation (RAG) pipeline with strict workspace isolation, ensuring your HR data never mixes with your Finance data during a search.

    Use cases

    • Querying internal HR policies and benefits documents without public cloud exposure.
    • Managing separate research projects where data isolation between topics is mandatory.
    • Converting document findings into actionable project tasks via a unified CLI.
    • Automating document summaries and broadcasting them to team Discord channels.

    Known limitations

    Only PDF files are supported. Scanned, image-only PDFs will return zero chunks. Embedding speed is throttled to approximately 1.5 seconds per chunk to respect API rate limits.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    • Free with an Agensi account

    Software
    Node.js

    Permissions

    Terminal / Shell
    Read Files
    Network Access
    Write Files
    Environment Variables
    Listed5 days ago

    What's inside

    Creator

    Rajeetvk

    Rajeetvk

    Frequently Asked Questions

    Unlike standard AI chats that mix your data, this skill uses workspace-level filtering in Supabase pgvector to ensure that documents from different departments, like HR and Finance, remain strictly isolated during retrieval.

    You will receive the full Node.js source code for the skill, the database schema for the Supabase pgvector integration, and documentation for configuring your local environment and Discord webhooks.

    The agent currently supports text-based PDF files; please note that scanned documents or image-only PDFs require OCR before they can be processed by this skill.

    Yes, you will need a Supabase account with the pgvector extension enabled and a Google Gemini API key to handle the embeddings and natural language generation.

    The skill is built for Node.js 18+ environments and is designed to integrate with any agent framework that supports custom tool calls or CLI-based task execution.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Free