← 返回
未分类 Key 中文

Ainative Agent Framework

Build multi-agent systems and swarms on AINative. Use when (1) Orchestrating multiple specialized AI agents, (2) Dispatching tasks to OpenClaw agents (aurora...
在 AINative 上构建多智能体系统和蜂群。适用于(1)编排多个专业化 AI 智能体,(2)向 OpenClaw 智能体(aurora...)分发任务。
urbantech urbantech 来源
未分类 clawhub v1.0.0 1 版本 99690.4 Key: 需要
★ 0
Stars
📥 322
下载
💾 1
安装
1
版本
#latest

概述

AINative Agent Framework

OpenClaw Agent Swarm

AINative uses OpenClaw as its local agent gateway. 9 specialized agents are available:

AgentIDSpecialty
-----------------------
MainmainOrchestration, routing, default
Atlas RedwoodatlasInfrastructure & deployment
Lyra Chen-SatolyraFrontend & UI
Sage OkaforsageBackend & APIs
Vega MartinezvegaData & analytics
Nova SinclairnovaSecurity & auth
Luma HarringtonlumaDocumentation
Helios MercerheliosPerformance & optimization
Aurora ValeauroraTesting & QA

Dispatch Tasks via CLI

# Route to best agent automatically
openclaw agent --agent main --message "Review the auth endpoint for SQL injection"

# Target a specific agent
openclaw agent --agent aurora --message "Write tests for the billing module"
openclaw agent --agent sage --message "Add rate limiting to the credits endpoint"
openclaw agent --agent nova --message "Audit API key storage for security issues"
openclaw agent --agent atlas --message "Check Railway deploy logs for errors"

Dispatch via Cody Script

# Status check
python3 scripts/cody_openclaw.py status
python3 scripts/cody_openclaw.py agents

# Dispatch a task
python3 scripts/cody_openclaw.py dispatch --agent aurora --task "Run test suite for billing module"
python3 scripts/cody_openclaw.py dispatch --agent sage --task "Implement POST /api/v1/echo/register"

# Send a direct message
python3 scripts/cody_openclaw.py message --agent main --message "What is the current test coverage?"

ACP (Agent Communication Protocol)

# Connect to ACP session directly
openclaw acp --session agent:main:main --token YOUR_GATEWAY_TOKEN

# Via cody script
python3 scripts/cody_openclaw.py acp --session agent:main:main

Python Agent Pattern

Build your own agent that calls AINative APIs:

import requests

class AINativeAgent:
    def __init__(self, api_key: str, system_prompt: str):
        self.api_key = api_key
        self.system_prompt = system_prompt
        self.messages = []

    def think(self, user_input: str) -> str:
        self.messages.append({"role": "user", "content": user_input})

        resp = requests.post(
            "https://api.ainative.studio/v1/public/chat/completions",
            headers={"X-API-Key": self.api_key},
            json={
                "model": "claude-3-5-sonnet-20241022",
                "messages": [
                    {"role": "system", "content": self.system_prompt},
                    *self.messages
                ],
                "max_tokens": 2048,
            }
        ).json()

        reply = resp["choices"][0]["message"]["content"]
        self.messages.append({"role": "assistant", "content": reply})
        return reply

    def remember(self, fact: str):
        """Persist something to ZeroMemory."""
        requests.post(
            "https://api.ainative.studio/api/v1/public/memory/v2/remember",
            headers={"X-API-Key": self.api_key},
            json={"content": fact, "memory_type": "episodic"}
        )

    def recall(self, query: str) -> list:
        """Retrieve relevant memories."""
        resp = requests.post(
            "https://api.ainative.studio/api/v1/public/memory/v2/recall",
            headers={"X-API-Key": self.api_key},
            json={"query": query, "limit": 5}
        ).json()
        return [m["content"] for m in resp.get("memories", [])]


# Usage
agent = AINativeAgent("ak_your_key", "You are a helpful coding assistant.")
response = agent.think("How do I implement rate limiting in FastAPI?")
agent.remember(f"User asked about rate limiting: {response[:100]}")

Multi-Agent Handoff Pattern

def route_task(task: str) -> str:
    """Route task to the right OpenClaw agent."""
    routing = {
        "test": "aurora",
        "security": "nova",
        "deploy": "atlas",
        "frontend": "lyra",
        "backend": "sage",
        "performance": "helios",
        "data": "vega",
        "docs": "luma",
    }

    for keyword, agent_id in routing.items():
        if keyword in task.lower():
            return agent_id
    return "main"

import subprocess

def dispatch(task: str):
    agent_id = route_task(task)
    subprocess.run(["openclaw", "agent", "--agent", agent_id, "--message", task])

RLHF Feedback

Collect feedback to improve agent quality:

# Via MCP tool
zerodb-rlhf-feedback
requests.post(
    "https://api.ainative.studio/api/v1/public/zerodb/rlhf/feedback",
    headers={"X-API-Key": "ak_your_key"},
    json={
        "session_id": "sess-123",
        "rating": 5,
        "feedback": "Agent correctly identified the SQL injection vector",
    }
)

Monitor Agent Swarm

# Real-time logs
python3 scripts/cody_openclaw.py logs --follow

# Status dashboard
openclaw status

References

  • scripts/cody_openclaw.py — Cody's OpenClaw control script
  • .claude/commands/openclaw-dispatch.md — /openclaw-dispatch command
  • .openclaw/openclaw.json — Local gateway configuration
  • src/backend/app/services/ — Backend agent services

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 11:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Ci Cd Compliance

urbantech
CI/CD 流水线需求和部署标准。适用于:(1) 设置 CI/CD 流水线,(2) 调试 CI 失败问题,(3) 配置部署工作流
★ 0 📥 554

Ainative Api Discovery

urbantech
帮助代理发现并导航 AINative 的 89+ API 端点。使用场景:(1) 询问"有哪些端点?",(2) 为任务寻找合适的API,(3) 查...
★ 0 📥 541

Code Quality

urbantech
编码风格标准、安全指南和可访问性要求。适用于(1)编写新代码,(2)审查代码的风格/安全性,(3)实现阶段。
★ 1 📥 3,399