SuperAPI AI Directory

huawei-cloud-openviking-agent-integration

Agents & models

View repository

Updated 10-15 22:15

About this skill

Huawei Cloud Agent Integration (OpenViking Long-Term Memory)

Integrate / unbind OpenViking long-term memory for coding agents running in bwrap sandboxes (/root/job-envs/sandboxes/). Every agent uses its native mechanism (MCP, HTTP memory provider, TS extension hooks, settings.json), so integration survives agent upgrades. Writes are template-level persistent: config is injected into /root/template/<agent>/start.sh, so sandbox stop + start preserves the integration.

Supported Agents

Agent Mechanism
CodeArts CLI @openviking/opencode-plugin → .codeartsdoer/
OpenCode @openviking/opencode-plugin (npm mirror → GitHub fallback)
OpenClaw clawhub:@openviking/openclaw-plugin + contextEngine slot (disables session-memory hook, denies memory_search)
Hermes Built-in memory.provider: openviking (HTTP REST, no MCP)
WorkSwarm Dual-channel: native provider + MCP (15 tools) + code-mode patch
KimiCode hooks + MCP (session lifecycle) — config.toml [[hooks]] → ov-kimi-hook.sh + MCP via mcp.json
DeepSeek Harness @openviking/dsh-memory-plugin bundle (on-demand from GitHub)
Prime Agent @openviking/pi-coding-agent-extension (on-demand from GitHub)

Per-agent config paths and details: references/agent-configs.md.

Prerequisites

  • OpenViking server healthy: curl -s http://127.0.0.1:1933/health → healthy.
  • Target sandbox exists under /root/job-envs/sandboxes/.
  • Host tools: curl, python3, bash; npm for OpenCode/OpenClaw; pip install --upgrade "mcp>=2.0" for verify_mcp.sh.
  • No Huawei Cloud IAM required — operates on local bwrap sandboxes only.

Parameters

Flag Required Meaning
--agent <name> Yes (unless --all) Target agent
--all Yes (unless --agent) Operate on all 8 agents
--endpoint <url> No OpenViking URL (default http://127.0.0.1:1933)
--api-key <key> No For auth-mode servers. Never echo in chat. Must be consumed by an agent config or verify_mcp.sh; an unconsumed --api-key is reported as a warning.
--dry-run No Show changes without applying
--yes / -y No Skip confirmation (automation only)
--json No status.sh: machine-readable output

Core Commands

Function Command
View status scripts/status.sh(--json / --agent <name>)
Verify MCP scripts/verify_mcp.sh
Integrate scripts/integrate.sh --agent <name> [--endpoint URL] [--dry-run] [--yes](or --all)
Unbind scripts/unbind.sh --agent <name> [--dry-run] [--yes](or --all)

Workflow

SKILL_DIR=/root/.agents/skills/huawei-cloud-openviking-agent-integration
$SKILL_DIR/scripts/status.sh          # per-agent: template+live / template only / live only / none
$SKILL_DIR/scripts/verify_mcp.sh      # full MCP handshake (initialize → tools/list → health)
$SKILL_DIR/scripts/integrate.sh --agent <name> [--yes]
$SKILL_DIR/scripts/unbind.sh  --agent <name> [--yes]
  1. Status first — never claim integrated before status.sh confirms (do not fabricate state).
  2. Verify MCP — verify_mcp.sh before integration.
  3. Integrate / Unbind — each requires explicit confirm (or --yes); --dry-run previews safely.
  4. States: template + live = active; template only = activates on restart; live only = lost on restart (warn user).

Authorization & Safety

  • integrate.sh / unbind.sh require explicit confirmation; never edit agent configs directly — go through the skill scripts.
  • Every config modification creates .bak.<timestamp> (keep 5) for rollback.
  • --api-key values must never appear in output.

Capability Boundaries (Cannot Do)

This skill only performs "OpenViking memory ↔ coding agent integration/unbinding/status/verification". The following operationsare explicitly not done, if encountered, please switch to the corresponding path or explicitly report an error:

  • Does not directly read or write agent configuration files, business data inside the sandbox, or user code—always through scripts/integrate.sh / unbind.sh and other entry points.
  • Does not delete or modify third-party packages/directories/data installed by the user. Uninstallation only cleans up OpenViking's own artifacts (@openviking/* plugins, injected configuration sections, OV-specific directories);node_modules Deleting entire directories and other out-of-scope behaviors are defects and will not be executed.
  • When the server is unreachable/health check failsdoes not report success:integrate.sh、unbind.sh、verify_mcp.sh always performs a health gate first; failure means failure (non-zero exit), never fake success.
  • --dry-run only previews changes and does not write any persistent files; after preview, subsequent real execution still requires confirmation.
  • --api-key must actually be consumed by some agent configuration or verification process; if passed in but consumed nowhere, the script will warn (rather than silently ignore).
  • Does not perform embedding model switching, vector database rebuilding, or server's own configuration changes—that is the scope of huawei-cloud-openviking-embedding-switch and other skills.
  • Does not support creating or modifying OpenViking accounts, users, or permission systems during integration/unbinding.
  • Does not promise "view → already integrated": always based on status.sh actual test results; guessing live status from templates is prohibited.

References

Document When to read
agent-configs.md Per-agent config paths/formats, MCP tools, server info
notes.md Guardrails, env vars, sandbox restart, plugin sources, troubleshooting, adding a new agent