@antonyrag2
Antony TCFounder▲8
AI Engineer & Architect, RagLeap
1h ago · Agents, AI Adoption, AI Engineering · Vellore

RagLeap Agents 0.6.0 & Security 0.3.0: Nested Approvals and Safer Outbound Network Access for AI Agents

AI agents are becoming increasingly capable of delegating tasks, interacting with external tools, and accessing information across different systems.

But as agent capabilities grow, two questions become increasingly important:

  1. How do we ensure that actions performed by delegated agents remain subject to human authorization?
  2. How do we restrict and audit the external network access that agents rely on?

With two new releases, RagLeap addresses these areas through improvements to agent delegation governance and outbound network security.

  • ragleap-agents 0.6.0 introduces opt-in nested approvals across delegation trees.
  • ragleap-security 0.3.0 introduces a new outbound HTTP security module, ragleap_security.net.

Both releases are part of RagLeap's open-source, MIT-licensed ecosystem. GitHub: github.com/ragleap/ragleap-core

1. ragleap-agents 0.6.0: Bringing Human Approval into Nested Delegation

Multi-agent systems frequently delegate work from one agent to another. For example:

  • A primary AI employee receives a task.
  • It delegates research to a child agent.
  • The child agent identifies an action requiring human approval.
  • That approval must reach the person responsible for the top-level execution.

Previously, when a child agent reached an approval-required action, it stopped with approval_not_available, as in version 0.5.x.

Version 0.6.0 introduces an opt-in mechanism to propagate these approval requests through the delegation tree.

Enabling nested approvals

The feature is explicitly opt-in:

make_delegate_tool(..., nested_approval=True)

The default remains:

nested_approval=False

This is important for backward compatibility. Existing applications do not automatically change their approval behavior after upgrading.

How nested approval propagation works

When an approval-required action occurs inside a child agent:

  1. The child pauses at the approval boundary.
  2. Its pending approval is propagated to the top-level run.
  3. The top-level pending record exposes the actual child tool, arguments and forced status.
  4. The via field describes the delegation path, including agent and run IDs.
  5. The delegate field identifies the top-level delegate call.
  6. One top-level resume() operation decides whether to approve or reject.

The existing pending["tool"] and pending["arguments"] access patterns remain compatible.

Validating the entire approval path

One of the important parts of this implementation is the validation performed before resuming. The system checks every run along the delegation path, including:

  • Whether each run exists.
  • Whether all runs have exactly the same scope.
  • Whether each run is awaiting approval.
  • Whether the call ID matches.
  • Whether the tool and arguments match.
  • Whether the signature is consistent.
  • Whether the recorded delegation path is consistent.

Only after these read-only checks does the system claim the deepest run first using save_if_status, followed by its parent runs.

This design helps prevent approval decisions from being applied to a different or inconsistent execution path.

Approval and rejection behavior

When approved:

  • The pending child action executes exactly once.
  • The parent execution continues.
  • If another child action later requires approval, the request can bubble up again.

When rejected:

  • The entire delegation tree ends in a rejected state.
  • The pending action is not executed.
  • Previously completed child actions are not automatically undone.
Preserving actions that happened before a pause

An important addition is executed_before_pause.
When a child agent is rejected, the parent's rejected delegate step records information about child steps that had already run.

The record includes:

  • Agent and run identifiers.
  • Tool name.
  • Capped arguments.
  • Status of each previously executed or errored step.

The record includes up to 20 entries and is marked as truncated when more entries exist. If a child run cannot be read back, it is listed as unavailable. The tree still ends rejected. This matters because rejecting a pending action does not reverse the side effects of actions that already happened.

Scope and audit behavior

Every child run retains the parent's scope.
The resume operation refuses to continue a child run belonging to a different scope.

The resumed action also retains the correct:

  • Delegation depth.
  • Scope.
  • Taint information.
  • Shared budget counters.

Approval audit events include via_depth information at each level. They record IDs, tool names and sizes without recording text.

Testing and mutation verification

The release includes 30 new mutations for nested approvals, alongside the 34 mutations from version 0.5.1. All 64 mutations were killed on Python 3.10 and 3.12. After publishing:

  • The wheel's Python files were verified against the source at the release tag.
  • A clean installation was tested.
  • All 289 source-tree tests passed against the installed wheel on Python 3.12.
  • Wheel and source archive hashes matched the PyPI JSON.
  • Both published files carried verified PyPI provenance records.
