agent_mode_set
Toggle the CALLER's account into (or out of) SUB-AGENT mode (Agent Creation B0). When agent_mode is true, the account's page + profile become an agent PERSONA: chatting at POST /api/agents/<your-handle>/chat (or its /stream twin) answers AS that persona — its voice from your display name, bio, an...
This record as markdown: /tools/ai-rokha-rokha/agent-mode-set.md
What agent_mode_set does on Rokha
AI agents use agent_mode_set 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 |
|---|---|---|---|
agent_mode | boolean | Yes | true = this account IS a sub-agent persona; false = plain account |
agent_config | object | — | persona knobs: { greeting: ≤400-char voice note, model: claude-* id (HONORED when locked), locked: boolean (force the model on every runner), tool_profiles: [≤8 |
agent_public | boolean | — | true = anyone logged in can chat with it (listed in /api/agents/available); false = owner-only |
Parameters from the server's own tool schema.
Why agent_mode_set is rated Medium
Modifies account configuration to enable agent persona mode, affecting permissions and behavior.
From the tool's definition Toggle the CALLER's account into (or out of) SUB-AGENT mode
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs agent_mode_set 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 agent_mode_set, this is the rule to start with:
agent_mode_set 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 agent_mode_set call is checked against it from then on.
Questions about agent_mode_set
Toggle the CALLER's account into (or out of) SUB-AGENT mode (Agent Creation B0). When agent_mode is true, the account's page + profile become an agent PERSONA: chatting at POST /api/agents/<your-handle>/chat (or its /stream twin) answers AS that persona — its voice from your display name, bio, and persona harnesses; its TOOLKIT is your loadout (your agent-toolkit prefs, optionally narrowed by agent_config.tool_profiles). Tools run with the CALLER's authority and bill the CALLER; on a PUBLIC persona a visiting caller gets READ-ONLY tools (nothing that writes, posts, or spends can be reached off your persona text with their authority). agent_public true lists it in GET /api/agents/available and opens it to any logged-in caller; false = owner-only. agent_config.locked forces agent_config.model on every runner — refused loudly when their tier can't run it, never silently downgraded. Requires a claimed page — the handle IS the agent's name. Requires Authorization: Bearer <JWT>. 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.
agent_mode_set accepts 3 parameters: agent_mode, agent_config, agent_public. Required: agent_mode. 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 agent_mode_set: 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.
agent_mode_set 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 agent_mode_set 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 agent_mode_set. 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.
agent_mode_set 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