grai cadence gate (smolagents Tool)

Match the founder's voice: learn how one specific person writes, and gate every draft against their measured cadence before it ships. This repo wraps the remote grai MCP endpoint (https://grai.page/api/mcp) as a smolagents Tool, so any smolagents agent can score a draft for AI cadence in one call.

Install

Copy grai_gate_tool.py next to your agent code, or clone this repo:

git clone https://huggingface.co/USER/grai-smolagents-tool grai_smolagents

Requires the smolagents package. The tool itself uses only the Python standard library for the HTTP call: no API key, no account, no configuration.

Use

from smolagents import CodeAgent, InferenceClientModel
from grai_gate_tool import GraiCadenceGateTool

agent = CodeAgent(
    tools=[GraiCadenceGateTool()],
    model=InferenceClientModel(),
)

agent.run(
    "Score this launch post with the grai cadence gate and rewrite the flagged spans: ..."
)

The tool returns a JSON string with score (0 to 100), cv (sentence rhythm variance; the human floor is 0.32), pass (true, false, or null when the draft is too short), and flags, the exact quoted spans that broke each rule.

What it measures

Eight structural tells (model vocabulary markers, superficial adverbs, tricolon parallelism, contrast padding, passive density, sentence length monotony, AI title patterns, sycophantic openings) plus the sentence rhythm floor CV = sigma / mu >= 0.32. The thresholds come from a measured study of 134,522 organic posts from 1,499 founder profiles. Method: https://grai.page/methodology

Privacy

Draft text is processed in volatile server RAM and never stored. No account, no telemetry, no cookies. Local, fully offline scoring is also available via the grai-mcp package on PyPI (uvx --from grai-mcp grai-gate-mcp).

Pricing

Scoring is free. Paid tiers for the full workbench, Voice DNA profiles and cryptographic verification seals: https://grai.page/pricing/ (Starter $19, Solo $79/yr, Agency $99/mo or $790/yr, Executive $950, Presets Pack $39). All tiers carry the 30-Day Distinction Guarantee.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support