astrai-inference-router
Route all LLM calls through Astrai for 40%+ cost savings with intelligent routing and privacy controls
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/beee003/astrai-inference-routerWhat This Skill Does
The Astrai Inference Router acts as an intelligent gateway for all your LLM operations within OpenClaw. By acting as a sophisticated middleware, it intercepts your LLM requests and dynamically routes them to the most cost-effective and performant provider available. Beyond mere routing, it provides a comprehensive suite of privacy and governance features, including automatic PII stripping, EU-only data residency enforcement, and granular budget controls. It uses Bayesian learning to analyze your specific task requirements—whether coding, research, or creative writing—to ensure you never overpay for performance you don't need.
Installation
To integrate the Astrai Inference Router into your workflow, execute the following command in your terminal:
clawhub install openclaw/skills/skills/beee003/astrai-inference-router
Once installed, obtain your API key from as-trai.com. Configure your environment by setting the ASTRAI_API_KEY variable. You can further customize your experience by setting PRIVACY_MODE to your desired level (standard, enhanced, or max) and DAILY_BUDGET to keep your infrastructure costs under control.
Use Cases
- Enterprise Cost Optimization: Automatically route high-volume internal agent tasks to cheaper, high-performance models while keeping complex logic on premium models.
- Data-Sensitive Environments: Use 'max' privacy mode to ensure that zero PII leaves your infrastructure, enabling compliance with strict internal data policies.
- Global Compliance: Force all LLM traffic through EU servers for GDPR compliance without needing to manage individual provider configurations.
- Resiliency Planning: Prevent agent downtime by leveraging the auto-failover mechanism, which instantly switches providers if your primary LLM endpoint suffers an outage.
Example Prompts
- "Route my upcoming technical documentation generation through the most cost-effective model that supports 128k context."
- "Update my Astrai configuration to max privacy mode and ensure all future requests are strictly routed through EU infrastructure."
- "Summarize my last 100 API calls and calculate the total savings compared to the standard OpenAI direct-billing rates."
Tips & Limitations
- Start with Enhanced: For most users, 'enhanced' mode provides the best balance of privacy and performance without limiting the utility of the LLM responses.
- Budget Monitoring: Use the
DAILY_BUDGETvariable to avoid unexpected spikes in usage. Remember that setting this to 0 removes the cap. - Regional Latency: If you enforce
REGION=eu, note that you may experience slight latency variations depending on your physical proximity to the designated data centers. - Monitoring: Frequently check your analytics dashboard at as-trai.com to refine your routing preferences based on the real-time cost-saving data provided.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-beee003-astrai-inference-router": {
"enabled": true,
"auto_update": true
}
}
}Tags
Flags: network-access, external-api
Related Skills
arc-shield
Output sanitization for agent responses - prevents accidental secret leaks
skill-routing-benchmark
测试多个 Skill 描述是否会路由冲突,并生成正例、反例与负向触发语句。;use for skills, routing, benchmark workflows;do not use for 只给模糊建议, 忽略高度相近的 skill.
sealvera
Tamper-evident audit trail for AI agent decisions. Use when logging LLM decisions, setting up AI compliance, auditing agents for EU AI Act, HIPAA, GDPR or SOC 2, or when a user asks about AI decision audit trails, explainability, or SealVera.
astrai-code-review
AI-powered code review with intelligent model routing — saves 40%+ vs always using the most expensive model
ghostshield
反同事蒸馏防护盾 - 保护你的代码风格,防止被 AI 精准蒸馏。 提供三级混淆模型:基础防护、深度混淆、极致隐匿。