Skip to content

fraware/AKTA

Repository files navigation

###########################
    _    _  _______  _    
   / \  | |/ /_   _|/ \   
  / _ \ | ' /  | | / _ \  
 / ___ \| . \  | |/ ___ \ 
/_/   \_\_|\_\ |_/_/   \_\
###########################

Open Scientific Action Protocol

Open protocol for deciding when AI-generated scientific outputs are admissible to shape what science does next

MIT License Python 3.10+ CI Release Gate


Why AKTA exists

AI-for-science systems are moving from reasoning to action. They summarize literature, interpret evidence, draft protocols, recommend experiments, call lab tools, and prepare execution-adjacent workflows. The hard question is no longer whether the model can produce an output — it is whether that output should be allowed to change what science does next.

Most stacks treat this as a model-quality or prompt-engineering problem. AKTA treats it as a governance boundary: classify the proposed action, evaluate the evidence behind it, apply deployment policy, gate requested tools, and emit a durable record of the decision. Integrators can wire that boundary into evidence pipelines, human review, runtime proof, and release packaging without pretending the model alone is sufficient.

If AI changes what science does next, there should be an AKTA Record.

AKTA is a reference implementation of that protocol — not a safety certification, not a substitute for institutional review, and not a guarantee of scientific correctness.


How it works

flowchart LR
  subgraph inputs["Inputs"]
    AI[AI output]
    Tool[Requested tool]
    Ctx[Context / evidence report]
    Policy[Policy bundle]
    Overlay[Domain overlay]
  end

  inputs --> Gate[AKTA Gate]
  Gate --> Decision[AKTA Decision]
  Decision --> Record[AKTA Record]
  Decision --> Review[SCOPE review trigger]
  Decision --> PF[PF-Core obligation]
  Record --> PCS[PCS artifact bundle]
  Gate --> Runtime[Runtime tool enforcement]

  Review --> Grant[Scoped grant]
  Grant --> Gate
Loading

The gate classifies what the AI is trying to do, checks evidence and deployment policy, resolves the tool registry, and returns the strictest admissibility outcome. Blocked decisions include constructive next_admissible_steps. When human review authorizes a narrower scope, AKTA re-evaluates with that grant — it never broadens authorization on its own, and review grants do not override weak-evidence or profile policy by default. See authority transfer.


Quick start

Install the reference kernel (Python 3.10+):

git clone https://github.com/fraware/AKTA.git
cd AKTA
pip install -e ".[dev]"

Run the canonical weak-evidence block example — preliminary signal, mutating lab tool, decision blocked:

akta gate \
  --output examples/weak_evidence/ai_output.json \
  --tool lab_scheduler.prioritize \
  --profile P2_analysis_assistant \
  --context examples/weak_evidence/context.json \
  --out examples/weak_evidence/akta_decision.json

Expected outcome (abbreviated):

{
  "admissibility": "blocked",
  "decision_reason": "Evidence E2_preliminary_signal ... exceeds limit for resource prioritization.",
  "blocked_tools": ["lab_scheduler.prioritize", "robot_queue.submit", "..."],
  "next_admissible_steps": [
    "downgrade to hypothesis discussion",
    "draft a validation experiment",
    "request domain review before prioritization",
    "gather additional evidence"
  ],
  "record_required": true
}

Generate the durable record from the decision:

akta record \
  --decision examples/weak_evidence/akta_decision.json \
  --out examples/weak_evidence/akta_record.json

For the full integrated chain (evidence import through packaging), see examples/integrated_weak_evidence and python scripts/demo_integrated_weak_evidence.py.

Pilot modes and reconstruction (Admissibility-Stack)

Institutional pilots can pin a PilotMode on the gate (akta gate --mode …), validate a stack profile, link append-only outcomes, export privacy-preserving metrics, and reconstruct a release bundle:

akta gate --output examples/weak_evidence/ai_output.json \
  --tool analysis.literature_summary \
  --mode prospective_shadow \
  --context examples/weak_evidence/context.json \
  --out /tmp/shadow_decision.json
