Skip to main content
Citation-grounded Dutch legal research over the BWB statute corpus via the Ansvar Dutch-Law-MCP server.

Code

Create bindu_agent.py with the code below, or save it directly from your editor.
The Bindu wrapper imports build_agent and build_server_params from a sibling agent.py that wires the Agno Agent to the dutch-legal-citations MCP server over stdio. Create agent.py alongside bindu_agent.py:
And the Windsurf-style XML-tagged system prompt in prompt.py:
The shipped prompt in prompt.py is longer (full Windsurf-style sections for <user_information>, <citation_format>, <communication_style>). Read the file in the source repo for the exact text.

Skill Configuration

Create skills/dutch-law-research/skill.yaml:

How It Works

MCP Integration (stdio transport)
  • Dutch-Law-MCP server is a Node process built from a sibling ../Dutch-law-mcp/ folder
  • Launched via mcp.StdioServerParameters(command="node", args=["dist/index.js"])
  • MCPTools opens the subprocess once on the first request and keeps the stdio session warm — avoids ~1-2s node startup per call and the 130 MB SQLite re-open
  • 15+ tools exposed: search_legislation, get_provision, validate_citation, check_currency, build_legal_stance, get_eu_basis, get_dutch_implementations, get_provision_at_date, list_sources, and EU-bridge tools
Windsurf-style XML-tagged prompt
  • Identity header + tagged sections: <user_information>, <corpus>, <tool_calling>, <legal_research_method>, <citation_format>, <safety_and_disclaimers>, <communication_style>
  • Mirrors the operator-style prompt structure used by Windsurf / Cascade
  • Tool-selection guide is embedded in <tool_calling> so the model picks the narrowest tool for each query shape
  • Worked examples show the expected call-then-quote pattern
Citation discipline
  • Every legal claim must be backed by a tool result — no fallback to general knowledge of Dutch law
  • Operative provision text is quoted verbatim from the tool output (zero LLM paraphrase)
  • Citation format: Statute (BWB-ID) artikel X — e.g. Burgerlijk Wetboek Boek 6 (BWBR0005289) art. 6:162
  • EU references use CELEX style: Verordening (EU) 2016/679 (GDPR) art. 5
  • If a statute has been amended or repealed, check_currency is run before the agent relies on it
Persistent agent (Bindu A2A mode)
  • _ensure_agent() lazy-initializes the MCPTools connection and Agent once under an asyncio.Lock
  • Subsequent A2A message/send requests reuse the same warm MCP session
  • Async handler(messages) calls agent.arun(input=messages) and unwraps RunOutput.content

Dependencies

The MCP server itself is a separate Node project. Build it once in a sibling folder:

Environment Setup

Create .env file:

Run

Try:
  • “Wat zegt artikel 6:162 BW over onrechtmatige daad?”
  • “Is de Mededingingswet art. 24 nog van kracht?”
  • “What EU directive is the basis for AVG art. 5?”
  • “Valideer de citatie ‘art. 6:162 BW’.”

Example API Calls

Frontend Setup

Open http://localhost:5173 and try to chat with the Dutch law research agent.