← 返回
AI智能 中文

AIN - AI Node Plugin

Integrates AIN providers into OpenClaw with intelligent model routing and tools for prompt execution and task classification.
将AIN提供者集成到OpenClaw,实现智能模型路由、提示执行和任务分类工具。
felipematos
AI智能 clawhub v0.11.6 3 版本 99858.4 Key: 无需
★ 0
Stars
📥 705
下载
💾 13
安装
3
版本
#latest

概述

AIN — AI Node Plugin for OpenClaw

Bridges the AIN provider registry, intelligent routing engine, and execution layer into the OpenClaw ecosystem.

What it does

  • Provider bridging — All AIN-configured providers (LM Studio, Ollama, OpenAI, vLLM, etc.) are automatically exposed to OpenClaw as ain: providers
  • LLM tools — Two agent tools: ain_run (prompt execution with routing, structured output, fallback chains) and ain_classify (task type and complexity classification)
  • Routing hookbefore_model_resolve hook uses AIN's intelligent routing engine to automatically select the best model for each task based on policies and task classification

Installation

npm install openclaw-plugin-ain

Requires @felipematos/ain-cli (installed as a dependency).

Configuration

In your OpenClaw config:

{
  "plugins": {
    "ain": {
      "enableRouting": true,
      "routingPolicy": "local-first",
      "exposeTools": true
    }
  }
}

Options

OptionTypeDefaultDescription
------------------------------------
configPathstring~/.ain/config.yamlPath to AIN config file
enableRoutingbooleantrueEnable intelligent model routing
routingPolicystringNamed routing policy from AIN policies.yaml
exposeToolsbooleantrueExpose ain_run and ain_classify tools to agents

Tools

ain_run

Execute an LLM prompt through AIN's execution engine with full support for routing, structured output, and fallback chains.

Parameters:

  • prompt (string, required) — The prompt to execute
  • provider (string) — Provider name
  • model (string) — Model ID or alias
  • jsonMode (boolean) — Request JSON output
  • schema (object) — JSON Schema for output validation
  • system (string) — System prompt
  • temperature (number) — Sampling temperature

Returns: { output, provider, model, usage, parsedOutput }

ain_classify

Classify a prompt's task type and estimate its complexity.

Parameters:

  • prompt (string, required) — The prompt to classify

Returns: { taskType, complexity }

Task types: classification, extraction, generation, reasoning, unknown

Complexity: low, medium, high

Routing

When enableRouting is true, the plugin registers a before_model_resolve hook that analyzes incoming prompts and selects the optimal model based on:

  • Task classification (classification/extraction → fast tier, generation → general tier, reasoning → reasoning tier)
  • Routing policies defined in ~/.ain/policies.yaml
  • Model tags and tier configuration

Requirements

  • Node.js >= 18
  • AIN configured with at least one provider (ain config init && ain providers add ...)
  • OpenClaw >= 1.0.0

License

MIT

版本历史

共 3 个版本

  • v0.11.6 当前
    2026-05-03 04:04 安全 安全
  • v0.11.2
    2026-03-29 18:14
  • v0.9.12
    2026-03-19 12:43

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,813
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 836 📥 213,113
security-compliance

Max Auth

felipematos
用于 OpenClaw 敏感操作的安全认证网关。部署本地 Node.js 认证服务器,支持生物识别通行密钥(WebAuthn/Touch ID/Face ID)和主密钥。
★ 1 📥 799