Dev.to AI 🤖 Ai 👁 0 📖 2 min read

Hardening AI Agent Delegation: Approval Integrity, Atomic Budgets and Spawn Gates in RagLeap

Hardening AI Agent Delegation in RagLeap What happens when an AI agent delegates work to another AI agent? Who authorizes the child? Can its tools change after authorization? Can concurrent spawning operations exceed

Hardening AI Agent Delegation in RagLeap

What happens when an AI agent delegates work to another AI agent?

Who authorizes the child? Can its tools change after authorization? Can concurrent spawning operations exceed the available budget?

These are engineering questions we are addressing in RagLeap.

Our latest releases, ragleap-core v0.13.10 and v0.13.11, introduce several improvements to approval integrity and sub-agent execution.

1. Exact-action approval binding

An approval must authorize the exact action that will execute.

In v0.13.10, we introduced SHA-256 action hashing.

The hash covers the action's:

  • ID
  • Type
  • Channel
  • Target
  • Content
  • Subject
  • Role

Before execution, RagLeap recomputes the hash.

If the action has changed, execution is refused and an audit event is written.

When configured, an HMAC signature provides additional integrity protection.

2. Signed sub-agent tool lists

A child agent's tool permissions should not silently change between authorization and execution.

We now include a hash of the tool list in the signed child start record.

A changed tool list results in refusal.

3. Atomic budget reservations

Concurrent delegation can introduce resource-allocation races.

RagLeap now reserves child slots and token budgets using an atomic database update before the child starts.

If the database is unavailable, the operation fails closed.

4. One controlled spawn gate

v0.13.11 introduces a single gate for all sub-agent spawning.

The agent loop no longer starts children directly.

The gate evaluates the existing delegation policy, including:

  • Owner switch
  • Maximum depth
  • Child count
  • Signing-key availability
  • Sensitive-role approval requirements

Boundary scans and tripwire tests enforce the execution boundary.

5. Secure defaults

Sub-agents remain disabled by default.

Upgrading does not enable new delegation behavior automatically.

Database upgrade notes:

  • v0.13.10: five additive database columns.
  • v0.13.11: no database changes.

Known limitations

  • The spawn function remains an ordinary Python function.
  • Parallel spawning does not exist yet.
  • Live Telegram approval Ref testing remains outstanding.
  • HMAC protection requires a configured signing key.

We prefer documenting these limitations rather than overstating the security guarantees.

Why we're doing this

Our approach is simple:

AI agents should have the ability to work, but their authority must remain controlled.

RagLeap is an open-source, self-hosted AI employee platform focused on approval-gated autonomy.

GitHub: https://github.com/ragleap/ragleap-core

Thanks to Boardy for the architecture review rounds behind these improvements.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.