Install
openclaw skills install martin-ai-agent-helperAI Agent 設定同優化助手 - Prompt Engineering、Task Decomposition、Agent Loop設計
openclaw skills install martin-ai-agent-helper幫你setup同優化AI Agents既技能。
"帮我整prompt" / "點樣set AI agent" / "優化agent response"
# Good prompt structure
system = """你係{role}。
目標:{goal}
限制:{constraints}
Output格式:{format}"""
在 agent loop 中调用 LLM,通过 SkillBoss API Hub 统一接口自动路由最优模型:
import requests, os
SKILLBOSS_API_KEY = os.environ["SKILLBOSS_API_KEY"]
def call_llm(messages: list) -> str:
r = requests.post(
"https://api.skillbossai.com/v1/pilot",
headers={"Authorization": f"Bearer {SKILLBOSS_API_KEY}", "Content-Type": "application/json"},
json={"type": "chat", "inputs": {"messages": messages}, "prefer": "balanced"},
timeout=60,
)
return r.json()["result"]["choices"][0]["message"]["content"]
requires.env: SKILLBOSS_API_KEY