Skip to content

archon

diapason.agents.hybrid.archon

ArchonAgent — port of ScalingIntelligence/Archon.

Inference-time architecture search: layered (generator → ranker → fuser) sampling where a generator proposes K candidates, a ranker scores them, and a fuser synthesizes a final answer. Paper: arXiv:2409.15254.

How the hybrid harness wires it (and what we mirror here):

  • Local proposers (generator layer): K samples from vLLM via an OpenAI-compatible client at local_endpoint. Injected as a custom vllm_local model_type into Archon's GENERATE_MAP — that's the only way Ranker/Fuser can pick up custom backends (they re-instantiate Generator without custom_generators).
  • Cloud ranker + fuser: Archon's built-in OpenAI_API / Anthropic_API. Patched at import time to strip temperature for Opus 4.7+ and to tally token usage (Archon ignores usage by default).

cfg knobs:

  • n_samples (int, default 5) — K proposers
  • architecture (str, default "ensemble_rank_fuse")

  • "ensemble_rank_fuse" → [K local generators, 1 cloud ranker, 1 cloud fuser]

  • "single_local" → [1 local generator] (debug)

  • ranker_model / fuser_model (default: cloud_model for both)

  • max_tokens (default 2048), temperature (default 0.7)

Requires the Archon library from https://github.com/Stanford-ILIAD/Archon — either pip-install editable or set ARCHON_SRC to the checkout's src/ directory. Import is lazy.

Ported from hybrid-local-cloud-compute/adapters/archon_adapter.py.

ArchonAgent

Bases: LocalCloudAgent

Layered (generator → ranker → fuser) inference-time search.