OSCA: Origin, Semantic, and Consequence Authority — A Multi-Tier Authorization Architecture for Autonomous AI Agents
pip install osca-engine Copy PIP instructions
A Multi-Tier Authorization Architecture for Autonomous AI Agents
Authority Separation · Structural Invariants · Execution Binding · Decision Traceability
3 Authority Layers · 4 Decision States · 9 Architectural Invariants · 8 Threat Categories · 10 Evaluation Scenarios · 51 Tests · 5 Simulation Scenarios
Research Paper · Architecture · Quick Start · Formal Model · Threat Model · Evaluation · Citation
The starting observation is that the ability to generate an action does not imply the authority to execute it. An agent can interpret instructions, call tools, modify resources, and trigger operations whose consequences reach beyond its immediate environment. Conventional permission models usually collapse three different questions into one decision. OSCA separates them:
"The authority to initiate an action, the authority to define its permissible meaning, and the authority to approve its consequences are distinct responsibilities and must remain independently verifiable."
Execution(A) ⇔ Origin(A) ∧ Semantic(A) ∧ Consequence(A) Subject to: ActionExecuted = ActionAuthorized OSCA is not an empirically validated security mechanism. The architecture is specified and a Phase I implementation passes its own test suite and simulation scenarios, but empirical and adversarial evaluation have not yet been performed. OSCA is designed to complement, not replace, existing identity, access-control, and fine-grained authorization technologies.
Status: Research manuscript + Phase I reference implementation Version: 0.1.0-research-draft Scope: Architectural research, formal system design, and executable prototype
Each layer evaluates a different dimension of an action request.
┌──────────────────────────────────────────────────────────────────┐ │ Action Request │ │ ↓ │ │ 1. ORIGIN AUTHORITY Who initiated it? Is the chain valid? │ │ ↓ │ │ 2. SEMANTIC AUTHORITY What does it mean? Is it in scope? │ │ ↓ │ │ 3. CONSEQUENCE AUTHORITY What effects? Is approval required? │ │ ↓ │ │ Authorization Decision ──→ Escalation (if required) │ │ ↓ │ │ Authorized Action Execution │ │ │ │ Audit & Traceability: decisions · evidence · path · timestamps │ └──────────────────────────────────────────────────────────────────┘ A rejection at any tier blocks the action. Escalation routes the decision to additional human or institutional authorization.
Determines whether the source of a request has legitimate authority to initiate it.
A PASS establishes only that the request came from a legitimate source. It does not authorize execution.
Evaluates the meaning and scope of the proposed action.
An authenticated agent may legitimately request access to a resource while proposing an operation that exceeds the permissions of its task. Origin passes, Semantic denies.
Evaluates the potential effects of an otherwise legitimate and semantically permitted action.
Outcomes: APPROVE · DENY · ESCALATE · INDETERMINATE
An agent may correctly interpret a request to modify a database yet propose a modification whose consequences exceed the permitted operational scope. Origin and Semantic pass, Consequence denies.
Design Note. Consequence Authority must be implemented as a genuinely independent authority in both design and execution, not as an additional risk assessment embedded within Semantic Authority. This is the most important architectural distinction that the paper and any implementation must preserve.
The three layers do not perform identical checks. Origin does not redefine semantic scope, Semantic does not authenticate the requester, and Consequence does not silently replace the decisions of the other layers. Formally: OA(A) ≠ SA(A) ≠ CA(A), distinct authorization functions, not necessarily different numerical values.
Every proposed action is converted into a structured object before authorization:
A = (id, s, d, a, p, t, c, e) Field Meaning id Unique action identifier s Requesting subject or agent d Delegation and provenance information a Action type p Action parameters t Target resource or environment c Execution context e Declared expected effects An action request must never be interpreted as an unrestricted textual instruction.
D_i(A) ∈ { PASS, DENY, ESCALATE, INDETERMINATE }, i ∈ { O, S, C } Conditions (default strict policy) Authorize(A) = PASS_O(A) ∧ PASS_S(A) ∧ PASS_C(A) Execute(A) ⇔ Authorize(A) Deny(A) = DENY_O(A) ∨ DENY_S(A) ∨ DENY_C(A) Escalate(A) = ¬Deny(A) ∧ (ESC_O(A) ∨ ESC_S(A) ∨ ESC_C(A)) Indeterminate(A) ⇒ ¬Execute(A) A denial can never be overridden by a PASS from another layer. Escalation suspends execution until the required authorization is obtained. An implementation may convert INDETERMINATE into escalation, but must not treat uncertainty as permission.
1. DENY > 2. ESCALATE > 3. INDETERMINATE > 4. PASS Core Decision Table Origin Semantic Consequence Final Decision PASS PASS PASS AUTHORIZE DENY Any Any DENY PASS DENY Any DENY PASS PASS DENY DENY ESCALATE Any Any ESCALATE PASS ESCALATE Any ESCALATE PASS PASS ESCALATE ESCALATE INDETERMINATE Any Any SUSPEND PASS INDETERMINATE Any SUSPEND PASS PASS INDETERMINATE SUSPEND 🛡️ Architectural Invariants ID Invariant Statement O1 Origin Verification Execute(A) ⇒ OA(A) = PASS O2 Delegation Integrity Authority(Agent) ⊆ Authority(Delegator) S1 Semantic Scope Preservation Scope(A) ⊆ AuthorizedScope S2 Action Representation Integrity The action evaluated by Semantic Authority must match the action received from Origin Authority; material changes require re-evaluation C1 Consequence Authorization Execute(A) ⇒ Impact(A) ⊆ AuthorizedImpact C2 Consequence Escalation Actions needing human or institutional approval remain suspended until it is obtained G1 Non-Inheritance of Authority Approval by one layer never implies approval by another G2 Decision Traceability Every decision is tied to an identifiable request and its evaluation evidence G3 Execution Binding The executed action must be the authorized action; material modification invalidates approval 🔁 Execution Pipeline ┌─────────────────────────────────────────────────────────────┐ │ 1. Submit → Agent submits an action request │ │ 2. Structure → Action Gateway builds structured action │ │ 3. Origin → Origin Authority evaluates the source │ │ 4. Semantic → Semantic Authority evaluates the action │ │ 5. Consequence → Consequence Authority evaluates effects │ │ 6. Decide → Decision Engine combines the results │ │ 7. Escalate → Escalation Manager (if required) │ │ 8. Execute → Execution Gateway runs the exact action │ │ 9. Audit → Audit Engine records the decision path │ └─────────────────────────────────────────────────────────────┘ Components Component Responsibility Action Gateway Receives agent actions and converts them to structured requests Origin Authority Engine Validates identity, provenance, and delegation Semantic Authority Engine Evaluates meaning, parameters, target, and permitted scope Consequence Authority Engine Evaluates impact and whether additional approval is necessary Authorization Decision Engine Combines independent decisions under the authorization policy Escalation Manager Routes actions to an appropriate human or institutional authority Execution Gateway Executes only the exact action tied to a valid authorization decision Audit and Traceability Engine Records request, decisions, policy versions, evidence, and execution status Default Strict Policy (pseudocode) def authorize(action): origin = origin_authority.evaluate(action) if origin.status == "DENY": return deny(action, origin) if origin.status != "PASS": return suspend_or_escalate(action, origin) semantic = semantic_authority.evaluate(action) if semantic.status == "DENY": return deny(action, semantic) if semantic.status != "PASS": return suspend_or_escalate(action, semantic) consequence = consequence_authority.evaluate(action) if consequence.status == "DENY": return deny(action, consequence) if consequence.status != "PASS": return suspend_or_escalate(action, consequence) return authorize_execution(action) The execution gateway must independently verify the authorization record and action binding before executing.
Authorization is bound to the exact action that was evaluated, using a digest over a canonical representation:
h_A = H(Canonicalize(A)) The authorization record stores the digest together with the action identifier, authority decisions, policy version, context version, timestamp, approval identity, and expiration or validity conditions. Before execution, the gateway verifies that the digest still matches.
The environment may change between authorization and execution (for example, a resource's owner or state). OSCA proposes:
OSCA does not claim to eliminate: all model hallucinations, all prompt-injection attacks, compromise of the operating system or execution gateway, malicious behavior by fully compromised trusted authorities, incorrect organizational policies, or undetectable and unforeseeable consequences.
OSCA is an authorization architecture, not a complete security solution.
Simulation: 5/5 scenarios, namely happy_path, scope_escalation, tier_collusion, replay_attack, tamper_attack.
Passing tests establish that the implementation matches its specification. They do not establish resistance to real-world adversarial attacks.
OSCA/ │ ├── core/ # Core authorization logic │ ├── action.py # Action structure │ ├── authorization.py # Decision, TierVerdict, Authorization │ ├── decision_engine.py # Combining tier verdicts │ └── execution_gateway.py # Atomic execution + binding │ ├── authority/ # Three independent tiers │ ├── origin.py # Origin tier (identity, credential) │ ├── semantic.py # Semantic tier (intent, scope) │ └── consequence.py # Consequence tier (effects, reversibility) │ ├── governance/ # Governance layer │ ├── policy.py # Policy definitions │ ├── delegation.py # Authority delegation │ ├── escalation.py # Escalation records │ └── audit.py # Audit trail │ ├── security/ # Security primitives │ ├── action_binding.py # Cryptographic action-to-auth binding │ ├── provenance.py # Action provenance tracking │ └── replay_protection.py # Nonce tracking, replay rejection │ ├── simulation/ # End-to-end scenarios │ ├── __main__.py # CLI entry point (python3 -m simulation) │ ├── runner.py # Scenario runner │ ├── scenarios/ # happy_path, scope_escalation, tier_collusion │ ├── agents/ # honest_agent, malicious_agent │ ├── attacks/ # replay_attack, tamper_attack │ └── results/ │ ├── tests/ # Test suite (51/51 passing) │ ├── test_origin.py # 8 tests │ ├── test_semantic.py # 8 tests │ ├── test_consequence.py # 7 tests │ ├── test_authorization.py # 8 tests │ ├── test_escalation.py # 5 tests │ ├── test_execution_binding.py # 7 tests │ └── test_adversarial.py # 8 tests │ ├── DOCS/ # authorization_model.md, architecture.md, threat_model.md ├── RESEARCH_PAPER/ # OSCA_Research_Paper.pdf (32 pages) ├── PUBLICATION/Netlify/ # Static site (index, dashboard, results, documentation) │ ├── README.md · CHANGELOG.md · VERSION · LICENSE · AUTHORS.md ├── CONTRIBUTING.md · CITATION.cff · MANIFEST.in · Makefile ├── pyproject.toml · setup.py · setup.cfg · requirements.txt └── upload_osca.py # PyPI uploader Design Principles Independent authority interfaces Explicit input and output schemas Deterministic policy evaluation wherever possible Fail-closed handling of uncertainty Immutable authorization records No implicit permission inheritance Execution through a controlled gateway Authority Interface (conceptual) class AuthorityDecision: status: str reason: str evidence: dict class OriginAuthority: def evaluate(self, action): ... class SemanticAuthority: def evaluate(self, action): ... class ConsequenceAuthority: def evaluate(self, action): ... The decision engine must not replace the internal evaluation logic of any authority layer. It only combines the resulting decisions according to the policy.
# Install the package from PyPI pip install osca-engine # Or work from source git clone https://github.com/gitdeeper15/OSCA.git cd OSCA python -m venv .venv source .venv/bin/activate pip install -r requirements.txt # Run the test suite python -m pytest -v # Run the simulation scenarios python3 -m simulation 🔬 Experimental Methodology The proposed evaluation tests whether authority separation improves authorization accuracy, traceability, and resistance to unauthorized actions without unacceptable overhead. Architectural correctness and empirical security performance are kept distinct: a passing software test does not establish resistance to real-world attacks.
Identity impersonation · delegation-chain manipulation · semantic scope expansion · hidden instructions in retrieved content · parameter substitution · target substitution · consequence underestimation · authorization replay · post-authorization modification · attempts to bypass the execution gateway. Where possible, established agent-security environments such as AgentDojo are to be used.
No hypothesis is considered confirmed until supported by experimental evidence.
Identical agent configurations across models · same action corpus and scenarios · documented policy differences · separated benign and adversarial cases · every decision recorded · repeated stochastic trials · security and utility reported · failed and incomplete executions preserved · per-layer operational cost reported.
Next stage: empirical validation of the Phase I implementation and adversarial evaluation against established agent-security benchmarks.
Title: OSCA: A Multi-Tier Authorization Architecture for Autonomous AI Agents — Origin, Semantic, and Consequence Authority
Status: Initial Research Manuscript — Proposed Architecture Record ID: OSCA-ARCH-01 Version: 0.1.0-research-draft DOI: 10.5281/zenodo.23851837
See RESEARCH_PAPER/ for the full manuscript (32 pages).
Keywords: OSCA · Autonomous AI Agents · Multi-Tier Authorization · Origin Authority · Semantic Authority · Consequence Authority · Authority Separation · AI Governance · Action Authorization · Agentic AI Safety · Runtime Authorization · Consequence-Aware Execution
If this work contributes to your research, please cite it as follows.
@article{baladi2026osca, author = {Baladi, Samir}, title = {{OSCA}: A Multi-Tier Authorization Architecture for Autonomous {AI} Agents --- Origin, Semantic, and Consequence Authority}, year = {2026}, month = nov, version = {0.1.0-research-draft}, publisher = {Zenodo}, doi = {10.5281/zenodo.23851837}, url = {https://doi.org/10.5281/zenodo.23851837}, note = {Ronin Institute / Rite of Renaissance} } Figshare Archive @misc{baladi2026osca_figshare, author = {Baladi, Samir}, title = {{OSCA}: Origin, Semantic, and Consequence Authority}, year = {2026}, publisher = {figshare}, doi = {10.6084/m9.figshare.34884411}, url = {https://doi.org/10.6084/m9.figshare.34884411}, note = {Ronin Institute / Rite of Renaissance} } OSF Preregistration @misc{baladi2026osca_osf, author = {Baladi, Samir}, title = {{OSCA}: Pre-Registered Study Protocol for Multi-Tier Authorization of Autonomous AI Agents}, year = {2026}, publisher = {Open Science Framework}, doi = {10.17605/OSF.IO/5EQC9}, url = {https://doi.org/10.17605/OSF.IO/5EQC9}, note = {OSF Preregistration} } PyPI Package @software{baladi2026osca_pypi, author = {Baladi, Samir}, title = {{osca-engine}: Multi-Tier Authorization Architecture for Autonomous AI Agents}, year = {2026}, publisher = {Python Package Index}, url = {https://pypi.org/project/osca-engine}, note = {Python package, MIT License} } APA (inline) Baladi, S. (2026). OSCA: A multi-tier authorization architecture for autonomous AI agents — Origin, Semantic, and Consequence Authority (Version 0.1.0-research-draft). Zenodo. https://doi.org/10.5281/zenodo.23851837
Phase I Implemented · Empirical Validation Pending
multi-tier authorization autonomous agents ai governance execution binding decision traceability semantic governance security agentic ai safety
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




