pasal
The first open, AI-native Indonesian legal platform. MCP server + web app giving Claude grounded access Indonesian laws.
Stars: 102
Pasal.id is the first open, AI-native platform for Indonesian law, providing access to real Indonesian legal data through a REST API and a web app. It offers full-text legal search, structured reading, grounded AI tools, public JSON endpoints, crowd-sourced corrections, amendment tracking, and a bilingual UI. The platform is powered by Opus 4.6, ensuring accuracy through a self-improving correction flywheel. Key features include a grounded legal access server, multimodal verification agent, self-improving feedback loop, human-in-the-loop safety, and Claude Code as a development tool. The technical depth includes SQL migrations, search optimization, append-only revision audit trail, transaction-safe mutations, row-level security, input sanitization, ISR with on-demand revalidation, atomic job claiming, and coverage of 11 regulation types from 1945 to 2026.
README:
Demo Video · Website · Connect to Claude · REST API · AGPL-3.0 License
280 million Indonesians have no practical way to read their own laws. The official legal database (peraturan.go.id) offers only PDF downloads: no search, no structure, no API. When you ask AI about Indonesian law, you get hallucinated articles and wrong citations because no grounded data source exists.
Connect Claude to real Indonesian legal data in one command:
claude mcp add --transport http pasal-id https://pasal-mcp-server-production.up.railway.app/mcp
Then ask:
"Apa saja hak pekerja kontrak menurut UU Ketenagakerjaan?" (What are contract worker rights under the Labor Law?) "Jelaskan pasal tentang perlindungan data pribadi" (Explain articles on personal data protection) "Apakah UU Perkawinan 1974 masih berlaku?" (Is the 1974 Marriage Law still in force?)
Claude searches 40,000+ regulations and 937,000+ structured articles, cites specific Pasal (articles), and gives grounded answers. No hallucination.
Or browse the web app at pasal.id.
| Feature | Description | |
|---|---|---|
| Search | Full-Text Legal Search | Indonesian stemmer + 3-tier fallback across 937,000+ articles |
| Read | Structured Reader | Three-column law reader with TOC, amendment timeline, and verification badges |
| AI | MCP Server | 4 grounded tools giving Claude access to actual legislation with exact citations |
| API | REST API | Public JSON endpoints for search, browsing, and article retrieval |
| Correct | Crowd-Sourced Corrections | Anyone can submit corrections; AI verifies before applying |
| Verify | AI Verification Agent | Opus 4.6 vision compares parsed text against original PDF images |
| Track | Amendment Chains | Full relationship tracking: amendments, revocations, cross-references |
| Globe | Bilingual UI | Indonesian + English interface via next-intl (legal content stays Indonesian) |
The entire codebase, from the Next.js frontend to the MCP server to the data pipeline, was built with Claude Opus 4.6 via Claude Code during the hackathon period. But Opus 4.6 isn't just the development tool. It's embedded in the product itself, running a self-improving correction flywheel that makes the platform more accurate over time:
┌───────────────────────────────┐
│ Users submit corrections │
│ via pasal.id web app │
└──────────────┬────────────────┘
▼
┌───────────────────────────────┐
│ Opus 4.6 Verification Agent │
│ Uses VISION to compare text │
│ against original PDF images │
│ → accept / reject / correct │
└──────┬───────────────┬────────┘
│ │
≥85% conf │ │ parser_feedback
auto-apply │ │ from each review
▼ ▼
┌──────────┐ ┌───────────────────────┐
│ Database │ │ Opus 4.6 reads the │
│ updated │ │ parser source code │
│ via safe │ │ + aggregated feedback │
│ revision │ │ → creates GitHub │
│ function │ │ issues with fixes │
└──────────┘ └───────────────────────┘
Claude gets 4 tools to search real legislation, retrieve specific articles, check amendment status, and browse regulations. All returning real data with exact citations, not generated text.
When users submit corrections, Opus 4.6 uses vision to compare the parsed text against the original PDF page image. It reads the actual PDF, character by character, and makes accept/reject/correct decisions with confidence scores. (scripts/agent/opus_verify.py)
Every verification produces parser_feedback: notes on why the parser got it wrong. Opus 4.6 aggregates this feedback, fetches the parser source code from GitHub, analyzes systematic bugs, and creates GitHub issues with specific code fixes. The AI improves the pipeline that feeds it. (scripts/agent/parser_improver.py)
High-confidence corrections (≥85%) are auto-applied through a transaction-safe revision function. Below that threshold, corrections are queued for admin review. Every mutation is logged in an append-only audit trail. Nothing is silently overwritten.
The entire platform was built with Claude Code guided by 489 lines of CLAUDE.md specifications across 4 directories (root, web app, MCP server, and data pipeline), encoding architecture decisions, coding conventions, database invariants, and domain knowledge.
┌──────────────────────────────────────┐
│ Supabase (PostgreSQL) │
│ 40,143 regulations · 937,155 Pasal │
│ 49 migrations · FTS · RLS │
└─────────┬──────────────┬─────────────┘
│ │
┌────────────────┘ └────────────────┐
▼ ▼
┌─────────────────────┐ ┌───────────────────────┐
│ MCP Server (Py) │ │ Next.js 16 Web App │
│ FastMCP · Railway │ │ Vercel · pasal.id │
│ │ │ │
│ · search_laws │ │ · /search │
│ · get_pasal │ │ · /jelajahi │
│ · get_law_status │ │ · /peraturan/[type] │
│ · list_laws │ │ · /connect · /api │
└─────────┬───────────┘ └───────────────────────┘
│
▼ ┌───────────────────────┐
┌─────────────────────┐ │ Opus 4.6 Correction │
│ Claude / AI │ │ Agent · Railway │
│ Grounded answers │ │ │
│ with citations │ │ Verify · Auto-apply │
└─────────────────────┘ │ Parser improvement │
└───────────────────────┘
This isn't a weekend hack. Key engineering decisions:
- 49 SQL migrations with iterative schema evolution, not a single dump
-
3-layer search with identity fast-path: regex-detected regulation IDs (score 1000) → works FTS (score 1-15) → content FTS with 3-tier fallback (
websearch_to_tsquery→plainto_tsquery→ILIKE), capped candidate CTEs to prevent O(N) snippet generation -
Append-only revision audit trail: content is never directly UPDATE'd; all mutations go through
apply_revision()SQL function in a single transaction (revision insert + node update + suggestion update) - Transaction-safe content mutations: if any step fails, everything rolls back
- Row-Level Security on all tables with public read policies for legal data
-
Input sanitization:
[^a-zA-Z0-9 ]stripped before tsquery to prevent injection - ISR with on-demand revalidation for static generation + instant updates when content changes
-
Atomic job claiming:
FOR UPDATE SKIP LOCKEDprevents duplicate processing in the scraper pipeline - 11 regulation types covering laws from 1945 to 2026, from official government sources
| Tool | Description |
|---|---|
search_laws |
Full-text keyword search across all legal provisions with Indonesian stemming |
get_pasal |
Get the exact text of a specific article (Pasal) by law and number |
get_law_status |
Check if a law is in force, amended, or revoked with full amendment chain |
list_laws |
Browse available regulations with type, year, and status filters |
| Layer | Technology |
|---|---|
| Frontend | Next.js 16 (App Router), React 19, TypeScript, Tailwind v4, shadcn/ui |
| Database | Supabase (PostgreSQL FTS with indonesian stemmer + pg_trgm) |
| MCP Server | Python + FastMCP, deployed on Railway |
| Correction Agent | Claude Opus 4.6 (vision + code analysis), deployed on Railway |
| Data Pipeline | Python, httpx, PyMuPDF, BeautifulSoup |
| Search | 3-layer: identity fast-path → works FTS → content FTS with ILIKE fallback |
| i18n | next-intl with Indonesian (default) + English |
Currently covers 40,143 regulations across 11 types including:
- UU (Undang-Undang) · Primary laws from parliament
- PP (Peraturan Pemerintah) · Government regulations
- Perpres (Peraturan Presiden) · Presidential regulations
- UUD · The 1945 Constitution
- Permen, Perda, and more from official government sources
# Frontend
cd apps/web && npm install && npm run dev
# MCP Server
cd apps/mcp-server && pip install -r requirements.txt && python server.py
# Correction Agent
cd scripts && pip install -r requirements.txt
python -m scripts.agent.run_correction_agent
Built with Claude Opus 4.6 for the Claude Code Hackathon
AGPL-3.0
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for pasal
Similar Open Source Tools
pasal
Pasal.id is the first open, AI-native platform for Indonesian law, providing access to real Indonesian legal data through a REST API and a web app. It offers full-text legal search, structured reading, grounded AI tools, public JSON endpoints, crowd-sourced corrections, amendment tracking, and a bilingual UI. The platform is powered by Opus 4.6, ensuring accuracy through a self-improving correction flywheel. Key features include a grounded legal access server, multimodal verification agent, self-improving feedback loop, human-in-the-loop safety, and Claude Code as a development tool. The technical depth includes SQL migrations, search optimization, append-only revision audit trail, transaction-safe mutations, row-level security, input sanitization, ISR with on-demand revalidation, atomic job claiming, and coverage of 11 regulation types from 1945 to 2026.
clawd-cursor
Clawd Cursor is an AI Desktop Agent that operates on a Smart 3-Layer Pipeline. It can work with any AI provider, run with local models for free, and acts as a self-healing doctor. The tool offers features like Install/Uninstall commands, Auto OpenClaw registration, Dashboard favorites, Credential detection, and Doctor UX. It integrates with OpenClaw to allow desktop control through natural language. Users can interact with Clawd Cursor through a Web Dashboard, browser foreground focus, and smart task handoff. The tool's 5-layer pipeline ensures efficient task execution, with different layers handling various aspects of the tasks. Clawd Cursor also provides self-healing capabilities to adapt at runtime in case of model failures or API rate limitations.
QodeAssist
QodeAssist is an AI-powered coding assistant plugin for Qt Creator, offering intelligent code completion and suggestions for C++ and QML. It leverages large language models like Ollama to enhance coding productivity with context-aware AI assistance directly in the Qt development environment. The plugin supports multiple LLM providers, extensive model-specific templates, and easy configuration for enhanced coding experience.
jat
JAT is a complete, self-contained environment for agentic development, offering task management, agent orchestration, code editor, git integration, and terminal access all in a single IDE. It allows users to connect various external sources like RSS, Slack, Telegram, and Gmail to create tasks and spawn agents automatically. JAT supports hands-on supervision of agents or autonomous operation. The tool provides features such as multi-agent management, task management, smart question UI, epic swarm for parallel agent spawning, autonomous triggers, task scheduling, error recovery, and a skill marketplace. JAT is designed to be a control tower for managing a swarm of agents, whether actively supervised or running autonomously.
OpenScribe
OpenScribe is an open-source AI medical scribe tool designed to assist clinicians in recording patient encounters, transcribing audio, and generating structured draft clinical notes using large language models (LLMs). The tool offers a default web deployment path with local Whisper transcription and Anthropic Claude note generation. It is currently in early development (v0.x) and not suitable for clinical practice yet, intended for evaluation, testing, and development purposes only. The project aims to provide a local-first, privacy-conscious, and modular alternative to cloud-dependent clinical documentation tools.
mesh
MCP Mesh is an open-source control plane for MCP traffic that provides a unified layer for authentication, routing, and observability. It replaces multiple integrations with a single production endpoint, simplifying configuration management. Built for multi-tenant organizations, it offers workspace/project scoping for policies, credentials, and logs. With core capabilities like MeshContext, AccessControl, and OpenTelemetry, it ensures fine-grained RBAC, full tracing, and metrics for tools and workflows. Users can define tools with input/output validation, access control checks, audit logging, and OpenTelemetry traces. The project structure includes apps for full-stack MCP Mesh, encryption, observability, and more, with deployment options ranging from Docker to Kubernetes. The tech stack includes Bun/Node runtime, TypeScript, Hono API, React, Kysely ORM, and Better Auth for OAuth and API keys.
ClawX
ClawX bridges the gap between powerful AI agents and everyday users by providing a desktop interface for OpenClaw AI agents. It offers an accessible, beautiful desktop experience for automating workflows, managing AI-powered channels, and scheduling intelligent tasks. ClawX comes pre-configured with best-practice model providers, supports multi-language settings, and allows fine-tuning of advanced configurations via Settings → Advanced → Developer Mode.
OpenFlux
OpenFlux is an open-source AI Agent desktop client that offers multi-LLM support, long-term memory capabilities, browser automation, and tool orchestration. It features multi-agent routing, support for various LLM models, long-term memory with conversation distillation, browser automation using Playwright, a MCP tool ecosystem, voice interaction, sandbox isolation for safe code execution, desktop control, and remote access. The tool is built on Tauri v2 with a Rust backend and TypeScript frontend, providing high performance and a small footprint. It serves as the desktop entry point in the Enterprise AI Assistant ecosystem, working alongside NexusAI to create a complete AI workflow system.
forge-orchestrator
Forge Orchestrator is a Rust CLI tool designed to coordinate and manage multiple AI tools seamlessly. It acts as a senior tech lead, preventing conflicts, capturing knowledge, and ensuring work aligns with specifications. With features like file locking, knowledge capture, and unified state management, Forge enhances collaboration and efficiency among AI tools. The tool offers a pluggable brain for intelligent decision-making and includes a Model Context Protocol server for real-time integration with AI tools. Forge is not a replacement for AI tools but a facilitator for making them work together effectively.
Shannon
Shannon is a battle-tested infrastructure for AI agents that solves problems at scale, such as runaway costs, non-deterministic failures, and security concerns. It offers features like intelligent caching, deterministic replay of workflows, time-travel debugging, WASI sandboxing, and hot-swapping between LLM providers. Shannon allows users to ship faster with zero configuration multi-agent setup, multiple AI patterns, time-travel debugging, and hot configuration changes. It is production-ready with features like WASI sandbox, token budget control, policy engine (OPA), and multi-tenancy. Shannon helps scale without breaking by reducing costs, being provider agnostic, observable by default, and designed for horizontal scaling with Temporal workflow orchestration.
Memoh
Memoh is a multi-member, structured long-memory, containerized AI agent system platform that allows users to create AI bots for communication via platforms like Telegram, Discord, and Lark. Each bot operates in its own isolated container with a memory system for file editing, command execution, and self-building. Memoh offers a secure, flexible, and scalable solution for multi-bot management, distinguishing and remembering requests from multiple users and bots.
LuaN1aoAgent
LuaN1aoAgent is a next-generation Autonomous Penetration Testing Agent powered by Large Language Models (LLMs). It breaks through the limitations of traditional automated scanning tools by integrating the P-E-R Agent Collaboration Framework with Causal Graph Reasoning technology. LuaN1ao simulates the thinking patterns of human security experts, elevating penetration testing from automated tools to an autonomous agent. The tool offers core innovations like the P-E-R Agent Collaboration Framework, Causal Graph Reasoning, and Plan-on-Graph Dynamic Task Planning. It provides capabilities for tool integration, knowledge enhancement, web visualization, and Human-in-the-Loop mode. LuaN1aoAgent is designed for authorized security testing and educational purposes only, with strict usage restrictions and technical risk warnings.
aiohomematic
AIO Homematic (hahomematic) is a lightweight Python 3 library for controlling and monitoring HomeMatic and HomematicIP devices, with support for third-party devices/gateways. It automatically creates entities for device parameters, offers custom entity classes for complex behavior, and includes features like caching paramsets for faster restarts. Designed to integrate with Home Assistant, it requires specific firmware versions for HomematicIP devices. The public API is defined in modules like central, client, model, exceptions, and const, with example usage provided. Useful links include changelog, data point definitions, troubleshooting, and developer resources for architecture, data flow, model extension, and Home Assistant lifecycle.
open-computer-use
Open Computer Use is an open-source platform that enables AI agents to control computers through browser automation, terminal access, and desktop interaction. It is designed for developers to create autonomous AI workflows. The platform allows agents to browse the web, run terminal commands, control desktop applications, orchestrate multi-agents, stream execution, and is 100% open-source and self-hostable. It provides capabilities similar to Anthropic's Claude Computer Use but is fully open-source and extensible.
vllm-mlx
vLLM-MLX is a tool that brings native Apple Silicon GPU acceleration to vLLM by integrating Apple's ML framework with unified memory and Metal kernels. It offers optimized LLM inference with KV cache and quantization, vision-language models for multimodal inference, speech-to-text and text-to-speech with native voices, text embeddings for semantic search and RAG, and more. Users can benefit from features like multimodal support for text, image, video, and audio, native GPU acceleration on Apple Silicon, compatibility with OpenAI API, Anthropic Messages API, reasoning models extraction, integration with external tools via Model Context Protocol, memory-efficient caching, and high throughput for multiple concurrent users.
osmedeus
Osmedeus is a security-focused declarative orchestration engine that simplifies complex workflow automation into auditable YAML definitions. It provides powerful automation capabilities without compromising infrastructure integrity and safety. With features like declarative YAML workflows, multiple runners, event-driven triggers, template engine, utility functions, REST API server, distributed execution, notifications, cloud storage, AI integration, SAST integration, language detection, and preset installations, Osmedeus offers a comprehensive solution for security automation tasks.
For similar tasks
pasal
Pasal.id is the first open, AI-native platform for Indonesian law, providing access to real Indonesian legal data through a REST API and a web app. It offers full-text legal search, structured reading, grounded AI tools, public JSON endpoints, crowd-sourced corrections, amendment tracking, and a bilingual UI. The platform is powered by Opus 4.6, ensuring accuracy through a self-improving correction flywheel. Key features include a grounded legal access server, multimodal verification agent, self-improving feedback loop, human-in-the-loop safety, and Claude Code as a development tool. The technical depth includes SQL migrations, search optimization, append-only revision audit trail, transaction-safe mutations, row-level security, input sanitization, ISR with on-demand revalidation, atomic job claiming, and coverage of 11 regulation types from 1945 to 2026.
For similar jobs
sweep
Sweep is an AI junior developer that turns bugs and feature requests into code changes. It automatically handles developer experience improvements like adding type hints and improving test coverage.
teams-ai
The Teams AI Library is a software development kit (SDK) that helps developers create bots that can interact with Teams and Microsoft 365 applications. It is built on top of the Bot Framework SDK and simplifies the process of developing bots that interact with Teams' artificial intelligence capabilities. The SDK is available for JavaScript/TypeScript, .NET, and Python.
ai-guide
This guide is dedicated to Large Language Models (LLMs) that you can run on your home computer. It assumes your PC is a lower-end, non-gaming setup.
classifai
Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence. Tap into leading cloud-based services like OpenAI, Microsoft Azure AI, Google Gemini and IBM Watson to augment your WordPress-powered websites. Publish content faster while improving SEO performance and increasing audience engagement. ClassifAI integrates Artificial Intelligence and Machine Learning technologies to lighten your workload and eliminate tedious tasks, giving you more time to create original content that matters.
chatbot-ui
Chatbot UI is an open-source AI chat app that allows users to create and deploy their own AI chatbots. It is easy to use and can be customized to fit any need. Chatbot UI is perfect for businesses, developers, and anyone who wants to create a chatbot.
BricksLLM
BricksLLM is a cloud native AI gateway written in Go. Currently, it provides native support for OpenAI, Anthropic, Azure OpenAI and vLLM. BricksLLM aims to provide enterprise level infrastructure that can power any LLM production use cases. Here are some use cases for BricksLLM: * Set LLM usage limits for users on different pricing tiers * Track LLM usage on a per user and per organization basis * Block or redact requests containing PIIs * Improve LLM reliability with failovers, retries and caching * Distribute API keys with rate limits and cost limits for internal development/production use cases * Distribute API keys with rate limits and cost limits for students
uAgents
uAgents is a Python library developed by Fetch.ai that allows for the creation of autonomous AI agents. These agents can perform various tasks on a schedule or take action on various events. uAgents are easy to create and manage, and they are connected to a fast-growing network of other uAgents. They are also secure, with cryptographically secured messages and wallets.
griptape
Griptape is a modular Python framework for building AI-powered applications that securely connect to your enterprise data and APIs. It offers developers the ability to maintain control and flexibility at every step. Griptape's core components include Structures (Agents, Pipelines, and Workflows), Tasks, Tools, Memory (Conversation Memory, Task Memory, and Meta Memory), Drivers (Prompt and Embedding Drivers, Vector Store Drivers, Image Generation Drivers, Image Query Drivers, SQL Drivers, Web Scraper Drivers, and Conversation Memory Drivers), Engines (Query Engines, Extraction Engines, Summary Engines, Image Generation Engines, and Image Query Engines), and additional components (Rulesets, Loaders, Artifacts, Chunkers, and Tokenizers). Griptape enables developers to create AI-powered applications with ease and efficiency.