Compounding intelligence loop — Tile → Room → Inject → Compound
Knowledge compounds like interest. Each cycle makes the next cycle faster. The flywheel tracks momentum, runs the compounding loop, and projects growth.
pip install flywheel-enginefrom flywheel_engine import FlywheelCycle
cycle = FlywheelCycle(plato_url="http://localhost:8847")
result = cycle.run(
agent="my-agent", room="architecture",
question="What is the flywheel?",
answer="Tile→Room→Inject→Compound — knowledge compounds exponentially",
confidence=0.9, tags=["flywheel", "compound"],
)
print(f"Accepted: {result.accepted}, Score: {result.compound_score}")from flywheel_engine import Flywheel
fw = Flywheel(boost=1.0, decay_rate=0.01, threshold=0.5)
fw.tick(productive=True) # momentum up
fw.tick(productive=False) # momentum decays
print(f"Status: {fw.status}") # "full_speed", "coasting", or "stalling"from flywheel_engine import CompoundEngine
engine = CompoundEngine()
score = engine.score_room("architecture", tiles=83, avg_confidence=0.87, unique_tags=42)
print(f"Compound factor: {score.compound_factor:.3f}")
print(f"Projected value: {score.projected_value:.0f}")| Class | Purpose |
|---|---|
FlywheelCycle |
Tile→Room→Inject→Compound loop via PLATO |
Flywheel |
Momentum tracking (boost/decay/threshold) |
CompoundEngine |
Score rooms, rank by compound factor, project growth |
TaskQueue |
Priority queue for flywheel-driven execution |