Skip to main content

A framework for autonomous LLM-driven research loops over any verifiable problem

Project description

autoresearch_anything

autoresearch_anything is a framework for running autonomous LLM-driven research loops over any verifiable problem. You define what to propose, how to evaluate, and whether to keep results — the framework runs the loop across local or remote workers.

If you're missing anything, let me know on Discord or Twitter.

Install

pip install autoresearch_anything

Concepts

The framework has two kinds of workers:

  • Impl workers — run an LLM that reads your editable files and modifies them to implement a proposed direction.
  • Eval workers — run your evaluation command and return stdout.

You subclass Autoresearch to wire these together:

from autoresearch_anything import Autoresearch, Journal, EvalWorker, ImplWorker, Models, ModelConfig

class MyResearch(Autoresearch):
    journal      = MyJournal
    eval_workers = [EvalWorker(host=None, remote_dir="/path/to/project")]
    impl_workers = [ImplWorker(host=None)]
    models       = Models(
        propose   = ModelConfig(model="claude-opus-4-5", provider="anthropic"),
        commit    = ModelConfig(model="claude-opus-4-5", provider="anthropic"),
        implement = ModelConfig(model="claude-cli",      provider="claude-cli"),
        diagnose  = ModelConfig(model="claude-cli",      provider="claude-cli"),
    )
    eval_command = "python evaluate.py"
    editable     = ["model.py"]

    def propose(self, state, history):
        # Return a natural-language direction string
        ...

    def parse_result(self, stdout):
        # Parse eval stdout into a result dict
        ...

    def keep(self, result, history):
        # Return True to accept, False to discard
        return history.best is None or result["score"] > history.best["score"]

autoresearch = MyResearch()

Journal

Subclass Journal to implement state and history management:

from autoresearch_anything import Journal

class MyJournal(Journal):
    def get_state(self):
        # Return {relative_path: content} of current editable files
        ...

    def get_history(self):
        # Return history as a string for the propose prompt
        ...

    def record(self, result):
        # Persist a result
        ...

    def apply(self):
        # Accept the current impl (e.g. copy files into place)
        ...

    def revert(self):
        # Discard the current impl
        ...

Run

Point autoresearch_run at a package that exports an autoresearch instance:

autoresearch_run my_autoresearch_package

The impl worker entry point (autoresearch_impl_runner) is launched automatically on impl workers — you don't need to call it directly.

Programmatic API

You can also launch from Python directly:

from autoresearch_anything import run_from_instance

run_from_instance(autoresearch)

Troubleshooting

If something's broken or confusing, hit me up on Discord or Twitter.

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

autoresearch_anything-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

autoresearch_anything-0.1.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file autoresearch_anything-0.1.0.tar.gz.

File metadata

  • Download URL: autoresearch_anything-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for autoresearch_anything-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d50d1dc583cded24083237866ea1667241c388d70f66241d93f8d5a153a8bec
MD5 eeea0976def01c62c832a9610ee03bf6
BLAKE2b-256 8d22f02fcf529f0c2fa75647a56156938db596f70c9e7c23f180d41caae59adf

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoresearch_anything-0.1.0.tar.gz:

Publisher: publish.yml on apaz-cli/autoresearch_anything

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autoresearch_anything-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autoresearch_anything-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2269828ba1914fe1070f4fab123410393d912d70e00ed515942bf2f5d6c971a7
MD5 6dd8b50f97d1eb213b4c38ed90065b84
BLAKE2b-256 40081c905d726fd9ab13c5aa219ce0a2d2c8cf12f0fdb897ecd47a33ac2d9348

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoresearch_anything-0.1.0-py3-none-any.whl:

Publisher: publish.yml on apaz-cli/autoresearch_anything

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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