Skip to main content

Core library for Group-Evolving Agents

Project description

howler-agents-core

Core Python library for Group-Evolving Agents (GEA) -- an evolutionary framework for open-ended self-improvement via experience sharing (arXiv:2602.04837).

This package implements the full GEA algorithm: agent pool management, performance-novelty parent selection, shared experience aggregation, group reproduction via meta-LLM, and probe-based capability characterization. It can be used standalone or as the engine behind howler-agents-service.

Installation

pip install howler-agents-core

Optional dependencies

For production use with Postgres (experience store + pgvector KNN) and Redis (hot cache):

pip install howler-agents-core[postgres]   # SQLAlchemy + asyncpg + pgvector
pip install howler-agents-core[redis]       # redis with hiredis
pip install howler-agents-core[all]         # both

Quick Usage

import asyncio
import uuid

from howler_agents import HowlerConfig, EvolutionLoop
from howler_agents.agents.base import Agent, AgentConfig, FrameworkPatch, TaskResult
from howler_agents.agents.pool import AgentPool
from howler_agents.evolution.reproducer import GroupReproducer
from howler_agents.experience.pool import SharedExperiencePool
from howler_agents.experience.store.memory import InMemoryStore
from howler_agents.llm.router import LLMRouter
from howler_agents.probes.evaluator import ProbeEvaluator
from howler_agents.probes.registry import ProbeRegistry
from howler_agents.selection.criterion import PerformanceNoveltySelector


class MyAgent(Agent):
    """Implement your agent by subclassing Agent."""

    async def run_task(self, task: dict) -> TaskResult:
        # Your task execution logic here
        return TaskResult(success=True, score=0.8, output="done")

    async def apply_patch(self, patch: FrameworkPatch) -> None:
        self.patches.append(patch)


async def main() -> None:
    config = HowlerConfig(
        population_size=10,
        group_size=3,
        num_iterations=5,
        alpha=0.5,
        num_probes=20,
    )

    store = InMemoryStore()
    experience = SharedExperiencePool(store)
    llm = LLMRouter(config)
    selector = PerformanceNoveltySelector(alpha=config.alpha)
    reproducer = GroupReproducer(llm, experience, config)
    registry = ProbeRegistry()
    registry.register_default_probes(num_probes=config.num_probes)
    probes = ProbeEvaluator(registry)

    pool = AgentPool()
    for _ in range(config.population_size):
        pool.add(MyAgent(AgentConfig(id=str(uuid.uuid4()))))

    loop = EvolutionLoop(config, pool, selector, reproducer, experience, probes)

    tasks = [{"description": "solve a coding problem", "type": "general"}]
    results = await loop.run("my-run", tasks)
    print(f"Best score: {results['best_score']:.3f}")


asyncio.run(main())

Core Modules

Module Description
howler_agents.agents Agent base class, AgentPool, FrameworkPatch
howler_agents.selection Performance scorer, KNN novelty estimator, combined criterion
howler_agents.experience Evolutionary traces, shared experience pool, pluggable stores
howler_agents.evolution Evolution directives, group reproducer, main evolution loop
howler_agents.probes Probe task interface, evaluator, registry
howler_agents.llm LiteLLM-backed router with role-based model dispatch
howler_agents.config HowlerConfig with all GEA parameters (K, M, alpha, iterations)

Configuration

HowlerConfig accepts all GEA parameters:

Parameter Default Description
population_size (K) 10 Total agents in population
group_size (M) 3 Agents per parent group
num_iterations 5 Evolution generations
alpha 0.5 Performance vs novelty weight (0=novelty, 1=performance)
num_probes 20 Probe tasks for capability vector
task_domain "general" Domain identifier (e.g., "swe-bench", "polyglot")
role_models Claude Sonnet defaults Per-role LLM model configuration

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

howler_agents_core-0.4.0.tar.gz (146.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

howler_agents_core-0.4.0-py3-none-any.whl (147.4 kB view details)

Uploaded Python 3

File details

Details for the file howler_agents_core-0.4.0.tar.gz.

File metadata

  • Download URL: howler_agents_core-0.4.0.tar.gz
  • Upload date:
  • Size: 146.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for howler_agents_core-0.4.0.tar.gz
Algorithm Hash digest
SHA256 74d1480bc88ffb06181054968b212c632212b6c68b2c73786abbf63d8060bfc4
MD5 c1896ed4aaaa6fac92ed1c2c138634e1
BLAKE2b-256 011c02b6971a35faf6eddce0aa1c6866dbc9f52b015f959161e3b6babd9a6cf5

See more details on using hashes here.

File details

Details for the file howler_agents_core-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: howler_agents_core-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 147.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for howler_agents_core-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02bfbed8fc9f9a43936654e96d4d0b9dd4cbe9edeb6b121061c10bcb44cd6f65
MD5 79077b57e5bc38a75dee3fc37e0edab2
BLAKE2b-256 99e05fb43f78b2b19fc2dba5e540dfdab75c1a1fd377ab4ad0d63790e118f210

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page