Project Info
This project did not submit a demo video on Devpost.
Inspiration
We were inpsired by the lack of resources there are for small and medium size businesses to navigate the legal system when operating their business. We aimed at helping business owners help small businesses reduce their cost of hiring lawyers for legal problems AI can easily solve.
What it does
LegalAI is an intelligent, personalized legal navigator designed specifically to empower small businesses. It aims at keeping personalized information about the client to give relevant regulations for business decisions. Additionally, it considers the local and state laws it must comply with, making it specifically designed for the laws that affect your business, in your location. LegalAI provides precise, properly cited laws and regulations for the user to read and refer to, making it very helpful for individual business owners who prefer to have properly cited evidence as opposed to the conventional internet scraping approaches seen in standard large language models.
How we built it
The framework for our project is built using Vercel's V0. LegalAI attempted use Letta's Memory AI to store important information about the client. Letta's agent would serve very useful for business owners who require truly persistent and context-aware legal guidance that continuously evolves over time, especially as their business continues to grow. Additionally, the use of Letta was meant so that the agent to had a strong memory of the previous laws and regulations it was complying to and any previous challenges it could potentially run into. Additionally, we built it usnig the Supabase backend to store chat history and saved the client's saved advices.
Challenges we ran into
We couldn't quite figure out how to fully connect Letta's agent. ChatGpt with prompts was used as a replacement for experimental purposes.
Accomplishments we're proud of
We are proud to have connected a Supabase for the backend as well as learning about Letta.
What we learned
We learned a lot about using AI tools for development. We also learned how to use AI agents to perform tasks and how useful they can be to perform very specific and domain emphasis tasks to solve a problem.
What's next
We are thinking about connecting legal databases the AI searches from to ensure up to date accurate information. Additionally, we would like it to assess whether a lawyer is needed given the circumstances the business owner has.
LawAdvisor - AI Legal Assistant with Letta Integration
A comprehensive AI-powered legal advisor application built with Next.js 15, Supabase, and Letta AI agents. Designed specifically for small businesses to get intelligent legal guidance with persistent memory and context awareness.
π§ Letta Integration Features
- Persistent Memory: Your Letta agent remembers all conversations and builds context over time
- Stateful Conversations: Unlike traditional chatbots, Letta maintains state across sessions
- Tool Access: Built-in web search and code execution capabilities
- Memory Management: Agent can update its understanding of your business needs
- Multi-Modal Support: Text, voice, and document interactions
π Features
- Letta-Powered AI Chat: Stateful legal advisor with persistent memory
- User Authentication: Secure sign up/sign in with Supabase
- Document Upload: Drag & drop support for legal documents
- Voice Conversations: VAPI integration for voice interactions
- Chat History: Searchable conversation history (backed up in Supabase)
- Real-time Persistence: Conversations saved both in Letta and Supabase
- Responsive Design: Works on desktop and mobile devices
π οΈ Tech Stack
- Framework: Next.js 15 with App Router
- Frontend: React 19, TypeScript, Tailwind CSS
- UI Components: shadcn/ui
- AI Agent: Letta Cloud (stateful AI agents)
- Backend: Supabase (PostgreSQL, Auth, Real-time)
- AI Integration: Letta Vercel AI SDK Provider
- Icons: Lucide React
π Prerequisites
Before running this project, make sure you have:
- Node.js 18+ installed
- A Supabase account and project
- Git installed
π Getting Started
1. Clone the repository
```bash git clone cd law-advisor-app ```
2. Install dependencies
```bash npm install ```
3. Set up environment variables
Create a .env.local file in the root directory:
```env
Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=https://uayysszbsksgktxzcqrc.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVheXlzc3pic2tzZ2t0eHpjcXJjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTA1NjA5MzIsImV4cCI6MjA2NjEzNjkzMn0._zMdwpsfIlhcKQ2py4FJbO6nKPEFBvDz3zdBuWp3bOc
Letta Configuration (No API key needed)
LETTA_AGENT_ID=agent-f79336f7-be3f-48eb-8d91-646515218af1 ```
4. Set up the database
- Go to your Supabase project dashboard
- Navigate to the SQL Editor
- Run the SQL script from
scripts/create-tables.sql
5. Run the development server
```bash npm run dev ```
Open http://localhost:3000 in your browser.
π§ Letta Agent Benefits
Traditional Chatbots vs Letta Agents
| Feature | Traditional Chatbots | Letta Agents | |---------|---------------------|μ§μ»¬--------------| | Memory | Session-based only | Persistent across all interactions | | Context | Limited to conversation | Builds comprehensive client profile | | Tools | Limited or none | Web search, code execution, custom tools | | Learning | Static responses | Self-improving through memory updates | | State | Stateless | Stateful with persistent memory blocks |
Legal Use Cases
- Client Profiling: Remembers business type, industry, previous legal issues
- Case Continuity: Maintains context across multiple consultations
- Document Analysis: Can reference previously uploaded documents
- Regulatory Tracking: Keeps track of compliance requirements for your business
- Legal Research: Uses web search to find current legal information
π§ Configuration
Letta Setup
No account required! The application uses a public Letta agent that's accessible without authentication. Simply ensure you have the agent ID in your environment variables.
Supabase Setup
- Create a new Supabase project
- Run the SQL script to create tables
- Enable Row Level Security (RLS)
- Copy your project URL and anon key
π Deployment
Deploy to Vercel
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy!
Environment Variables for Production
```env NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key LETTA_API_KEY=your_letta_api_key LETTA_AGENT_ID=your_agent_id ```
π Usage
- Sign Up: Create a new account
- Chat: Ask legal questions to your persistent Letta agent
- Upload: Attach documents for analysis
- Voice: Use voice conversations (VAPI integration)
- History: Search and filter past conversations
- Memory: Agent builds understanding of your business over time
π Security
- Row Level Security (RLS) enabled
- User data isolation
- Secure authentication with Supabase
- Protected API routes
- Letta Cloud security compliance
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
π License
This project is licensed under the MIT License.
π Support
For support, please open an issue on GitHub or contact the development team.
Disclaimer: This application provides general legal information and should not be considered as formal legal advice. For complex legal matters, consult with a qualified attorney.
Powered by Letta AI - Advanced stateful agents with persistent memory and tool access.
Analysis
View
Metric
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- Google GeminiIn code
- Next.jsIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Vercel AI SDKIn code
9 of 9 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
438 KB
Source files
90
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
davidcsdrone/hackathon
101 files Β· 452 KB Β· @ bb0287a
Structure
Interface
69 files Β· 68%Screens, components and styles rendered to the user.
+2 moreAPI & routing
5 files Β· 5%Request entry points: routes, handlers and controllers.
Application logic
8 files Β· 8%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- TypeScript62%
- YAML33%
- SQL2%
- Markdown1%
- CSS1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm Β· 59- @ai-sdk/google
- @hookform/resolvers
- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- +41 more
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.