Dike logoDocs

Dike's four core MCP tools (dike_search, dike_reason, dike_cite, dike_graph_traverse) are engineered to compose seamlessly inside autonomous agent loops.

Rendering diagram...

Pattern 1: Exploratory Research & Hydration

Use this pattern when your agent needs to inspect full statutory provisions before deciding on a legal strategy.

  1. Step 1 (dike_search): Send a natural language query with top_k: 5 to identify candidate statutes and court judgements.
  2. Step 2 (Filter & Select): The agent inspects the 800-character snippets and selects the most relevant canonical_id.
  3. Step 3 (GET /v1/document/{id}): Hydrate the complete document text or article list to examine full legal definitions and exclusions.

Pattern 2: Currency & Legislative History Auditing

Never rely on an indexed statute without verifying whether subsequent legislation has amended or repealed its articles.

Rendering diagram...
  1. Call dike_graph_traverse with direction: "in" and edge_types: ["amends", "repeals"].
  2. Inspect the connected nodes. If an amending statute exists (e.g. eg-leg-2021-45), the agent knows the primary statute has undergone legislative revision.

Pattern 3: Direct Grounded Q&A vs. Custom Synthesis

When should an agent call dike_reason versus performing its own synthesis from dike_search?

ConsiderationUse dike_reasonUse dike_search + Custom LLM
Citation IntegrityGuaranteed: Real-time token guard strips any hallucinated reference.Vulnerable to LLM citation fabrication.
Output StyleAuthoritative Arabic legal summary with [1] footnotes.Flexible formatting, custom persona, or multi-modal UI.
Multi-Source CombiningLimited to Dike's indexed corpus.Can combine Dike search results with private customer PDFs or CRM data.
Throughput Cost10 req/min limit on Pay As You Go (uses reasoning compute).120 req/min limit on Pay As You Go (lightweight retrieval).

Pattern 4: Rate-Limit & Token-Budget Optimization

In multi-agent swarms or complex tree-of-thought workflows, calling dike_reason at every intermediate sub-step will quickly exhaust rate limit quotas.

Best Practice

  • Use dike_search and dike_graph_traverse for exploratory branch evaluation, document filtering, and consistency checks.
  • Reserve one single dike_reason invocation for the final user-facing response synthesis.

Next Steps

On this page