wozhub grounds its rental-law AI in actual Argentine statute

Ask wozhub's fork about a lease or a rent review and the assistant now answers from real statute text, not the model's best guess.

searchintegration

When a question looks like a rent review, an expense audit, or a lease summary, the fork quietly pulls the relevant Argentine law text and hands it to the AI before it replies. The grounding comes from Legalize, a third-party service that serves up legal-corpus text on demand, so answers lean on what the statute says rather than what the model half-remembers.

wozhub built it to fail gracefully: if Legalize is unreachable, chat keeps working without the citations instead of falling over. There's caching and a monthly usage cap to stay inside the free tier, though both live only in memory and reset on every restart, which makes the quota guard more hopeful than airtight. As built, it's wired specifically for Argentina.

So what Worth a look for anyone building jurisdiction-grounded legal AI - the retrieval-and-fallback structure is the reusable idea, even if the Argentine specifics aren't yours.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from wozhub/inquilino, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
619befc8 feat: integrate Legalize API for Argentine law context David Wozniak 2026-05-27 ↗ GitHub
commit body
- Add @legalize-dev/sdk dependency
- Create legalize.ts: SDK client wrapper with 24h in-memory cache
- Create legalContext.ts: builds legal context from search results
- Wire legal context into chat route (via buildMessages systemPromptExtra)
- Wire legal context into tabular review route
- Update all system prompts from Mike to Inquilino
- Add LEGALIZE_API_KEY to .env.example
- Intent detection: rent_review / expense_audit / lease_summary
32e8f52b feat: add monthly rate limiting for Legalize API David Wozniak 2026-05-27 ↗ GitHub
- Track API calls per calendar month (resets on 1st)
- Default limit 4500/mo (safety buffer under 5k free tier)
- Configurable via LEGALIZE_MONTHLY_LIMIT env var
- Graceful degradation: AI still works without law citations when limit hit

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-615.md from inside the repo you want the changes in.

⬇ Download capture-thread-615.md