Skip to main content

Polymathera's no-RAG, multi-agent framework for extremely long, dense contexts (1B+ tokens).

Project description

Colony

Polymathera's no-RAG, multi-agent framework for extremely long, dense contexts (1B+ tokens). It provides:

  • A cluster-level virtual context memory with user-defined context paging.
  • Cache-aware agent action policies.
  • Powerful and composable multi-agent patterns.
  • Arbitrarily sophisticated memory hierarchies and cognitive processes.

Can Polymathera's Colony be a realization of the "country of geniuses in a datacenter" vision?

Quick Start

Installation

pip install polymathera-colony

With optional extras:

pip install polymathera-colony[code_analysis]    # Code analysis tools
pip install polymathera-colony[gpu]              # GPU inference (vLLM, PyTorch)
pip install polymathera-colony[cpu]              # CPU-only inference (Anthropic API)
pip install polymathera-colony --all-extras      # Everything

Local Test Environment

Colony ships with colony-env, a CLI tool that spins up a local Ray cluster + Redis using Docker Compose. The only prerequisite is Docker.

# Start the cluster (builds image on first run)
colony-env up

# Generate a sample analysis config
polymath init-config --output my_analysis.yaml

# Run a code analysis over a local codebase
colony-env run /path/to/codebase --config my_analysis.yaml

# Check service status
colony-env status

# Open the web dashboard
colony-env dashboard

# Scale workers
colony-env up --workers 3

# Tear down
colony-env down

# Verify prerequisites
colony-env doctor

All Colony dependencies run inside Docker — no local GPU drivers, Ray, or Redis installation required. The colony-env run command copies your codebase to be analyzed into the cluster and executes inside the Ray head container with full access to the framework.

Services started by colony-env up:

Service Port Description
Colony dashboard localhost:8080 Web UI for agents, sessions, VCM
Ray dashboard localhost:8265 Cluster monitoring UI
Ray client localhost:10001 Ray client connection
Redis localhost:6379 State management backend

Web Dashboard

The Colony dashboard starts automatically with colony-env up at localhost:8080. It provides:

  • Overview — cluster health, application deployments, quick stats
  • Agents — list registered agents, view state, capabilities, and details
  • Sessions — browse sessions and their agent runs with token usage
  • VCM — page table, working set, and virtual context statistics
# Run the agent colony
colony-env down && colony-env up --workers 3 && colony-env run --local-repo /path/to/codebase --config my_analysis.yaml --verbose

# Open the dashboard in your browser
colony-env dashboard

# Use a custom port (must match COLONY_DASHBOARD_UI_PORT)
colony-env dashboard --port 9090

For frontend development, run the Vite dev server on the host with hot-reload:

cd src/polymathera/colony/web_ui/frontend
npm install
npm run dev     # Starts on localhost:5173, proxies /api to localhost:8080

Development

git clone https://github.com/polymathera/colony.git
cd colony
poetry install --all-extras

Optional Dependencies

Dependencies that require system libraries (CUDA, native extensions) are declared as optional extras in pyproject.toml:

[tool.poetry.dependencies]
some-dep = { version = "^1.0", optional = true }

[tool.poetry.extras]
feature_name = ["some-dep"]

Guard optional imports in code:

try:
    import heavy_dep
except ImportError:
    heavy_dep = None

def feature_function():
    if heavy_dep is None:
        raise ImportError(
            "Install with: pip install polymathera-colony[feature_name]"
        )

Documentation

Documentation is built with MkDocs Material and API reference is auto-generated from docstrings via mkdocstrings.

# Install dev dependencies (includes mkdocs + plugins)
poetry install --all-extras

# Start local docs server with hot-reload
mkdocs serve                  # --dev-addr http://127.0.0.1:8000/

# Build static site (output in site/)
mkdocs build

# Build with strict mode (treat warnings as errors)
mkdocs build --strict

The server has hot-reload — any edits to docs/ or source files will auto-rebuild.

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

polymathera_colony-0.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

polymathera_colony-0.1.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polymathera_colony-0.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for polymathera_colony-0.1.0.tar.gz
Algorithm Hash digest
SHA256 74da9766cb95b59762a219fd5f7e6d9722f58538bb1012f176e5ff302304daa1
MD5 3e050746dd1e36186eae131b5c089f0c
BLAKE2b-256 b3b9fde07ff993a7ced748b165892e726cfc36b728261cb1c44fc825fdedf12f

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on Polymathera/colony

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

File details

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

File metadata

File hashes

Hashes for polymathera_colony-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5d11a652b273964ba2a6fa458c106a087d3fdabfa17a2851a3986463e1ac1de
MD5 fb17b3292c524cea70cf8ff0a0581269
BLAKE2b-256 7b447ab88efe742220fa94a70ad4bbcb6531fe035c9d89a019c63a1be167dffd

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on Polymathera/colony

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