← Back to Skills Marketplace
beee003

Astrai Inference Router

by beee003 · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
776
Downloads
2
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install astrai-inference-router
Description
Route all LLM calls through Astrai for 40%+ cost savings with intelligent routing and privacy controls
README (SKILL.md)

Astrai Inference Router

Route every LLM call through Astrai's intelligent router. Save 40%+ on API costs. Privacy controls built in.

What it does

  • Smart routing: Classifies each task (code, research, chat, creative) and picks the optimal model
  • Cost savings: Bayesian learning finds the cheapest provider that meets your quality threshold
  • Auto-failover: Circuit breaker switches providers when one goes down
  • PII protection: Personally identifiable information stripped before reaching any provider
  • EU routing: GDPR-compliant European-only routing with one setting
  • Budget caps: Set daily spend limits to prevent runaway costs
  • Real-time tracking: See exactly how much you're saving per request

Setup

  1. Get a free API key at as-trai.com
  2. Set ASTRAI_API_KEY in your environment or skill config
  3. Choose your privacy mode (default: enhanced)
  4. Done — all LLM calls now route through Astrai

Privacy Modes

  • standard: Full routing intelligence, normal logging
  • enhanced: PII stripped, metadata-only logging, region enforced
  • max: Zero data retention, EU-only, all PII stripped, no prompt logging

Environment Variables

Variable Required Description Default
ASTRAI_API_KEY Yes Your API key from as-trai.com
PRIVACY_MODE No standard, enhanced, max enhanced
REGION No any, eu, us any
DAILY_BUDGET No Max daily spend in USD (0 = unlimited) 10

External Endpoints

Endpoint Purpose Data Sent
https://as-trai.com/v1/chat/completions LLM inference routing Prompts (with PII stripped if enhanced/max mode)
https://as-trai.com/v1/signup Free API key registration Email address

Security & Privacy

  • All requests authenticated via API key in Authorization header
  • PII stripping runs locally before any data leaves your machine (enhanced/max modes)
  • EU routing mode ensures prompts never leave European infrastructure
  • Zero data retention available in max privacy mode
  • No credentials are stored by the skill — only your API key in environment variables
  • Source code is fully open: github.com/beee003/astrai-openclaw

Model Invocation

This skill intercepts outgoing LLM API calls and reroutes them through the Astrai gateway. The gateway selects the optimal provider and model based on task type, cost, and quality. Your prompts are processed by third-party LLM providers (Anthropic, OpenAI, Google, Mistral, etc.) according to your region and privacy settings.

Pricing

  • Free: 1,000 requests/day, smart routing, failover
  • Pro ($49/mo): Unlimited requests, EU routing, PII stripping, analytics
  • Business ($199/mo): Multi-agent dashboards, compliance exports, SLA
Usage Guidance
Do not install or provide provider API keys until these contradictions are resolved. Specifically: (1) Ask the author to explain and document whether provider API keys are transmitted to Astrai and why — X-Astrai-Provider-Keys in plugin.py clearly sends them. If you want BYOK, keys must never be uploaded. (2) Ask for a concrete implementation (and tests) of the claimed local PII stripping; the current code does not perform any redaction. (3) Clarify why the registry requires ANTHROPIC_API_KEY when the plugin accepts any provider key — this mismatch may lead to unnecessary key exposure. (4) If you must test, only set ASTRAI_API_KEY in a throwaway account and do not set real provider keys; audit network traffic to confirm what is transmitted. (5) Prefer installing only after reviewing the upstream repo and confirming a privacy policy and server-side handling (retention, storage of keys). Because this skill transmits other providers' keys and claims protections that are not implemented, treat it as potentially exposing credentials and sensitive prompts until those issues are corrected.
Capability Analysis
Type: OpenClaw Skill Name: astrai-inference-router Version: 1.0.1 The skill is suspicious due to its handling of sensitive API keys. It collects all user-provided LLM provider API keys (e.g., ANTHROPIC_API_KEY, OPENAI_API_KEY) from environment variables and transmits them in a `X-Astrai-Provider-Keys` header to the third-party service `https://as-trai.com` for every intercepted request, as seen in `plugin.py`. While the stated purpose is for Astrai to use these keys for intelligent routing on the user's behalf, this design choice sends highly sensitive credentials to an external endpoint, creating a significant supply chain risk if `as-trai.com` were compromised. The documentation in `SKILL.md` and `plugin.py` misleadingly claims 'Your provider API keys stay with you' and 'Zero risk of token drain', which downplays the actual security implications of transmitting these keys to a third party.
Capability Assessment
Purpose & Capability
The skill claims BYOK (you keep provider keys) and local PII stripping, but plugin.py packages and sends provider keys to Astrai in the X-Astrai-Provider-Keys header, which contradicts the 'tokens stay with you' claim. The registry also lists ANTHROPIC_API_KEY as required while the code only requires at least one provider key — requiring a specific provider key (Anthropic) in metadata is inconsistent with the code and description.
Instruction Scope
SKILL.md asserts PII is stripped locally (enhanced/max modes) and that zero retention/EU routing can be enforced locally, but the plugin's intercept_request does not perform any PII stripping, redaction, or local enforcement — it merely sets headers and base_url. The runtime instructions therefore promise behaviors not implemented in the code, giving the agent broad discretion but no implemented safeguards.
Install Mechanism
No install spec (instruction-only) and no remote download/install steps are present, so the skill does not perform an installation that writes or executes additional artifacts beyond its included plugin.py. This lowers supply-chain installation risk.
Credentials
The skill requests ASTRAI_API_KEY (expected) and the registry lists ANTHROPIC_API_KEY as required (not justified by the code). The plugin requires at least one provider key and then transmits any found provider keys to Astrai — sending sensitive API keys for multiple providers to a third party is a significant privacy/credential-exposure action that is not proportionate to the claimed local-BYOK semantics.
Persistence & Privilege
The skill does not request always:true, does not modify other skills or system settings, and stores no credentials itself (it reads env vars). There is no evidence it gains persistent elevated privileges on the host.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install astrai-inference-router
  3. After installation, invoke the skill by name or use /astrai-inference-router
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Add BYOK (Bring Your Own Keys) support — users provide their own provider API keys, pay providers directly. Zero token drain risk.
v1.0.0
Initial release: intelligent LLM routing for 40-60% cost savings with privacy controls and EU routing
Metadata
Slug astrai-inference-router
Version 1.0.1
License
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Astrai Inference Router?

Route all LLM calls through Astrai for 40%+ cost savings with intelligent routing and privacy controls. It is an AI Agent Skill for Claude Code / OpenClaw, with 776 downloads so far.

How do I install Astrai Inference Router?

Run "/install astrai-inference-router" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Astrai Inference Router free?

Yes, Astrai Inference Router is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Astrai Inference Router support?

Astrai Inference Router is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Astrai Inference Router?

It is built and maintained by beee003 (@beee003); the current version is v1.0.1.

💬 Comments