Inspiration

DocWeave started from a boring but real problem for small and medium-sized enterprises (SMEs): folders full of PDFs with names like scan_000184.pdf, attachment_081.pdf, and document_final_02.pdf. These folders often contain invoices, receipts, purchase orders, delivery notes, contracts, and operational documents, but their filenames reveal nothing about their contents.

The problem is not renaming one PDF. The real problem is massive PDF renaming and reorganization: turning a chaotic folder into a readable archive without losing control, auditability, or the ability to undo mistakes.

A normal AI renamer can suggest better names, but it usually loses the most important thing: memory. After files move, users still need to know what each document was called before, where it came from, why the agent renamed it, and how to undo the change.

I designed DocWeave to treat CockroachDB as the system of record for durable agent memory. The agent proposes, but the human decides. CockroachDB remembers the full lifecycle.

What it does

DocWeave is an agentic glass dashboard for massive PDF renaming and reorganization for SMEs.

A user chooses a folder, scans the PDFs, previews documents, and starts the analysis. Amazon Bedrock reads the extracted PDF evidence and proposes a document class, a clearer filename, and a destination folder. The dashboard then presents a review table where the user can approve or reject individual proposals, approve the full batch, approve only selected files, or reopen a PDF preview when unsure.

Approved documents are renamed and moved into readable folders such as DocWeave Organized/Invoices. Restore is a first-class workflow: CockroachDB stores the original filename, original directory, current path, model proposal, human decision, and file history so the user can later restore one file or an entire batch.

How we built it

I built DocWeave as a Python desktop application with PySide6. Its visual glass dashboard combines folder selection, PDF scanning, embedded previews, agent analysis, batch review, human approval, and restore in one interface.

Amazon Bedrock uses Amazon Nova to read extracted PDF evidence and generate structured classifications, filename proposals, destination folders, confidence values, and explanations.

I designed CockroachDB as the persistent memory layer rather than a secondary log. The core memory chain is:

documents -> agent_runs -> proposals -> human_decisions -> file_history

This memory records what the agent analyzed, what it proposed, what the human decided, which filesystem operation occurred, and how to return each PDF to its original name and directory.

I used two CockroachDB tools required by the hackathon:

  1. ccloud CLI verifies the live CockroachDB Cloud serverless cluster docweave-memory, including its region, status, SQL users, and operational readiness.
  2. CockroachDB Agent Skills guided my schema and transaction design, including stable primary keys, idempotent writes, proposal locking, append-only human decisions, restore-safe file history, and bounded retry handling for serializable conflicts.

I deployed the cloud architecture with:

  • Amazon Bedrock for document reasoning and structured proposals.
  • AWS Lambda for the cloud API and asynchronous analysis worker.
  • Amazon S3 for PDF artifacts and JSON analysis results.
  • Amazon SQS for queued analysis jobs.
  • Amazon API Gateway for public cloud endpoints.
  • Amazon CloudWatch Logs for runtime evidence.
  • AWS Secrets Manager dynamic references for secure CockroachDB runtime configuration.
  • AWS CloudFormation for reproducible infrastructure deployment.

Challenges we ran into

The hardest part was making the agent useful without making it reckless. A file-management agent that silently renames hundreds of PDFs is not trustworthy. I had to preserve evidence, proposals, decisions, original paths, current paths, and restore records as durable memory rather than treating them as temporary logs.

Another challenge was making large batch reviews understandable. The interface needed to support hundreds of files without forcing users to approve them one at a time. I designed the dashboard to provide full-batch and selective approval while keeping PDF preview immediately available for uncertain cases.

Restore was also more complex than simply renaming a file again. I had to retain the original and current paths, record every approved operation, prevent accidental overwrites, and make individual or batch restoration understandable from the dashboard.

Accomplishments that we're proud of

I am proud that DocWeave completes the full workflow from anonymous PDFs to organized folders while preserving human authority over every filesystem change.

The dashboard can analyze large batches, present original and proposed filenames side by side, organize approved PDFs into content-based folders, and restore selected files or complete batches to their original names and directories.

CockroachDB makes the result explainable and reversible by preserving document records, Bedrock agent runs, proposals, human decisions, and file history as persistent memory.

I also verified the cloud integration end to end: the AWS worker classified a PDF with Amazon Bedrock, stored its analysis artifact in Amazon S3, and persisted the resulting proposal memory in CockroachDB. This proves that the cloud services participate in the real agent workflow rather than existing only as initialized infrastructure.

What we learned

I learned that agentic memory matters most when the agent changes the world outside the chat. For massive PDF reorganization, the database is not a backend detail. CockroachDB is what makes the workflow explainable, auditable, and reversible.

I also learned that human-in-the-loop design is not just an approval button. Users need readable proposals, selective and batch controls, immediate document previews, visible feedback, and a reliable path back to the original state.

What's next for DocWeave

My next steps are packaging the desktop app as a signed Windows installer, adding multi-user workspaces, and evaluating CockroachDB Distributed Vector Indexing for semantic related-document retrieval.

Built With

  • agentic-memory
  • amazon-api-gateway
  • amazon-bedrock
  • amazon-cloudwatch
  • amazon-sqs
  • amazon-web-services
  • aws-lambda
  • aws-secrets-manager
  • ccloud-cli
  • cloudformation
  • cockroachdb
  • cockroachdb-agent-skills
  • cockroachdb-cloud
  • desktop-app
  • document-management
  • human-in-the-loop
  • pdf-processing
  • pypdf
  • pyside6
  • pytest
  • python
Share this project:

Updates