Institutional-grade modular engine for generative forecasting and agentic reasoning.
Project description
xrtm-forecast
Professional engine for generative forecasting and agentic reasoning
xrtm-forecast acts as the rigorous backbone for state-of-the-art agentic workflows, bridging the gap between rapid prototyping and mission-critical deployment.
It centralizes the "Reasoning Graph" definition so that agent behaviors are deterministic and auditable. forecast is the pivot across the ecosystem: if a provider is supported, it can be plugged into any agent topology (Orchestrator, Debate, Consensus) without changing business logic.
We pledge to uphold research-grade transparency: strict typing, zero-tolerance verification, and rigorous double-trace auditability for every decision made by an AI.
Installation
Standard Installation (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
Quickstart
Get started with xrtm-forecast right away with the Analyst API. The Analyst is a high-level reasoning class that supports research, search, and probability estimation.
from xrtm.forecast import AsyncRuntime, create_forecasting_analyst
async def main():
# 1. Instantiate the analyst (API keys injected from env)
agent = create_forecasting_analyst(model_id="gemini")
# 2. Execute reasoning loop
result = await agent.run(
"Will a general-purpose AI (AGI) be publicly announced before 2030?"
)
# 3. Inspect the rigorous output
print(f"Confidence: {result.confidence}")
print(f"Reasoning: {result.reasoning}")
if __name__ == "__main__":
# The AsyncRuntime ensures uvloop is used (if available)
# and provides a consistent entrypoint for the platform.
AsyncRuntime.run_main(main())
Roadmap
To understand our vision for "Institutional Grade" forecasting, including our focus on Time Travel (Chronos), Calibration, and Dynamic Trajectories (Sentinel), please read our Strategic Roadmap.
Key Features
- Institutional Sovereignty:
- Merkle Reasoning: Every state transition is anchored via SHA-256 Merkle proofs.
- .xrtm Manifests: Portable bundles containing full reasoning traces, telemetry, and hashes.
- Source Epistemics: Automated
IntegrityGuardianfor domain-level trust evaluation.
- Institutional Grade Physics:
- Chronos Protocol: Time-travel safe backtesting with instant-sleep acceleration.
- Sentinel Protocol: Forecast trajectories to track probability evolution.
- Calibration: Native
PlattScaler,BetaScaler, and Brier Score decomposition. - Inverse Variance Weighting (IVW): Uncertainty-aware consensus for multi-agent aggregation.
- Advanced Reasoning:
- Recursive Consensus: Peer-review topology that loops until confidence threshold is met.
- Fact-Checking: Dedicated
FactCheckerAgentto verify claims against external tools. - Orchestrator: Async graph engine with conditional edge support.
- Safety & Compliance:
- Async Runtime: Managed event loop facade.
- Provider Interface: Swap out OpenAI for Anthropic, Gemini, or vLLM with zero code changes.
- Sovereign Memory: Abstracted vector storage (ChromaDB) for RAG pipelines.
Why should I use xrtm-forecast?
-
Temporal Integrity (The Time Machine):
- Most agent frameworks leak future data during backtests.
xrtm-forecasthas a Temporal Sandboxing engine that rigidly enforces cut-off dates for search and memory. - Verify your strategies against past events with zero look-ahead bias.
- Most agent frameworks leak future data during backtests.
-
Probabilistic Rigor:
- Agents are treated as calibrated instruments, not just chatbots. We support native Brier Score calculation, Reliability Diagrams, and Confidence Interval estimation out of the box.
-
Double-Trace Auditability:
- Forecasting requires accountability. We provide a dual-layer audit trail: Structural (OTel traces of execution flow) and Logical (reasoning snapshots) for every prediction.
-
Dynamic Trajectories (Sentinel Protocol):
- Move beyond static snapshots. Our architecture supports continuous forecasting, allowing agents to ingest streaming news and output probability updates over time without expensive re-runs.
-
Hybrid "Quant-Qual" Intelligence:
- Seamlessly mix fast statistical models (e.g., ARIMA, XGBoost) with slow, deliberative LLM Agents in the same graph.
- Orchestrate complex "Consensus" topologies where multiple agents debate to reduce variance.
-
Institutional-Grade Compliance:
- Built for environments where "Black Boxes" are forbidden.
- Every component is strictly typed, and our Managed Async Runtime ensures that background tasks are traceable, high-performance (uvloop), and time-travel safe (Chronos).
- See our Architecture Overview for a deep dive into Core ABCs and Agent topologies.
Why shouldn't I use xrtm-forecast?
- You need a generic "Chat with PDF" or "Customer Support" bot. We are hyper-focused on Forecasting and Research workflows.
- You want "magic" autoscaling or loose typing. We prioritize correctness, repeatability, and type-safety over ease of prototyping.
- You don't care about backtesting or time-travel debugging.
Example Components
xrtm-forecast comes with a comprehensive Kit of pre-built instruments. Expand the categories below to see examples.
Agents (Personas)
- Minimal Agent: The "Hello World" of reasoning.
- Forecasting Analyst: A specialized researcher for binary forecasting subjects.
- Fact Checker: An agent that verifies claims against tools.
- Adversary (Red Team): An agent trained to find flaws in arguments.
Topologies (Interaction Patterns)
- Debate: Two agents arguing for opposing sides before a judge.
- Consensus: Multiple agents varying in temperature converging on a decision.
- Orchestrator Basics: Building a custom state machine from scratch.
- Epistemic Security: Source trust scoring and automated filtering.
- Chronos Acceleration: Using virtual time to bypass real-world delays.
Capabilities (Skills)
- Discovery (Search): Automated information retrieval.
- Streaming: Real-time token streaming for UIs.
- Calibration: Adjusting confidence intervals to match reality.
- Trace Replay: Re-running a saved execution for debugging.
Development Environment
This project is configured with a production-grade Dev Container to ensure a consistent, reproducible environment across all machines (Mac, Linux, Windows/WSL).
Prerequisites
- Docker Desktop (running)
- VS Code with the Dev Containers extension
Getting Started
- Clone the repository:
git clone https://github.com/xrtm-org/forecast.git
- Open in VS Code:
code forecast - Reopen in Container:
- Click the "Reopen in Container" button in the notification popup.
- Or press
Cmd+Shift+P(orCtrl+Shift+P) and type "Dev Containers: Reopen in Container".
Features
- Zero Config: Python 3.12,
uvdependency manager, and all project tools are pre-installed. - Zsh Terminal: Enhanced shell with autosuggestions and syntax highlighting.
- Tooling:
ghCLI,ruff(linting),pytest(testing), andmypy(typing) are ready to use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xrtm_forecast-0.5.3.tar.gz.
File metadata
- Download URL: xrtm_forecast-0.5.3.tar.gz
- Upload date:
- Size: 121.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f7cd0e0f747ea6366b32581735b94aaa364eb0779eca1e5f5ee11798326dcad
|
|
| MD5 |
029554340718edea0c976bf8cdbef79d
|
|
| BLAKE2b-256 |
0a2eadcffa322c1fc75ff1ac8484ceb3b9c5e76fa6edbdb37a555deacb84ac8b
|
Provenance
The following attestation bundles were made for xrtm_forecast-0.5.3.tar.gz:
Publisher:
publish.yml on xrtm-org/forecast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrtm_forecast-0.5.3.tar.gz -
Subject digest:
6f7cd0e0f747ea6366b32581735b94aaa364eb0779eca1e5f5ee11798326dcad - Sigstore transparency entry: 854149915
- Sigstore integration time:
-
Permalink:
xrtm-org/forecast@05dc82578fa240cc0621e008fe702416af789612 -
Branch / Tag:
refs/tags/v0.5.3 - Owner: https://github.com/xrtm-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@05dc82578fa240cc0621e008fe702416af789612 -
Trigger Event:
release
-
Statement type:
File details
Details for the file xrtm_forecast-0.5.3-py3-none-any.whl.
File metadata
- Download URL: xrtm_forecast-0.5.3-py3-none-any.whl
- Upload date:
- Size: 200.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b179bb17096793b692a95b7f9b51a005ce63f0e35238f75d09266f564d5715f
|
|
| MD5 |
470a03a0bd7071e98649233666846216
|
|
| BLAKE2b-256 |
f65771b0e24245a00280c269c23585558f1228bcf2a822de96f7e4221a58bc2b
|
Provenance
The following attestation bundles were made for xrtm_forecast-0.5.3-py3-none-any.whl:
Publisher:
publish.yml on xrtm-org/forecast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrtm_forecast-0.5.3-py3-none-any.whl -
Subject digest:
1b179bb17096793b692a95b7f9b51a005ce63f0e35238f75d09266f564d5715f - Sigstore transparency entry: 854149920
- Sigstore integration time:
-
Permalink:
xrtm-org/forecast@05dc82578fa240cc0621e008fe702416af789612 -
Branch / Tag:
refs/tags/v0.5.3 - Owner: https://github.com/xrtm-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@05dc82578fa240cc0621e008fe702416af789612 -
Trigger Event:
release
-
Statement type: