Skip to content

Tanweer-Ahmed-Chiktay/agently-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agently — Legal AI Platform

Built for the H0: Hack the Zero Stack with Vercel v0 and AWS Databases Hackathon. #H0Hackathon

Live Demo: https://agently-ten.vercel.app

Architecture

Database — Aurora DSQL

15 idempotent migrations showing:

  • Matter, document, and firm data model
  • Multi-tenant firm_id isolation (no RLS needed)
  • OAuth token storage per firm
  • Workflow runs and client intake tracking
  • Custom schema design for DSQL constraints

See server/migrations/ for full schema.

Backend — Express 5 on Vercel Serverless

Core Systems:

  • server/db.ts — Custom Aurora DSQL pool manager with IAM token rotation (13min TTL, 2min pre-refresh, connection deduplication)
  • server/chat.ts — AI orchestration with AWS Bedrock, streaming responses
  • server/action.ts — Tool-calling pipeline for file retrieval, legal research, browser control
  • server/browser-router.ts — Browser agent orchestration with Steel.dev CDP and Playwright recording
  • server/court-filing-router.ts — Court e-filing automation with S3-to-Steel file pipeline and Secrets Manager credential injection

Integrations:

  • server/middleware/auth.ts — Clerk JWT validation, firm_id extraction
  • server/file-repo.ts — S3 document management with presigned URLs
  • server/matter-router.ts — Matter lifecycle management

Frontend — React 19 + Vite

  • src/components/ChatView.tsx — Real-time AI chat with streaming
  • src/components/BrowserView.tsx — Live browser agent control and Playwright recording UI
  • src/components/MatterDashboard.tsx — Matter overview and navigation
  • src/components/MatterWorkspace.tsx — Document and workflow management

Key Engineering Decisions

Aurora DSQL Integration:

  • IAM token rotation with deduplication to prevent connection storms
  • Firm_id scoping on every query (replaces RLS which DSQL doesn't support)
  • Custom DDL migration runner for DSQL's single-statement transaction requirement

Browser Automation:

  • Steel.dev for remote Chrome (not Lambda — size/timeout limits)
  • AWS ECS for Python browser-use agent (can't run on Lambda)
  • S3 → Buffer → Steel Files API → VM path pipeline for secure file uploads
  • Playwright recording via CDP action injection

Security:

  • AWS Secrets Manager for per-firm court portal credentials
  • Presigned S3 URLs with 5-minute expiry
  • Clerk-signed org IDs as firm_id (never from request body)

Tech Stack

  • React 19, Vite, TailwindCSS
  • Express 5, Node 24
  • Aurora DSQL (PostgreSQL-compatible, serverless)
  • AWS Bedrock (Claude inference)
  • AWS S3, Secrets Manager, ECS
  • Steel.dev, browser-use, Playwright
  • Clerk auth, multi-tenant

About

Legal AI platform — AI chat, browser automation for court e-filing, document management, built on Aurora DSQL, AWS Bedrock, and Clerk auth

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages