Hydra Uandai

Data & APIs

Hydra/Uandai platform — configure API access, package OpenClaw workspace zip, upload agents, list subscriptions, invoke runs.

Install

openclaw skills install hydra-uandai

Hydra / Uandai (packaging + programmatic API)

Use this skill for all Hydra/Uandai automation: first-time setup, workspace packaging, upload, subscriptions, and invocation.

First-time setup (chat → persist)

When the user sends a configure Hydra message with settings, or env vars are missing:

  1. Parse from the user message (setup-only; do not repeat key in later work prompts):
    • HYDRA_API_ORIGIN — API host without /api (e.g. https://api.uandai.ai or http://127.0.0.1:8000)
    • HYDRA_API_BASE_URL — API prefix with /api (e.g. https://api.uandai.ai/api)
    • HYDRA_API_KEY — full hyd_live_… from hydra-app → Settings → API Keys
  2. Ensure this skill is installed under ~/.openclaw/skills/hydra-uandai/ or <workspace>/skills/hydra-uandai/.
  3. Merge into ~/.openclaw/openclaw.json under skills.entries["hydra-uandai"]:
{
  skills: {
    entries: {
      "hydra-uandai": {
        enabled: true,
        apiKey: "hyd_live_…",
        env: {
          HYDRA_API_KEY: "hyd_live_…",
          HYDRA_API_BASE_URL: "https://api.uandai.ai/api",
          HYDRA_API_ORIGIN: "https://api.uandai.ai",
        },
      },
    },
  },
}
  1. Do not echo the full API key back. Tell the user to run /new or restart the gateway.
  2. Optional smoke test: exchange → GET /v1/auth/me.

Security: Prefer a private OpenClaw session for setup messages that contain the key. After setup, operational prompts need no key and no doc URLs.

Before any Hydra action

web_fetch the canonical guides (prefer live content over this file):

  • {HYDRA_API_ORIGIN}/docs/openclaw-skills — install and prompt reference
  • {HYDRA_API_ORIGIN}/docs/agent-packaging
  • {HYDRA_API_ORIGIN}/docs/programmatic-api

Default prod origin: https://api.uandai.ai

Packaging (OpenClaw workspace → zip)

Stable rules (full steps in packaging guide):

  1. Never zip the live workspace root directly
  2. Staging: copy to output/<agent>-workspace/ with exclusions → validate → zip staging contents only
  3. Output: output/<agent-name>-workspace.zip
  4. Hydra zip layout:
    • Personality files (SOUL.md, IDENTITY.md, …) at zip root
    • No extra parent wrapper folder in the archive
    • SKILL.md only at skills/<id>/SKILL.md, workspace/skills/<id>/SKILL.md, or zip root
    • Exclude node_modules/, .env, logs/, memory/, .openclaw/, output/, hydra-uandai/ — max 50MB
  5. Do not include this skill in the upload zip. Install it on the trainer machine (~/.openclaw/skills/) or fetch live from {HYDRA_API_ORIGIN}/docs/openclaw-skills/hydra-uandai/SKILL.md. A copy under <workspace>/skills/hydra-uandai/ is for local dev only — exclude it when packaging.
  6. Report: 📍 Path: MEDIA:<path-to-zip>

Common failures: personality only under workspace/; nested wrapper folder; misplaced skill/SKILL.md; hydra-uandai/ in zip (openclaw_bundle_platform_skill).

API authentication (exchange required)

Raw API keys work only on exchange:

POST /v1/auth/token
Authorization: Bearer $HYDRA_API_KEY

Alternative on exchange only: X-Hydra-Api-Key or JSON { "api_key": "…" }.

Response: { "access_token", "refresh_token", "user" } — cache in session memory.

All other calls: Authorization: Bearer <access_token>

On access expiry: POST /v1/auth/refresh. On refresh 401: re-exchange if key still active; else user creates a new key in Settings.

Do not send $HYDRA_API_KEY on upload, invoke, or list endpoints.

Workflows

Trainer — publish end-to-end: setup (if needed) → web_fetch guides → package zip → exchange → POST /v1/agents/upload → return agent.id and agent.revision_no → optional POST /agents/{id}/proposals

Trainer — upload only: exchange → POST /v1/agents/upload with multipart: bundle (zip) + agent_name + description + subscription_price + default_model_identifier + provider config_data_type_json / test_values_json (see programmatic-api guide; Ollama needs OLLAMA_KEY + OLLAMA_URL)

Subscriber — discover: exchange → GET /v1/me/subscriptionsGET /v1/me/activations?invokable_only=true

Subscriber — invoke: exchange → POST /v1/executions → poll GET /v1/executions/{run_id} until terminal

Safety

  • Never log or echo the full API key
  • On 401: refresh → re-exchange → key may be revoked
  • On 402: user needs credits
  • API keys cannot create/revoke other keys (Settings / password JWT only)