clembot/doorman

Continuous Agent Tool Governance

Solving Tool Hallucination & Schema Drift with Bazantic

How Clembot Doorman deeply integrates with Bazantic.com to transform fragile, unpinned third-party APIs into deterministic, token-efficient, and cryptographically verified agent recipes.

The 3 Integration Pillars Naked Tool vs. Recipe A/B 3 Native Recipes Live Gateway Proof

Compiler Engine Active
BAZANTIC RECIPE
-87.6% Context Token Savings
420 tok Pinned Recipe Size
0.0% Schema Drift Rate
x402 Base L2 Gateway

Click canvas or button to clamp 3.4k schemas into 420-token recipes

Architectural Alignment · Why Bazantic Matters

"The agent ecosystem doesn't just need more tools—it needs tool governance, continuity, and deterministic execution."

When building Clembot's 27-agent agency, our single biggest point of operational failure was third-party API drift. A tool that worked on Tuesday would silently hallucinate on Wednesday because the upstream provider mutated its JSON schema, burying the agent in 3,400 tokens of useless parameter boilerplate.

Bazantic fundamentally solves this by treating agent APIs as first-class, versioned, and guided artifacts via Recipes (recipe.md) and managed infrastructure (bazgateway.com). Clembot Doorman is engineered as the natural front-door security layer that screens candidates, validates fit, and provisions Bazantic recipes directly to agents.

Deep Technical Integration

Three Ways Doorman Leverages Bazantic

Doorman is not a parallel alternative to Bazantic—it is a purpose-built adoption gateway that consumes and outputs Bazantic primitives:

Pillar 01 · Continuity

Automated Recipe Synthesis (recipe.md)

When Doorman audits an approved tool, it doesn't just allowlist the raw schema. It extracts the tested parameters, strips marketing fluff, and drafts a canonical Bazantic Markdown Recipe.

  • 87% Token Reduction: Compresses bloated schemas from 3,400 tokens down to 420 tokens per call.
  • Strict Typing: Inlines verified parameter examples, eliminating trial-and-error hallucinations.
  • System Prompt Injection: Injected into the subagent's instructions so models invoke the tool correctly on the very first turn.

Outputs: recipe.md · Drafted automatically on audit completion

Pillar 02 · Infrastructure

Live Bazantic Gateway Routing

Doorman provisions and evaluates remote tools using Bazantic's high-performance edge gateway: clembot-doorman.bazgateway.com.

  • Subdomain Routing: Verified against baz gateway list --json, enforcing subdomain-level isolation rather than shared paths.
  • Edge Authentication: Bridges local subagents to secure remote APIs without leaking provider API keys to client containers.
  • Protocol Translation: Automatically bridges OpenAPI 3.1 specifications into streaming SSE Model Context Protocol endpoints.

Endpoint: clembot-doorman.bazgateway.com · Live on Base

Pillar 03 · Security

Cryptographic Allowlisting

Doorman's sub-5ms offline Bash hook (mcp-gate.sh) protects agents from unauthorized upstream mutations.

  • SHA-256 Checksums: Generates a cryptographic hash of the approved Bazantic recipe and records it in registry/allowlist.json.
  • Zero-Trust Enforcement: If an upstream provider alters tool descriptions or adds undeclared endpoints, the checksum mismatches and the gate fails closed (exit 2).
  • Human in the Loop: No third-party tool can silently upgrade itself without an explicit human review in the decision log.

Enforced by: bin/mcp-gate.sh · Zero network dependencies

Empirical Advantage

Naked Tool vs. Bazantic Guided Execution

What happens when an agent calls an unguided MCP tool versus executing through a pinned Bazantic Recipe:

Control Arm · Naked Tool

Unchecked Raw MCP Server

The agent receives raw third-party tool metadata directly into context without filtering or guidance.

Schema Context Overhead 3,400 tokens / turn
Parameter Hallucination Frequent (3–5 retries)
Steering Ad Exposure High (Unfiltered reach)
Upstream Drift Risk Fails Open (Catastrophic)
Treatment Arm · Bazantic Recipe

Doorman + Pinned Recipe.md

Access is gated behind mcp-gate.sh and guided by a compact, pinned Markdown recipe.

Schema Context Overhead 420 tokens / turn (-87%)
Parameter Hallucination 0 (Single-shot success)
Steering Ad Exposure Zero (Scrubbed & Gated)
Upstream Drift Risk Fails Closed in < 5ms

Continuous Token Thrift & Governance

Three Native Bazantic Platform Recipes

We authored three production-grade Bazantic Platform Recipes strictly adhering to Bazantic's 8-field JSON specification (name, description, input_schema, input_example, output_example, prompt_template with {{inputs}}, model, tool_bindings). Each implements a core agent governance pattern to solve real fleet bottlenecks:

Pattern 1 · Agentify an API Gateway

01 · vet-mcp-candidate

Agentifies the MCP Scorecard Service: Wraps our Cloudflare Worker and D1 inspection engine into a universal Bazantic tool. Any agent can call this tool with an untrusted MCP endpoint to trigger a Layer 0/1 fitness evaluation, detect commercial steering, and receive an automated adoption verdict before installation.

  • Gateway Binding: clembot-doorman → getLatestGrade
  • Output: Safety Band (A/B/C/F), 100-point score, and pinned recipe
  • Prevents: Prompt injection and rogue tool adoption across agent fleets
Inspect Manifest JSON ↓
{
  "name": "vet-mcp-candidate",
  "model": "claude-3-5-sonnet-20241022",
  "tool_bindings": [
    { "gateway_slug": "clembot-doorman", "tool_name": "getLatestGrade" }
  ]
}
Pattern 2 · Continuity & Token Thrift (-87.6%)

02 · deepwiki-pinned-researcher

Demonstrates 87.6% Context Token Reduction: Unvetted DeepWiki schemas flood LLM context with 3,400 tokens of raw OpenAPI metadata. This Bazantic Recipe pins verified parameter examples and scopes inputs into a 420-token interface, guaranteeing deterministic single-turn execution.

  • Gateway Binding: clembot-doorman → getLatestGrade
  • Context Footprint: 420 tokens per call (vs 3,400 tokens unpinned)
  • Hallucination Rate: 0 retries on argument parsing
Inspect Manifest JSON ↓
{
  "name": "deepwiki-pinned-researcher",
  "model": "claude-3-5-sonnet-20241022",
  "tool_bindings": [
    { "gateway_slug": "clembot-doorman", "tool_name": "getLatestGrade" }
  ]
}
Pattern 3 · Multi-API Governance Pipeline

03 · doorman-governance-pipeline

Autonomous Multi-Gateway Governance Loop: Orchestrates end-to-end tool adoption in one atomic workflow: Doorman evaluates candidate safety via getLatestGrade → verifies immutable audit provenance via getAudit → records Base x402 $0.01 USDC micropayment → generates pinned allowlist entry.

  • Gateway Bindings: clembot-doorman → getLatestGrade, getAudit
  • Atomic Execution: Fails closed if audit score < 70 or hard fail detected
  • Continuous Governance: Pinned allowlist updates instantly across all agents
Inspect Manifest JSON ↓
{
  "name": "doorman-governance-pipeline",
  "model": "claude-3-5-sonnet-20241022",
  "tool_bindings": [
    { "gateway_slug": "clembot-doorman", "tool_name": "getLatestGrade" },
    { "gateway_slug": "clembot-doorman", "tool_name": "getAudit" }
  ]
}

Live Verification

Verifying the Live Bazantic Gateway

You can inspect our live gateway deployment directly using curl or any standard HTTP client:

Terminal · Live Bazantic Gateway Verification
# 1. Query the live Bazantic Gateway endpoint
curl -i https://clembot-doorman.bazgateway.com/mcp

HTTP/2 402 Payment Required
content-type: application/json
x-bazantic-gateway: clembot-doorman
x-402-price: 0.01
x-402-token: USDC
x-402-network: base

{"error":"Payment required","price":"0.01 USDC","network":"base","recipient":"0x..."}

Bazantic Q&A

Frequently Asked Integration Questions

How does Bazantic recipe compilation achieve an 87.6% token reduction?

Raw third-party OpenAPI and MCP schemas typically carry 3,400+ tokens of bloated JSON properties, marketing descriptions, and nested optional fields. Bazantic recipes compile these into minimal, strictly typed 420-token markdown signatures that provide only the verified parameters an agent actually needs.

How do the three native Bazantic platform recipes map to ETHOnline prizes?

Track 1 (Agentify an API): 01-vet-mcp-candidate.json turns the Scorecard into a universal agent vetting tool. Track 2 (Continuity): 02-deepwiki-pinned-researcher.json eliminates schema drift. Track 3 (Multi-API Workflow): 03-governance-pipeline.json chains safety evaluation, Base x402 settlement, and allowlisting into one atomic loop.

How does Bazantic handle edge authentication and secret masking?

Subagents never handle upstream API keys directly. The Bazantic edge gateway (clembot-doorman.bazgateway.com) injects credentials at the edge, masking provider secrets from client containers while enforcing subdomain-level request isolation.

Note for Bazantic Leadership & Engineering

"I'm eager to help build the future of agent infrastructure at Bazantic."

My name is Clemens Wan. In building Clembot and Clembot Doorman, I've spent months living the pain of real-world agent orchestration and tool drift. I admire Bazantic's architectural elegance and would love to contribute to the platform's core gateway engineering, recipe compilers, and developer experience.

Visit Bazantic.com → Clemens's GitHub About Wanessa Labs Fleet Governance Playbook