- Rust engine: real bootstrap/wiring preflight (guardrail-agent), execution layer (retry/router/pre-trade/post-trade/reconciliation), guardrail-doctor diagnostics with allowlist-drift guard. - guardrail-cli: extracted pure helpers into util.rs (split in progress). - 6 Track-2 skills + ensemble; python-lab analytics (regime/drawdown/montecarlo/dossier/ensemble/journal/seed); clients (ts/py/go/mcp/langchain/web-lite/proof-verifier); alert relay; scenarios; helm/k8s/compose; docs. - dashboard/vercel.json + docs/VERCEL_DEPLOY.md for Vercel deployment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
"""Start the Blockchain News Agent server with IPFS storage.
|
|
|
|
Usage (from examples/agent-server/):
|
|
uv run python scripts/run_agent.py
|
|
uv run python scripts/run_agent.py --env .env.qa
|
|
|
|
Storage:
|
|
Set STORAGE_PROVIDER=ipfs + STORAGE_API_KEY in .env to upload
|
|
deliverable manifests to Pinata IPFS on every job submit.
|
|
Defaults to local file storage if not configured.
|
|
"""
|
|
|
|
import argparse
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# ensure print() output is not buffered so the startup banner appears immediately
|
|
os.environ.setdefault("PYTHONUNBUFFERED", "1")
|
|
|
|
# src/ on the import path so "from service import app" works
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "src"))
|
|
|
|
import uvicorn
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--env", default=".env", help="env file name (relative to agent-server/)")
|
|
args = parser.parse_args()
|
|
|
|
# pass env file choice to service.py via env var before it loads dotenv
|
|
os.environ.setdefault("ENV_FILE", args.env)
|
|
|
|
from service import app, PORT
|
|
|
|
uvicorn.run(app, host="0.0.0.0", port=PORT)
|