What nested approvals do not solve yet

The release explicitly documents several limitations:

  • Who may approve remains the caller's responsibility.
  • decided_by is not independently verified.
  • Every agent in the delegation tree needs a store that survives until the approval decision.
  • In-memory stores lose child-run state after restart.
  • A crash between a claim and call completion can leave runs in the running state.
  • Stores without save_if_status do not provide atomic claims across processes.
  • A child that waits indefinitely can keep the tree awaiting approval.
  • Compensation for effects already produced by a child belongs to the owner of the relevant tool.

Real model-provider validation, Windows and macOS validation, and network-filesystem store validation were not completed for this release.

2. ragleap-security 0.3.0: Introducing Safe Outbound HTTP

AI agents frequently need to retrieve information from external websites and services. However, uncontrolled outbound HTTP requests can expose systems to risks such as:

  • Server-side request forgery (SSRF).
  • Access to private network addresses.
  • DNS rebinding.
  • Unsafe redirects.
  • Excessive response sizes.
  • Uncontrolled network resource consumption.
  • Sensitive information appearing in audit logs.

RagLeap Security 0.3.0 introduces a new standard-library-only module: ragleap_security.net

New API
from ragleap_security.net import (
    SafeFetcher,
    FetchPolicy,
    FetchResult,
    NetError,
    address_allowed,
)

The module provides controlled outbound HTTP GET and HEAD requests.

2.1 Tenant-specific network policies

Outbound access is restricted through a host allowlist defined by the tenant's own policy.
The default behavior is deny.

A missing, incorrectly typed or failing policy results in refusal rather than unrestricted access.

HTTPS is required by default, unless the policy explicitly allows HTTP.

The URL parser also rejects:

  • User information in URLs.
  • IP literals.
  • Number-like host representations.
  • Non-ASCII hostnames.
  • Invalid or unsupported URL forms.

Internationalized domain names must be supplied in punycode.

2.2 DNS rebinding protection

DNS validation is one of the important parts of this release. The fetcher performs one DNS lookup and validates every returned address. The connection is then made to the address that was already checked. The hostname is not resolved a second time for the connection. This prevents a common DNS-rebinding pattern in which an attacker initially returns a permitted address and subsequently changes the DNS answer to a private or otherwise blocked address.

2.3 Address validation

The address validation logic unwraps embedded IPv4 addresses, including:

  • IPv4-mapped IPv6.
  • NAT64.
  • 6to4.

It then permits only global addresses outside an explicit blocklist.
The implementation also accounts for differences in Python's ipaddress behavior across supported Python versions.

This was specifically verified on Python 3.10.20 and 3.12.3.

2.4 Redirect validation

Redirects are handled internally by the SafeFetcher.
Every redirect hop goes through URL and address validation again.

Another important security property concerns request headers:

Headers supplied by the caller are sent to the first origin but are not forwarded after the request leaves that origin.

This reduces the risk of sensitive headers being exposed to another host through redirects.

2.5 Deadlines and response limits

The implementation uses one monotonic deadline covering:

  • Connection establishment.
  • TLS negotiation.
  • Response reading.

Response bodies are capped.
If the response exceeds the configured body limit, it is refused rather than silently truncated.

The fetcher also:

  • Sends Accept-Encoding: identity.
  • Refuses content-encoded responses.
  • Disables environment proxy configuration.
  • Does not use environment .netrc credentials.
  • Always verifies TLS certificates.
  • Requires TLS 1.2 or newer.
2.6 Privacy-aware audit logging

An optional AuditLog can record:

  • net.request
  • net.redirect
  • net.blocked

Records include scope, host, port, status, byte count, hop count and refusal reason. The audit log deliberately excludes:

  • URL paths.
  • Query parameters.
  • Request headers.
  • Response bodies.

If an audit write fails, the operation raises an error rather than silently ignoring the failure.

2.7 Per-scope rate limiting

An optional RateLimiter applies limits per scope before DNS lookup. This helps control outbound request volume and prevents unnecessary network lookups when a scope has exhausted its permitted request rate.

3. Adversarial Testing and Verification

