agent_terminate

Remove a Ruflo-tracked agent from the registry and free its swarm slot. Use when you need to (a) clean up a spawned agent so its cost-tracking row finalizes, (b) reclaim a swarm-topology slot for another agent, or (c) end a stuck agent without restarting the whole swarm. For one-shot Task tool in...

Server Claude Flow claude-flow
Category Destructive
Risk class Critical
Parameters 00 required

What agent_terminate does on Claude Flow

AI agents call agent_terminate to permanently remove resources in Claude Flow — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

Why agent_terminate needs a policy

Terminating an agent removes it from the registry and finalizes its cost-tracking row. This action cannot be undone — the agent's state, slot, and tracking data are permanently finalized/freed. While not deleting user data, it irreversibly destroys a running computational entity and its associated registry record, placing it firmly in the Destructive category.

From the tool's definition 'Remove a Ruflo-tracked agent from the registry and free its swarm slot' and 'end a stuck agent without restarting the whole swarm' — the agent is removed/terminated and its registry entry finalized, which is irreversible.

Questions about agent_terminate

What does the agent_terminate tool do? +

Remove a Ruflo-tracked agent from the registry and free its swarm slot. Use when you need to (a) clean up a spawned agent so its cost-tracking row finalizes, (b) reclaim a swarm-topology slot for another agent, or (c) end a stuck agent without restarting the whole swarm. For one-shot Task tool invocations that already self-terminate, this tool is not needed. Pair with agent_list first to confirm the agentId. It is categorised as a Destructive tool in the Claude Flow MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.

How do I enforce a policy on agent_terminate? +

Register the Claude Flow MCP server in PolicyLayer and add a rule for agent_terminate: 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 Claude Flow. Nothing to install.

What risk level is agent_terminate? +

agent_terminate is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.

Can I rate-limit agent_terminate? +

Yes. Add a rate_limit block to the agent_terminate 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.

How do I block agent_terminate completely? +

Set action: deny in the PolicyLayer policy for agent_terminate. 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.

What MCP server provides agent_terminate? +

agent_terminate is provided by the Claude Flow MCP server (claude-flow). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.