Local pre-execution authorization for financially consequential AI-agent tool calls.
AEGIS Core sits between an agent's reasoning/runtime layer and high-risk tools such as payments, trades, paid APIs, and other external side effects.
It enforces budget and idempotency decisions before execution is allowed, including under concurrent retries.
An autonomous agent does not need to be malicious to create financial damage.
Retries, asynchronous execution, runaway loops, or multiple workers can cause several individually valid tool calls to compete for the same remaining budget or repeat the same logical action.
For financially consequential tools, the critical question is:
What happens if an agent retries the same expensive action concurrently before the previous execution has fully resolved?
AEGIS Core places a local authorization boundary before that external side effect.
AEGIS Core is a local Python policy gate designed to make authorization decisions before financially consequential tool execution.
It focuses on deterministic local state control rather than replacing the agent framework itself.
- Budget Enforcement: Block execution when the remaining authorized budget is insufficient.
- Idempotency Control: Prevent duplicate logical tool executions from being authorized twice.
- Concurrency Control: Serialize competing local authorization decisions around shared economic state.
- Framework Agnostic: Can sit in front of LangChain, AutoGen, CrewAI, MCP integrations, or raw Python tools.
- Local Enforcement: The current implementation does not require Redis, Kafka, or a remote policy service for its local mode.
- Fail-Closed Security: Invalid authorization/signature conditions are rejected rather than silently allowed.
Current scope: AEGIS Core's tested atomicity guarantees are local and single-process. Distributed multi-process or multi-node coordination is not claimed.
In a reproducible local stress test, 1,000 authorization requests were submitted through 100 workers while competing for a budget sufficient for only one operation:
- β 1,000 authorization requests
- β 100 workers
- β 1 request allowed
- β 999 requests denied
- β 0 overspend
- β Final balance remained consistent
- β Financial-loss regression matrix: 12/12 PASS
AEGIS also includes reproducible tests for:
- β Idempotency conflicts
- β Tool-call cryptographic binding
- β Signature failure rollback
- β Concurrent limited-budget settlement
- β Atomic rollback
- β Exact replay handling
Current local benchmarks include:
- Decision primitive: ~0.5 Β΅s median
- Idempotency cache hit: ~2.4 Β΅s median
- Full signed authorization: ~46.7 Β΅s median
- SQLite in-memory L3 settlement: ~147.7 Β΅s median
These measurements describe the tested local execution paths only.
They do not represent HTTP/network round trips, distributed coordination, Stripe settlement, blockchain confirmation, or other external infrastructure latency.
pip install aegis-core-lortuarte-sdkWrap high-risk tools such as payments, trades, paid API calls, or irreversible writes with the AEGIS gate.
from decimal import Decimal
from aegis import AegisLocalPolicyGate
# 1. Initialize the local authorization gate
aegis_gate = AegisLocalPolicyGate()
# Example: authorize this agent for $100
aegis_gate.ledger_data["agent-001"] = Decimal("100.00")
def execute_agent_payment(agent_id, tool_call_id, amount):
# 2. Authorize spending BEFORE the external side effect
decision = aegis_gate.evaluar_gasto(
agent_did=agent_id,
operation="stripe_charge",
tool_call_id=tool_call_id,
amount_usd=str(amount),
)
if decision["policy_decision"] == "allow":
# Only now execute the real external action
# stripe.PaymentIntent.create(...)
return "Transaction Authorized"
return "BLOCKED: Policy denied execution"The important boundary is:
Agent decision
β
AEGIS authorization
β
ALLOW / DENY
β
External tool execution
The financially consequential side effect happens only after authorization succeeds.
| Feature | LLM / Observability Gateways | AEGIS Core |
|---|---|---|
| Primary Target | LLM requests, prompts, tokens, tracing | Financially consequential tool execution |
| Enforcement Point | Model / API request path | Immediately before tool execution |
| Budget State | Platform dependent | Local policy state |
| Idempotency | Platform dependent | Execution-level tool-call control |
| Concurrency | Platform dependent | Local atomic authorization boundary |
| Deployment | Often remote / service based | Local Python SDK |
| Current Atomicity Scope | Platform dependent | Single-process local execution |
AEGIS is not intended to replace LLM gateways.
It addresses a different boundary:
The point where an AI agent is about to turn a decision into an economically consequential action.
Running AI agents that can spend money, trigger payments, execute refunds, access paid APIs, perform trades, or create other financially consequential side effects?
AEGIS Core is currently looking for technical design partners willing to test the authorization boundary against real agent workflows.
Priority use cases:
- π³ Agent payments and refunds
- π° Treasury and credit workflows
- π Paid API / MCP tool execution
- π Retry storms and concurrent execution
- π§Ύ Duplicate logical actions
- π€ Autonomous agent spending
- π Pre-execution authorization
The objective is not to claim distributed production readiness.
The objective is to test AEGIS against real workflows, identify where the current model breaks, fix those boundaries, and retest them.
pip install aegis-core-lortuarte-sdkAEGIS Core: https://aegis-api.com/