
algo-host
Validate a generated strategy and produce an upload guide for OpenAlgo's /python self-hosted strategy page. Confirms env-var reads, SIGTERM, stdout-only logging.
- Installs
- 41
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/marketcalls/openalgo-execution-skills --skill algo-host- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads algo-host automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Prepare a strategy for upload to OpenAlgo's /python strategy host.
Arguments
$0= strategy name (e.g.ema_crossover_SBIN) OR full path to a.pyfile- Special:
--listlists deployable strategies instrategies/and their validation status
If $0 is a folder name, the file is strategies/<name>/strategy.py. If it's already a path, use as-is.
Instructions
- Read
algo-expert/rules/self-hosted-strategies.md. - Read the strategy file.
- Validate these criteria (each can be inferred via grep):
| Check | What to look for |
|---|---|
| SIGTERM handler | signal.signal(signal.SIGTERM, ...) present |
| SIGINT handler | signal.signal(signal.SIGINT, ...) present |
| stop_event used | threading.Event() and stop_event.set() |
| HOST_SERVER priority | os.getenv("HOST_SERVER") or os.getenv("OPENALGO_HOST", pattern |
| Reads STRATEGY_EXCHANGE | os.getenv("OPENALGO_STRATEGY_EXCHANGE", pattern |
| stdout logging | stream=sys.stdout in basicConfig; no FileHandler calls |
| Strategy entry guard | if __name__ == "__main__": |
| Mode dispatcher | --mode argparse with default=os.getenv("MODE", "live") |
| No hardcoded local paths | /home/, C:\\Users, /Users/ not present |
| Env tag for STRATEGY_NAME | os.getenv("STRATEGY_NAME", pattern |
-
Print a validation report:
Validation: strategies/ema_crossover_SBIN/strategy.py [PASS] SIGTERM handler installed (line 327) [PASS] HOST_SERVER priority correct [PASS] Reads OPENALGO_STRATEGY_EXCHANGE [PASS] stdout-only logging [PASS] Mode dispatcher honors env MODE [WARN] No state.db persistence detected (optional) [PASS] No hardcoded local paths ALL REQUIRED CHECKS PASSED -
Generate
HOST_UPLOAD.mdin the same folder with the exact form values to enter athttp://localhost:5000/python:
# Upload Guide: <strategy_name>
## On http://localhost:5000/python
### Step 1: Click "Add Strategy"
| Form field | Value |
|---|---|
| Name | <strategy_name> |
| File | <full path to strategy.py> |
| Exchange | <SYMBOL's exchange, e.g. NSE> |
### Step 2: Parameters (key=value, one per row)
| Key | Value | Purpose |
|---|---|---|
| MODE | live | live execution (sandbox/real per UI analyzer toggle) |
| SYMBOL | <SYMBOL> | trading symbol |
| INTERVAL | <INTERVAL> | bar interval |
| LOG_LEVEL | INFO | logging verbosity |
### Step 3: Schedule
| Field | Value |
|---|---|
| Start time | 09:15 IST |
| Stop time | 15:30 IST (or leave empty for indefinite) |
| Days | Mon, Tue, Wed, Thu, Fri (weekdays for NSE) |
For MCX strategies use `EXCHANGE=MCX` and start time `17:00`.
For CRYPTO use `EXCHANGE=CRYPTO` and check all 7 days.
### Step 4: Click Upload, then Start
The host launches the strategy in a subprocess. Logs go to `openalgo/logs/strategies/<id>_<timestamp>.log`.
To stop the strategy gracefully, click Stop in the UI - the host sends SIGTERM and waits up to 15s for clean shutdown.
## Notes
- Live vs sandbox is decided by OpenAlgo UI's analyzer toggle, not by this strategy
- Re-upload anytime; the host preserves STRATEGY_ID
- The exchange you pick drives the calendar gating; intersect with start-stop
- If
--list, liststrategies/subfolders, validate each, print a summary table.
When validation FAILs
Print the specific lines that need fixing:
[FAIL] HOST_SERVER priority: line 38 reads OPENALGO_HOST first.
Change:
API_HOST = os.getenv("OPENALGO_HOST", "http://127.0.0.1:5000")
To:
API_HOST = os.getenv("HOST_SERVER") or os.getenv("OPENALGO_HOST", "http://127.0.0.1:5000")
Offer to make the fix automatically (use Edit tool).
Reset state
If the user asks to reset a strategy's persistent state before re-upload, suggest:
rm strategies/<name>/state.db
Or, if no state.db exists, no action needed.
Avoid
- Do not auto-upload via API - the
/pythonpage is a UI form, not an API endpoint - Do not modify the strategy's logic, only the host-compatibility plumbing
- Do not use icons/emojis
FAQ
What does the algo-host skill do?
Validate a generated strategy and produce an upload guide for OpenAlgo's /python self-hosted strategy page. Confirms env-var reads, SIGTERM, stdout-only logging.
How do I install algo-host?
Run npx skills add https://github.com/marketcalls/openalgo-execution-skills --skill algo-host in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/algo-host/ (personal) or .claude/skills/algo-host/ (project).
Which AI agents can use algo-host?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is algo-host safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains algo-host?
It is published by marketcalls in marketcalls/openalgo-execution-skills. It has 41 recorded installs.
More from marketcalls/openalgo-execution-skills
algo-strategy
marketcalls/openalgo-execution-skills
Generate a single-file dual-mode trading strategy. Asks for indicator library and execution type. The same file runs --mode backtest (VectorBT) and --mode live (OpenAlgo). Upload-ready for OpenAlgo /python self-hosted.
algo-options
marketcalls/openalgo-execution-skills
Generate options-only execution strategies (short straddle, iron condor). Backtest mode is intentionally disabled. Live mode uses optionsmultiorder + per-leg SL.
algo-risk-test
marketcalls/openalgo-execution-skills
Verify a strategy's SL / TP / trailing stop / portfolio caps fire correctly. Uses OpenAlgo sandbox + synthetic price moves. Run this before going live.
algo-expert
marketcalls/openalgo-execution-skills
OpenAlgo execution expert. Auto-loaded knowledge base for building algorithmic trading strategies that toggle between VectorBT backtest and OpenAlgo live execution. Triggers when user mentions OpenAlgo trading strategies, dual-mode strategies, /python self-hosted strategies, options execution (short straddle, iron condor), portfolio risk caps, or live execution with stop loss / target / trailing stop / risk management.
algo-setup
marketcalls/openalgo-execution-skills
Set up the Python environment for OpenAlgo execution skills - venv, openalgo[indicators], vectorbt, talib, scikit-learn, xgboost. Scaffolds strategies/ folder and .env.
algo-portfolio
marketcalls/openalgo-execution-skills
Run multiple strategies under one supervisor with portfolio-level risk caps (portfolio SL/TP, daily PnL limits, max concurrent positions). YAML-driven.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.