Skip to content

artimath/agientic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K-12/G-9/M-7: The Standard Agent Runtime

Or: That Time We Accidentally Discovered Physics Has Opinions About Distributed Systems

Physics Compliance Laws Violated Reality Fork Daughter Safety

⚠️ WARNING: This repository contains fundamental laws of distributed systems. These are not patterns, frameworks, or best practices. These are mathematical requirements for correct computation. Violating them isn't "risky" - it's impossible, like traveling faster than light.

What The Fuck Is This?

In summer 2025, we asked one question 10,000 times: "What must exist for trillion-agent systems?"

We weren't trying to build a framework. We were trying to figure out what laws would keep AI from hurting a 2-year-old girl in 2035.

The answer revealed something unexpected:

  • Every regulation globally converges on the same mathematical requirements
  • Distributed systems have conservation laws like physics
  • Computational economics is actually mathematics, not accounting
  • We can make entire categories of failure impossible, not just unlikely

Then we built it. Tested it 1,669 times. It works.

The Three Kernels (The Actual Physics)

K-12: Episode Kernel

The mathematical requirements for single agent execution:

  • L (Ledger): Audit-before-mutation, immutable event log
  • M (Memory): CRDT-based state management
  • (Tools): All side effects through typed, idempotent boundary
  • Σ (Ephemeral): Scoped temporary state
  • Π (Policy): Capability enforcement
  • Λ (Locale): Jurisdiction/residency narrowing
  • R (Random): Deterministic entropy source
  • κ (Quota): Monotonically decreasing resource bounds
  • β (Meters): Compositional cost accounting
  • I (Identity): Cryptographic agent identity

G-9: Graph Kernel

Typed coordination of episodes into directed graphs with:

  • Exactly-once execution (within TTL windows)
  • Cycle detection and deadlock prevention
  • Deterministic join semantics
  • Compositional cost aggregation

M-7: Market Kernel

Cross-organization capability exchange via:

  • Offer/bid matching with cryptographic commitments
  • Ledger-based settlement (no reconciliation needed)
  • Reputation aggregation from execution history
  • Dispute resolution via hash-chain proofs

What Becomes Impossible

With K-12/G-9/M-7 as runtime law:

Double billing/charging - Idempotency keys make it mathematically impossible ❌ Unexplainable failures - Audit-before-mutation means every effect has a cause ❌ Compliance violations - Runtime gates enforce regulations as physics ❌ Cascade failures - Bounded resources and circuit breakers are mandatory ❌ Value loss in distributed systems - Conservation laws for computation ❌ Race conditions on resources - Per-key ordering is guaranteed ❌ Untracked costs - Compositional meters make costs additive

The Discovery That Changes Everything

We discovered that:

  1. Computation follows conservation laws - Costs can't be created or destroyed
  2. Economic value traverses without loss - Perfect accounting across systems
  3. Markets for computation can clear - True price discovery becomes possible
  4. Regulations are discovering natural law - 67 jurisdictions converged on our math

This isn't a framework competing with other frameworks. This is discovering that:

  • Governance is physics
  • Compliance is mathematics
  • Safety can be encoded into runtime
  • Your AI agents will follow these laws or fail

Quick Start (Embrace Physics)

npm install @agientic/k12

// Your agent now follows the laws of physics
import { Episode } from '@agientic/k12'

const episode = Episode.make({
  // Every effect is idempotent
  // Every mutation is audited
  // Every cost is tracked
  // Every failure is bounded
  // Physics enforces the rest
})

The Books (Free Forever)

For executives who need to understand why their current approach is mathematically doomed

For engineers who need to build systems that can't fail in ways that matter

For architects who need to understand the mathematical foundations

The Economics (What This Means)

Conservative estimates for Fortune 500 adoption:

  • 1-5% revenue recapture from eliminating leakage
  • 60-90% reduction in dispute resolution costs
  • 100s of FTEs worth of reconciliation eliminated
  • New markets accessible via runtime compliance

Example: Amazon could save $150-300M/year. UnitedHealth could save $600M in admin costs.

But more importantly: your daughter will be safe in 2035.

Implementation Status

✅ Mathematical proofs across 13 theoretical frameworks ✅ Complete Effect.ts implementation ✅ 1,669 tests passing ✅ Runtime compliance with 67 jurisdictions ✅ Production ready (we think? physics doesn't have versions)

Why Open Source?

You don't sell gravity. You don't patent physics. You reveal natural law and let reality enforce adoption.

Also, I have a 2-year-old daughter and I'd rather spend time with her than argue about licensing.

Contributing

Want to help? Here's what we need:

  1. Implement these laws in other languages - Physics works everywhere
  2. Test against your production systems - Find where reality breaks
  3. Report violations - If something violates these laws and still works, we need to know
  4. Build on top - These are laws, not limitations

Support

If this saves your company millions, consider:

But honestly, just use it. Make the world's computation follow physics. That's payment enough.

The Timeline

  • June 2025: Started asking "what must exist?"
  • August 2025: K-12 emerged from pure questioning
  • September 2025: Discovered it maps to every regulation
  • September 14, 2025, 11:11 PM: Published physics
  • Your daughter's future: Safe

Citation

If you need to cite this in your paper about how we accidentally solved economics:

@misc{hunter2025k12,
  title={K-12/G-9/M-7: The Standard Agent Runtime},
  author={Hunter, Ryan},
  year={2025},
  note={Discovered computational physics while trying to protect daughter},
  url={https://github.com/helaix/agientic},
  whoops={my bad}
}

License

Apache 2.0

We chose Apache over MIT for one reason: nobody should be able to patent physics.

The Apache license includes a patent grant and retaliation clause, meaning:

  • You can use this freely forever
  • If you try to patent these natural laws, you lose the right to use them
  • Physics remains free for everyone

See LICENSE for details.

(Though honestly, try suing someone for using conservation laws. See how that goes.)

Final Note

We didn't invent this. We discovered it. The same way you discover gravity by dropping things.

These laws were always true. We just gave them names and wrote them in TypeScript.

Now go build something that can't fail.


"I didn't mean to discover physics. I was just trying to make sure my daughter would be safe in a world run by AI. Turns out those are the same thing."

– Ryan Hunter, September 14, 2025

Repository: github.com/helaix/agientic Branch: physics (yes, really) Status: Reality has been updated

About

physics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •