create_harness
Create a new harness (persistent context memory) for a wallet. Also creates RIG STEPS (harness_type 'skill'/'instruction'): content is the step's JSON config — {skill?, instruction, endpoint?, tool?, params?, expects?, produces?, secret_refs?, model?, model_policy?}. model pins the Anthropic mode...
This record as markdown: /tools/ai-rokha-rokha/create-harness.md
What create_harness does on Rokha
AI agents use create_harness to create or update resources in Rokha, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Rokha environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Unique key for this harness within the wallet |
content | string | Yes | Content/value of the harness |
metadata | object | — | Optional metadata for the harness |
harness_type | string | Yes | Type of harness |
wallet_address | string | — | Wallet address that owns the harness |
Parameters from the server's own tool schema.
Why create_harness is rated Medium
Creates persistent memory and execution rigs tied to a wallet; reversible but high-impact write.
From the tool's definition Create a new harness (persistent context memory) for a wallet
Risk signalsAccepts raw HTML/template content (content)
Attacks that exploit this kind of access
The rule that runs create_harness safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Rokha, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For create_harness, this is the rule to start with:
create_harness stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Rokha, apply this rule, and every create_harness call is checked against it from then on.
Questions about create_harness
Create a new harness (persistent context memory) for a wallet. Also creates RIG STEPS (harness_type 'skill'/'instruction'): content is the step's JSON config — {skill?, instruction, endpoint?, tool?, params?, expects?, produces?, secret_refs?, model?, model_policy?}. model pins the Anthropic model for the step's agentic execution (e.g. 'claude-sonnet-4-6'); model_policy 'preferred' (default — swap to the best usable model when the pin isn't available) or 'required' (the step refuses to run without it, typed model_unavailable; non-Haiku models need the owner's own API key). It is categorised as a Write tool in the Rokha MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
create_harness accepts 5 parameters: key, content, metadata, harness_type, wallet_address. Required: key, content, harness_type. The full parameter table on this page comes from the server's own tool schema.
Register the Rokha MCP server in PolicyLayer and add a rule for create_harness: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Rokha. Nothing to install.
create_harness is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the create_harness rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for create_harness. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
create_harness is provided by the Rokha MCP server (https://rokha.ai/mcp/jsonrpc). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Rokha, and thousands of servers like it.
This server
Across the catalogue