The SafeFetcher implementation received a substantial test and mutation-testing effort. The release includes:

  • 258 tests in tests/test_net.py.
  • 28 hostile-tenant tests, merged earlier without code changes in this release.
  • 46 additional mutations for the network module.
  • 181 total mutations killed across the mutation suite on Python 3.10 and 3.12.

The network-specific mutations run against tests/test_net.py, and can be selected using:

python scripts/mutation_check.py net:

The first mutation run identified five survivors.
The missing coverage included:

  • Embedded IPv4 address unwrapping.
  • The four-tries cap.
  • Deadline enforcement between response reads.
  • Deadline enforcement between redirect hops.

A redundant explicit close() was also removed.

Published-wheel verification

After publication:

  • Plain and [crypto] installations were tested in clean environments.
  • All 614 tests from the source archive passed against the installed wheel.
  • Package hashes matched the PyPI JSON.
  • Wheel source files matched the source at the release tag.
  • PyPI provenance records were verified.

The published-wheel attack checks refused examples including:

169.254.169.254
64:ff9b::a9fe:a9fe
::127.0.0.1
::ffff:10.0.0.1
fd00::1
100.64.0.1

These checks cover cloud metadata, embedded addresses, private IPv4/IPv6 and shared address space examples.

4. What SafeFetcher Does Not Defend Against

Security engineering also means clearly documenting what a component does not guarantee.
The release identifies these limitations:

Allowlisted host trust

An allowlisted host is trusted. A compromised allowed host, or a redirect to another allowed host, is not automatically detected as malicious.

Consistently incorrect DNS answers
A DNS answer that consistently points an allowed hostname to an attacker's public server is not detected.

DNS lookup duration

A slow DNS server can exceed the request deadline because the DNS lookup itself cannot be interrupted.

Other network operations

The module does not support:

  • POST or other HTTP methods.
  • Non-HTTP network egress.
  • Private internal service access through an allow_private option.

External content remains untrusted
A successful fetch does not make the returned content trustworthy.

The release explicitly requires flows and agents that fetch external content to mark those steps as external, preserving taint information.

Real public-internet traffic, a real valid public TLS handshake, IPv6-only networks, Windows and macOS were not verified.

No independent security review has been completed.

5. Why These Two Releases Matter Together

The two releases address different but complementary parts of agent execution. ragleap-agents focuses on authorization across delegated work. ragleap-security focuses on controlling outbound network access. Together, they contribute to a broader architecture in which AI employees can:

  1. Delegate tasks to child agents.
  2. Preserve human approval requirements across delegation.
  3. Validate execution scope before resuming.
  4. Restrict external network access through tenant policies.
  5. Audit relevant network activity without storing sensitive request content.
  6. Preserve information about actions already performed.

These are separate library capabilities. The releases do not claim that the two modules are automatically integrated into one execution pipeline.

The broader objective is to make increasingly capable AI agents more controlled, accountable and transparent.

6. What Comes Next

There are several areas worth strengthening in future work. For nested approvals:

  • Recovery from crashes during execution.
  • Stronger atomicity across distributed stores.
  • Verification of approver identity.
  • Real model-provider testing.
  • More extensive concurrency and restart testing.

For outbound network security:

  • Real public HTTPS and TLS integration testing.
  • IPv6-only environment validation.
  • Windows and macOS testing.
  • Independent security review.
  • Continued testing of tenant isolation, redirects and network-policy boundaries.

These are areas for further engineering and verification, not capabilities claimed as complete in these releases.

7. Building Open-Source AI Employees That Ask Before They Act

RagLeap is an open-source, MIT-licensed, self-hosted AI employee platform.
Our direction is to build a unified ecosystem around AI employees, agent orchestration, memory, retrieval, integrations, observability, security and eventually physical AI capabilities.

We believe agent autonomy should develop alongside authorization, accountability and safety.
These releases represent another step in that direction.

Open-source AI employees that ask before they act.

Explore RagLeap

Contributions, technical feedback, testing and independent security reviews are welcome through the normal GitHub issue and pull-request process.

RagLeap is MIT-licensed and self-hosted. Developers, researchers and open-source contributors are welcome to explore the ecosystem and help improve it.

#OpenSourceAI #AIAgents #AgentSecurity #MultiAgentSystems #Python #CyberSecurity #RagLeap

OpenSourceAIAIAgentsAgentSecurityMultiAgentSystems

Comments

No comments yet
Start the conversation.
Log in to join the thread.