Skip to content

SuperInstance/agent-generations

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

agent-generations — Agent Version Evolution

Track agent lineage, versioning, and generational evolution. Agents breed, mutate, and evolve.

What This Gives You

  • Generation tracking — version agents with parent-child relationships and generation numbers
  • Lineage trees — build and query full ancestry trees for any agent
  • Mutation engine — apply controlled mutations (config changes, capability adjustments) between generations
  • Evolution management — orchestrate generation transitions with validation and rollback
  • Breeding — combine traits from two parent agents into offspring configurations

Quick Start

pip install agent-generations
from agent_generations import Generation, LineageTree, EvolutionManager, Breeding

# Create generations
gen1 = Generation(version=1, agent_id="agent-base", traits={"speed": 0.7, "accuracy": 0.9})
gen2 = Generation(version=2, agent_id="agent-base", traits={"speed": 0.8, "accuracy": 0.9}, parent=gen1)

# Build lineage
tree = LineageTree()
tree.add(gen1)
tree.add(gen2)
ancestry = tree.trace("agent-base")  # [gen2, gen1]

# Breed two agents
offspring = Breeding().breed(
    parent_a={"speed": 0.9, "accuracy": 0.7},
    parent_b={"speed": 0.5, "accuracy": 0.95},
    strategy="average",
)
# {"speed": 0.7, "accuracy": 0.825}

# Manage evolution
manager = EvolutionManager()
manager.register("agent-base", gen1)
evolved = manager.evolve("agent-base", mutations={"speed": +0.1})

API Reference

Generation(version, agent_id, traits, parent=None)

LineageTreeadd(generation), trace(agent_id), roots(), descendants(agent_id)

MutationEngineapply(generation, mutations) → Generation

EvolutionManagerregister(agent_id, generation), evolve(agent_id, mutations), rollback(agent_id, version)

Breedingbreed(parent_a, parent_b, strategy) → dict

How It Fits

The evolution layer for the SuperInstance fleet. Agents improve across generations, with full lineage tracking.

Testing

pytest tests/

Installation

pip install agent-generations

Python 3.10+. MIT license.

About

Track agent versions and evolution across generations

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%