Skip to main content

Institutional-grade modular engine for generative forecasting and agentic reasoning.

Project description

xrtm-forecast

Institutional-grade parallelized agentic reasoning engine.

Overview

xrtm-forecast is an institutional-grade, domain-agnostic intelligence engine. It provides a framework for:

  • Inference Layer: Standardized provider interfaces for Gemini, OpenAI, and local Hugging Face models.
  • Tiered Reasoning: Composite RoutingAgent for cost-optimized task dispatching.
  • Reasoning Graph: A pluggable state-machine orchestrator for multi-agent workflows.
  • Agent Core: Standardized Agent base class for structured reasoning and parsing.
  • Skill Protocol: Composable behaviors (e.g., Search, SQL, Pandas) that agents can dynamically equip.
  • Observability: OTel-native structured telemetry and institutional execution reports.
  • Evaluation: Built-in Backtest Engine for large-scale accuracy metrics (Brier Score, ECE).
  • Temporal Sandboxing: Multi-layered protection (PiT Tools, Clock Mocking, Leakage Guardian) to prevent look-ahead bias in historical backtests.

Architectural Design: "Pure Core / The Kit"

xrtm-forecast is designed for modularity using a strict three-tier architecture:

  • The Core (/core): Zero-dependency protocol layer and state-machine orchestrator.
  • The Kit (/kit): Importable "Instruments" (Agents, Skills, Evaluators) for standard use cases.
  • Providers (/providers): Concrete connectors for cloud and local inference backends.

Installation

From PyPI (Stable)

# Standard Institutional Install (Cloud + Core)
pip install xrtm-forecast

# Hardware-Specific Local Inference
pip install "xrtm-forecast[transformers]"  # PyTorch + HuggingFace
pip install "xrtm-forecast[vllm]"          # High-throughput serving
pip install "xrtm-forecast[llama-cpp]"     # CPU-optimized GGUF
pip install "xrtm-forecast[xlm]"           # Local Encoder specialists

# Researcher Kit (Enhanced Data/Viz)
pip install "xrtm-forecast[data,viz,memory]"

From Source (Latest)

pip install git+https://github.com/xrtm-org/forecast.git

Configuration

xrtm-forecast follows a decentralized configuration pattern. Global environment variables are used for infrastructure (API keys), while specific behaviors are controlled via module-level configuration classes.

1. Environment Secrets

Set your API keys in a .env file or environment:

# Core API Keys
GEMINI_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here
TAVILY_API_KEY=your_key_here

2. Component Configuration

Each major module (inference, graph, telemetry, tools) has its own config.py defining its schema. This allows you to instantiate multiple components with different settings in the same process.

Quick Start

xrtm-forecast is designed for high-end ergonomics. Use the pre-configured assistants to start forecasting in seconds:

import asyncio
from forecast import create_forecasting_analyst

async def main():
    # 1. Instantiate the analyst with a shortcut
    # (API keys are automatically injected from your .env file)
    agent = create_forecasting_analyst(model_id="gemini")
    
    # 2. Execute reasoning on a complex probabilistic question
    result = await agent.run(
        "Will a general-purpose AI (AGI) be publicly announced before 2030?"
    )
    
    print(f"Confidence: {result.confidence}")
    print(f"Reasoning: {result.reasoning}")

if __name__ == "__main__":
    asyncio.run(main())

Documentation & Examples

Contributing

We welcome institutional-grade contributions! Please see CONTRIBUTING.md for setup instructions and our development workflow.


License

xrtm-forecast is open-source software licensed under the Apache-2.0 license. See the LICENSE file for more details.

Copyright © 2026 XRTM Team.

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

xrtm_forecast-0.2.1.tar.gz (74.1 kB view details)

Uploaded Source

Built Distribution

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

xrtm_forecast-0.2.1-py3-none-any.whl (124.5 kB view details)

Uploaded Python 3

File details

Details for the file xrtm_forecast-0.2.1.tar.gz.

File metadata

  • Download URL: xrtm_forecast-0.2.1.tar.gz
  • Upload date:
  • Size: 74.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xrtm_forecast-0.2.1.tar.gz
Algorithm Hash digest
SHA256 11405c4755ef0fce1805f4b158af7a839bbbc7055ded9a3dc794a576b3c3609c
MD5 5e8b9cd339555d67141ca113497accaa
BLAKE2b-256 1e3e5e84cd8a8157f01812471cca61f8fa7338b456c38193d30e4d0985e02e74

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrtm_forecast-0.2.1.tar.gz:

Publisher: publish.yml on xrtm-org/forecast

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

File details

Details for the file xrtm_forecast-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: xrtm_forecast-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 124.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xrtm_forecast-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56d9ef35549d0f992523ceeb244038bf1fc00bd6cc181cdc10746fa132856d0e
MD5 fb90d3fa3e65a42cdd25893d037ea609
BLAKE2b-256 58a270956f4a9aff6f5b9d3052762e09ec83ab01570136bc12e2cd2d41b591ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrtm_forecast-0.2.1-py3-none-any.whl:

Publisher: publish.yml on xrtm-org/forecast

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