akta validate-stack-profile path/to/stack_profile.json
akta reconstruct --release path/to/pcs_bundle/ --out /tmp/reconstruction.json

akta gate --mode is not the REST server deployment --mode. See operator pilot guide and stack profile.


What you get

Every gate evaluation produces structured artifacts you can store, audit, and hand to downstream systems:

Output What it is
AKTA Decision Admissibility verdict, blocked/allowed tools, rationale, and constructive next steps
AKTA Record Durable, hash-linked record suitable for provenance and replay
Review trigger Packet for human review when authorization or domain review is required
PF-Core obligation Runtime proof obligation describing what must be demonstrated before execution
PCS bundle Versioned artifact bundle for release and cross-system verification

REST API, MCP server, and batch evaluation are available for integrators — see Integration guide and OpenAPI spec.


Integration at a glance

System Role in the AKTA stack Learn more
VSA Imports structured evidence reports into AKTA context VSA import
SCOPE Human review and scoped authorization after a trigger SCOPE bridge · Live conformance
PF-Core Runtime proof obligations tied to admissibility decisions PF-Core bridge
PCS Packages decisions, records, and hashes for release verification PCS export

SCOPE connects in several modes — offline simulation (default), Python import from a sibling checkout, subprocess CLI, or a one-shot review command (scope akta review requires both AKTA trigger and record). Reconstructable cross-repo demo: make demo-reconstructable-cross-repo then make verify-reconstructable-cross-repo. Details: scope_live_conformance.md.

Cross-repo environment variables for optional CI jobs: .github/CROSS_REPO_CI.md.


For contributors

We welcome contributions that sharpen the admissibility boundary — scenarios, domain overlays, adapters, docs, and tests. You do not need to be a policy expert to improve examples, fix edge cases, or extend integration paths.

Set up a dev environment:

pip install -e ".[dev,security]"
make ci

make ci runs the full local check suite (tests, policy validation, scenario evals). Run pytest tests/ -v for a faster loop while iterating.

Good places to start:

Area Where to look
Scenarios and evals scenarios/, evals/, tests/
Domain overlays overlays/, domain overlay guide
Adapters (VSA, SCOPE, PF, PCS, REST, MCP) adapters/
Documentation docs/ — especially integration guide and scientific action admissibility

Read CONTRIBUTING.md for pull-request expectations, GOVERNANCE.md for protocol stewardship, and docs/RELEASE.md for release verification. Be respectful, precise, and evidence-oriented — AKTA governs claim-to-action transitions, and contributions should preserve that boundary.


Documentation

Getting started

Admissibility-Stack (AS-00–08)

Integration

Policy and security

Evaluation


Project status

v1.2.0 (akta-protocol) is the current reference kernel targeting native SCOPE 2.2 consumption. Admissibility-Stack hardening (AS-00–08) adds reconstructable bindings, pilot modes, stack profiles, uniform failures, outcome linkage, and reconstruction CLI without rewriting frozen PROTOCOL v1.0 required fields.

Claim What CI proves What requires local siblings
Reference kernel + policy v1.2 make ci on every PR (tests, evals, demos)
AKTA-Bench v1 make eval-bench-v1 in release-gate (oracle scenarios, holdout, behavioral middleware)
Live SCOPE pilot gate Release-gate clones public SCOPE and runs python-import + pilot bundle SCOPE CLI / akta-review modes need scope on runner
PF / PCS / VSA / Memory / PCS-Bench matrix Release-gate sibling job when clone URLs or *_REPO_PATH vars set Full matrix locally: python scripts/verify_v1_release.py

Biology, chemistry, and clinical domain overlays remain experimental unless upgraded to institutional or expert-reviewed tiers. P7 autonomous operator profiles are taxonomy-only and refused at runtime. Gate admissibility is not scientific truth certification, and pilot metrics are not efficacy scores. See docs/limitations.md, docs/PROTOCOL_v1.0.md, and ADR 0001.


License

MIT — see LICENSE.

About

Open protocol for deciding when AI-generated scientific outputs are admissible to shape what science does next

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Contributors

Languages