1. APIキーを作成する
IteraCompute アカウントを作成するかサインインし、コンソールでキーを作成します。
IteraCompute アカウントを作成するかサインインし、コンソールでキーを作成します。
chat_completions を使う名前付きカスタムプロバイダーを設定します。Python AIAgent と CLI は別々のプロファイルを使います。
選択したモデルの正確な API モデル ID を使用してください。エージェントまたはビジョン機能を有効にする前に、そのコンテキストと機能を確認してください。
有料の DeepSeek V4.1 Flash 1017 を参考モデルにしています。キーで利用できる公開済みの会話モデルに変更できます。変更後は権限、料金、コンテキスト、ツール対応を確認してください。設定例は選択に追従しますが、保持されたテスト結果は Qwen のものです。
隔離した Hermes Agent v0.23.0 チェックアウトと HERMES_HOME を使います。起動ターミナルで ITERACOMPUTE_API_KEY を設定してください。
git clone --branch v0.23.0 --depth 1 \
https://github.com/NousResearch/hermes-agent.git hermes-agent-v0.23.0
cd hermes-agent-v0.23.0
test "$(git rev-parse HEAD)" = \
"2bd378ed1b8d6bf2192cb26e0a55ff3091e6bd19"
export HERMES_HOME="$PWD/.hermes-iteracompute-cli"
export HERMES_RUNTIME_DIR="$HERMES_HOME/tools"
umask 077
mkdir -p "$HERMES_HOME"
source ./activate
hermes --version
hermes pm doctorumask 077
read -rsp 'IteraCompute API key: ' ITERACOMPUTE_API_KEY
printf '\n'
export ITERACOMPUTE_API_KEYHermes CLI は未知のカスタムモデルに reasoning_effort=medium を追加することがあります。実際のリクエストを選択モデルのパラメーターと照合してください。下の reasoning_config={} は Python のコンストラクター引数であり、YAML 設定でも CLI 推論無効化の証明でもありません。
API キーをサーバー環境またはツール認証情報ストアに保管します。該当する場合は、サンプルのキー フィールドを独自のキーに置き換えます。
providers:
iteracompute:
api: https://api.iteracompute.com/v1
key_env: ITERACOMPUTE_API_KEY
transport: chat_completions
default_model: deepseek/deepseek-v4.1-flash-1017
context_length: 1048576
discover_models: false
extra_body:
max_tokens: 512
model:
provider: custom:iteracompute
default: deepseek/deepseek-v4.1-flash-1017
context_length: 1048576
streaming: false
agent:
max_turns: 3
api_max_retries: 0
auto_recovery_cycles: 0
fallback_providers: []
toolsets: [todo]
tools:
tool_search:
enabled: off
approvals:
mode: manual
compression:
enabled: false
auxiliary:
title_generation:
enabled: false
model_upgrade_enabled: false上で作成した隔離プロファイルだけに保存してください。Chat Completions の例は出力 512 tokens、フォールバックなしで開始します。コンテキストのメタデータはアカウントの利用権ではありません。OpenClaw は小さめの入力予算、Qwen は 128K のアカウント上限を使います。推論制御はモデルごとに異なり、Python と OpenClaw の reasoning: false は Qwen のみに追加します。
python3 - <<'PY'
import json
import os
import urllib.error
import urllib.request
payload = {
'model': 'deepseek/deepseek-v4.1-flash-1017',
'messages': [{'role': 'user', 'content': 'Reply with exactly: ITERACOMPUTE_API_OK'}],
'max_tokens': 512,
**{},
}
request = urllib.request.Request(
'https://api.iteracompute.com/v1/chat/completions',
data=json.dumps(payload).encode('utf-8'),
headers={'Authorization': 'Bearer ' + os.environ['ITERACOMPUTE_API_KEY'],
'Content-Type': 'application/json'}, method='POST',
)
try:
with urllib.request.urlopen(request, timeout=180) as response:
result = json.load(response)
except urllib.error.HTTPError as exc:
raise SystemExit(f'HTTP {exc.code}; inspect redacted details privately') from None
except (urllib.error.URLError, TimeoutError):
raise SystemExit('Network or timeout failure; no automatic retry') from None
choice = result['choices'][0]
if ((choice.get('message', {}).get('content') or '').strip() != 'ITERACOMPUTE_API_OK'
or choice.get('finish_reason') != 'stop'):
raise SystemExit('FAIL: expected final marker and stop reason not returned')
print('Direct API text passed; test the agent separately')
PY実行すると実際のリクエストを 1 回送信します。正確な可視マーカーと finish_reason=stop を確認し、空の HTTP 200 は未完了と扱います。有料モデルは API 残高を消費します。結果不明時に自動再試行しないでください。
hermes chat --oneshot --ignore-rules --toolsets todo --max-turns 2 \
--format stream-json \
-q 'Do not call tools. Reply with exactly: HERMES_ITERACOMPUTE_OK' \
> hermes-text.private.jsonl 2> hermes-text.private.stderrまず下の直接 API 検証を実行し、エージェントの空でない最終マーカー、指定 provider/model、正常終了を確認します。設定検証やプロバイダープローブだけではエージェントやツールのワークフローを証明できません。
上の CLI プロファイルは文書による参考設定です。Python 経路では、有効化したチェックアウト内に別の HERMES_HOME を作成し、次の config.yaml と iteracompute_agent_smoke.py を保存します。2 つのプロファイルを混ぜないでください。
export HERMES_HOME="$PWD/.hermes-iteracompute-python"
mkdir -p "$HERMES_HOME"model:
provider: custom
default: deepseek/deepseek-v4.1-flash-1017
base_url: https://api.iteracompute.com/v1
streaming: false
providers:
custom:
request_timeout_seconds: 240
stale_timeout_seconds: 240
tools:
tool_search:
enabled: off
agent:
api_max_retries: 0
auto_recovery_cycles: 0
fallback_providers: []
compression:
enabled: false
auxiliary:
title_generation:
enabled: false
model_upgrade_enabled: falseimport os
from run_agent import AIAgent
agent = AIAgent(
provider="custom",
api_mode="chat_completions",
base_url="https://api.iteracompute.com/v1",
api_key=os.environ["ITERACOMPUTE_API_KEY"],
model="deepseek/deepseek-v4.1-flash-1017",
enabled_toolsets=["todo"],
max_iterations=3,
max_tokens=512,
run_budget_seconds=600,
reasoning_config={},
request_overrides={"extra_body": {}},
skip_context_files=True,
skip_memory=True,
skip_background_review=True,
load_soul_identity=False,
save_trajectories=False,
quiet_mode=True,
fallback_model={},
)
try:
result = agent.run_conversation(
"Call todo_list exactly once to write one item with id smoke-1, "
"content API smoke test, and status completed. Then read the tool result "
"and reply with exactly HERMES_ITERACOMPUTE_TOOL_OK. Do not use other tools."
)
if not (result.get("completed") is True and
(result.get("final_response") or "").strip() == "HERMES_ITERACOMPUTE_TOOL_OK"):
raise SystemExit("FAIL: inspect redacted details privately")
print("Final marker passed; verify actual todo_list events separately")
finally:
agent.close()python iteracompute_agent_smoke.py成功基準:実際の todo_list 呼び出し、完了した smoke-1 項目、ツール結果の返却、最終応答 HERMES_ITERACOMPUTE_TOOL_OK を確認します。スクリプトは最終マーカーだけを確認するため、ツールイベントは別途調べます。反復 3 回と設定上の再試行ゼロは、厳密な HTTP リクエスト数や費用の上限ではありません。
モデル API はリモートで動作し、ローカル GPU や公開 Gateway ポートは不要です。エージェントにはローカル CPU、メモリ、権限が必要です。キーは起動プロセス環境に保持し、生ログは非公開にし、テストに必要なツールだけ有効にします。外部サービスの設定や料金は別です。
# Bash / zsh / WSL; set ITERACOMPUTE_API_KEY in your environment first.
curl --fail-with-body https://api.iteracompute.com/v1/chat/completions \
-H "Authorization: Bearer $ITERACOMPUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek/deepseek-v4.1-flash-1017","messages":[{"role":"user","content":"Reply with exactly: Hello!"}],"max_tokens":512}'choices[0].message.content に表示されるテキストが含まれていることを確認します。HTTP 200 だけでは不十分です。推論により出力バジェットが消費される可能性があります。無料のQwenを使用するには、 初めての無料API呼び出しの例 思考を無効にするには、ツール内でプロンプトを送信します。
機能は IteraCompute API の対応状況を示します。ワークフローでの利用可否はツールと設定にも依存し、推論の制御方法はモデルによって異なります。
起動プロセスのキー、モデル権限、有料残高を確認します。Base URL の /v1 は一度だけ含めます。API には元の Model ID を送信し、iteracompute/ 接頭辞は OpenClaw 内のルーティングだけに使います。
モデル固有の推論パラメーター、出力予算、アカウント制限を確認し、Retry-After に従います。異なる推論形式の併用、HTTP 200 だけでの成功判定、別の有料モデルへの自動切り替えは避けます。
Hermes:todo テストでは tool_search を無効にし、Python と CLI のプロファイルを分離します。OpenClaw:ツールテストでは deny-all を read のみに置き換えます。このカスタム設定に --isolated や --auth-env-only を使わないでください。