{
  "schemaVersion": "1.0",
  "item": {
    "slug": "volcengine-tos-vectors-skills",
    "name": "volcengine-tos-vectors-skills",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/jneless/volcengine-tos-vectors-skills",
    "canonicalUrl": "https://clawhub.ai/jneless/volcengine-tos-vectors-skills",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/volcengine-tos-vectors-skills",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=volcengine-tos-vectors-skills",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "WORKFLOWS.md",
      "REFERENCE.md",
      "README.md",
      "SKILL.md",
      "scripts/search_vectors.py",
      "scripts/insert_vectors.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/volcengine-tos-vectors-skills"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/volcengine-tos-vectors-skills",
    "agentPageUrl": "https://openagent3.xyz/skills/volcengine-tos-vectors-skills/agent",
    "manifestUrl": "https://openagent3.xyz/skills/volcengine-tos-vectors-skills/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/volcengine-tos-vectors-skills/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "TOS Vectors Skill",
        "body": "Comprehensive skill for managing vector storage, indexing, and similarity search using the TOS Vectors service - a cloud-based vector database optimized for AI applications."
      },
      {
        "title": "Initialize Client",
        "body": "import os\nimport tos\n\n# Get credentials from environment\nak = os.getenv('TOS_ACCESS_KEY')\nsk = os.getenv('TOS_SECRET_KEY')\naccount_id = os.getenv('TOS_ACCOUNT_ID')\n\n# Configure endpoint and region\nendpoint = 'https://tosvectors-cn-beijing.volces.com'\nregion = 'cn-beijing'\n\n# Create client\nclient = tos.VectorClient(ak, sk, endpoint, region)"
      },
      {
        "title": "Basic Workflow",
        "body": "# 1. Create vector bucket (like a database)\nclient.create_vector_bucket('my-vectors')\n\n# 2. Create vector index (like a table)\nclient.create_index(\n    account_id=account_id,\n    vector_bucket_name='my-vectors',\n    index_name='embeddings-768d',\n    data_type=tos.DataType.DataTypeFloat32,\n    dimension=768,\n    distance_metric=tos.DistanceMetricType.DistanceMetricCosine\n)\n\n# 3. Insert vectors\nvectors = [\n    tos.models2.Vector(\n        key='doc-1',\n        data=tos.models2.VectorData(float32=[0.1] * 768),\n        metadata={'title': 'Document 1', 'category': 'tech'}\n    )\n]\nclient.put_vectors(\n    vector_bucket_name='my-vectors',\n    account_id=account_id,\n    index_name='embeddings-768d',\n    vectors=vectors\n)\n\n# 4. Search similar vectors\nquery_vector = tos.models2.VectorData(float32=[0.1] * 768)\nresults = client.query_vectors(\n    vector_bucket_name='my-vectors',\n    account_id=account_id,\n    index_name='embeddings-768d',\n    query_vector=query_vector,\n    top_k=5,\n    return_distance=True,\n    return_metadata=True\n)"
      },
      {
        "title": "Vector Bucket Management",
        "body": "Create Bucket\n\nclient.create_vector_bucket(bucket_name)\n\nList Buckets\n\nresult = client.list_vector_buckets(max_results=100)\nfor bucket in result.vector_buckets:\n    print(bucket.vector_bucket_name)\n\nDelete Bucket (must be empty)\n\nclient.delete_vector_bucket(bucket_name, account_id)"
      },
      {
        "title": "Vector Index Management",
        "body": "Create Index\n\nclient.create_index(\n    account_id=account_id,\n    vector_bucket_name=bucket_name,\n    index_name='my-index',\n    data_type=tos.DataType.DataTypeFloat32,\n    dimension=128,\n    distance_metric=tos.DistanceMetricType.DistanceMetricCosine\n)\n\nList Indexes\n\nresult = client.list_indexes(bucket_name, account_id)\nfor index in result.indexes:\n    print(f\"{index.index_name}: {index.dimension}d\")"
      },
      {
        "title": "Vector Data Operations",
        "body": "Insert Vectors (batch up to 500)\n\nvectors = []\nfor i in range(100):\n    vector = tos.models2.Vector(\n        key=f'vec-{i}',\n        data=tos.models2.VectorData(float32=[...]),\n        metadata={'category': 'example'}\n    )\n    vectors.append(vector)\n\nclient.put_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    vectors=vectors\n)\n\nQuery Similar Vectors (KNN search)\n\nresults = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    query_vector=query_vector,\n    top_k=10,\n    filter={\"$and\": [{\"category\": \"tech\"}]},  # Optional metadata filter\n    return_distance=True,\n    return_metadata=True\n)\n\nfor vec in results.vectors:\n    print(f\"Key: {vec.key}, Distance: {vec.distance}\")\n\nGet Vectors by Keys\n\nresult = client.get_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    keys=['vec-1', 'vec-2'],\n    return_data=True,\n    return_metadata=True\n)\n\nDelete Vectors\n\nclient.delete_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    keys=['vec-1', 'vec-2']\n)"
      },
      {
        "title": "1. Semantic Search",
        "body": "Build a semantic search system for documents:\n\n# Index documents\nfor doc in documents:\n    embedding = get_embedding(doc.text)  # Your embedding model\n    vector = tos.models2.Vector(\n        key=doc.id,\n        data=tos.models2.VectorData(float32=embedding),\n        metadata={'title': doc.title, 'content': doc.text[:500]}\n    )\n    vectors.append(vector)\n\nclient.put_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    vectors=vectors\n)\n\n# Search\nquery_embedding = get_embedding(user_query)\nresults = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    query_vector=tos.models2.VectorData(float32=query_embedding),\n    top_k=5,\n    return_metadata=True\n)"
      },
      {
        "title": "2. RAG (Retrieval Augmented Generation)",
        "body": "Retrieve relevant context for LLM prompts:\n\n# Retrieve relevant documents\nquestion_embedding = get_embedding(user_question)\nsearch_results = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name='knowledge-base',\n    query_vector=tos.models2.VectorData(float32=question_embedding),\n    top_k=3,\n    return_metadata=True\n)\n\n# Build context\ncontext = \"\\n\\n\".join([\n    v.metadata.get('content', '') for v in search_results.vectors\n])\n\n# Generate answer with LLM\nprompt = f\"Context:\\n{context}\\n\\nQuestion: {user_question}\""
      },
      {
        "title": "3. Recommendation System",
        "body": "Find similar items based on user preferences:\n\n# Query with metadata filtering\nresults = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name='products',\n    query_vector=user_preference_vector,\n    top_k=10,\n    filter={\"$and\": [{\"category\": \"electronics\"}, {\"price_range\": \"mid\"}]},\n    return_metadata=True\n)"
      },
      {
        "title": "Naming Conventions",
        "body": "Bucket names: 3-32 chars, lowercase letters, numbers, hyphens only\nIndex names: 3-63 chars\nVector keys: 1-1024 chars, use meaningful identifiers"
      },
      {
        "title": "Batch Operations",
        "body": "Insert up to 500 vectors per call\nDelete up to 100 vectors per call\nUse pagination for listing operations"
      },
      {
        "title": "Error Handling",
        "body": "try:\n    result = client.create_vector_bucket(bucket_name)\nexcept tos.exceptions.TosClientError as e:\n    print(f'Client error: {e.message}')\nexcept tos.exceptions.TosServerError as e:\n    print(f'Server error: {e.code}, Request ID: {e.request_id}')"
      },
      {
        "title": "Performance Tips",
        "body": "Choose appropriate vector dimensions (balance accuracy vs performance)\nUse metadata filtering to reduce search space\nUse cosine similarity for normalized vectors\nUse Euclidean distance for absolute distances"
      },
      {
        "title": "Important Limits",
        "body": "Vector buckets: Max 100 per account\nVector dimensions: 1-4096\nBatch insert: 1-500 vectors per call\nBatch get/delete: 1-100 vectors per call\nQuery TopK: 1-30 results"
      },
      {
        "title": "Additional Resources",
        "body": "For detailed API reference, see REFERENCE.md\nFor complete workflows, see WORKFLOWS.md\nFor example scripts, see the scripts/ directory"
      }
    ],
    "body": "TOS Vectors Skill\n\nComprehensive skill for managing vector storage, indexing, and similarity search using the TOS Vectors service - a cloud-based vector database optimized for AI applications.\n\nQuick Start\nInitialize Client\nimport os\nimport tos\n\n# Get credentials from environment\nak = os.getenv('TOS_ACCESS_KEY')\nsk = os.getenv('TOS_SECRET_KEY')\naccount_id = os.getenv('TOS_ACCOUNT_ID')\n\n# Configure endpoint and region\nendpoint = 'https://tosvectors-cn-beijing.volces.com'\nregion = 'cn-beijing'\n\n# Create client\nclient = tos.VectorClient(ak, sk, endpoint, region)\n\nBasic Workflow\n# 1. Create vector bucket (like a database)\nclient.create_vector_bucket('my-vectors')\n\n# 2. Create vector index (like a table)\nclient.create_index(\n    account_id=account_id,\n    vector_bucket_name='my-vectors',\n    index_name='embeddings-768d',\n    data_type=tos.DataType.DataTypeFloat32,\n    dimension=768,\n    distance_metric=tos.DistanceMetricType.DistanceMetricCosine\n)\n\n# 3. Insert vectors\nvectors = [\n    tos.models2.Vector(\n        key='doc-1',\n        data=tos.models2.VectorData(float32=[0.1] * 768),\n        metadata={'title': 'Document 1', 'category': 'tech'}\n    )\n]\nclient.put_vectors(\n    vector_bucket_name='my-vectors',\n    account_id=account_id,\n    index_name='embeddings-768d',\n    vectors=vectors\n)\n\n# 4. Search similar vectors\nquery_vector = tos.models2.VectorData(float32=[0.1] * 768)\nresults = client.query_vectors(\n    vector_bucket_name='my-vectors',\n    account_id=account_id,\n    index_name='embeddings-768d',\n    query_vector=query_vector,\n    top_k=5,\n    return_distance=True,\n    return_metadata=True\n)\n\nCore Operations\nVector Bucket Management\n\nCreate Bucket\n\nclient.create_vector_bucket(bucket_name)\n\n\nList Buckets\n\nresult = client.list_vector_buckets(max_results=100)\nfor bucket in result.vector_buckets:\n    print(bucket.vector_bucket_name)\n\n\nDelete Bucket (must be empty)\n\nclient.delete_vector_bucket(bucket_name, account_id)\n\nVector Index Management\n\nCreate Index\n\nclient.create_index(\n    account_id=account_id,\n    vector_bucket_name=bucket_name,\n    index_name='my-index',\n    data_type=tos.DataType.DataTypeFloat32,\n    dimension=128,\n    distance_metric=tos.DistanceMetricType.DistanceMetricCosine\n)\n\n\nList Indexes\n\nresult = client.list_indexes(bucket_name, account_id)\nfor index in result.indexes:\n    print(f\"{index.index_name}: {index.dimension}d\")\n\nVector Data Operations\n\nInsert Vectors (batch up to 500)\n\nvectors = []\nfor i in range(100):\n    vector = tos.models2.Vector(\n        key=f'vec-{i}',\n        data=tos.models2.VectorData(float32=[...]),\n        metadata={'category': 'example'}\n    )\n    vectors.append(vector)\n\nclient.put_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    vectors=vectors\n)\n\n\nQuery Similar Vectors (KNN search)\n\nresults = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    query_vector=query_vector,\n    top_k=10,\n    filter={\"$and\": [{\"category\": \"tech\"}]},  # Optional metadata filter\n    return_distance=True,\n    return_metadata=True\n)\n\nfor vec in results.vectors:\n    print(f\"Key: {vec.key}, Distance: {vec.distance}\")\n\n\nGet Vectors by Keys\n\nresult = client.get_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    keys=['vec-1', 'vec-2'],\n    return_data=True,\n    return_metadata=True\n)\n\n\nDelete Vectors\n\nclient.delete_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    keys=['vec-1', 'vec-2']\n)\n\nCommon Use Cases\n1. Semantic Search\n\nBuild a semantic search system for documents:\n\n# Index documents\nfor doc in documents:\n    embedding = get_embedding(doc.text)  # Your embedding model\n    vector = tos.models2.Vector(\n        key=doc.id,\n        data=tos.models2.VectorData(float32=embedding),\n        metadata={'title': doc.title, 'content': doc.text[:500]}\n    )\n    vectors.append(vector)\n\nclient.put_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    vectors=vectors\n)\n\n# Search\nquery_embedding = get_embedding(user_query)\nresults = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name=index_name,\n    query_vector=tos.models2.VectorData(float32=query_embedding),\n    top_k=5,\n    return_metadata=True\n)\n\n2. RAG (Retrieval Augmented Generation)\n\nRetrieve relevant context for LLM prompts:\n\n# Retrieve relevant documents\nquestion_embedding = get_embedding(user_question)\nsearch_results = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name='knowledge-base',\n    query_vector=tos.models2.VectorData(float32=question_embedding),\n    top_k=3,\n    return_metadata=True\n)\n\n# Build context\ncontext = \"\\n\\n\".join([\n    v.metadata.get('content', '') for v in search_results.vectors\n])\n\n# Generate answer with LLM\nprompt = f\"Context:\\n{context}\\n\\nQuestion: {user_question}\"\n\n3. Recommendation System\n\nFind similar items based on user preferences:\n\n# Query with metadata filtering\nresults = client.query_vectors(\n    vector_bucket_name=bucket_name,\n    account_id=account_id,\n    index_name='products',\n    query_vector=user_preference_vector,\n    top_k=10,\n    filter={\"$and\": [{\"category\": \"electronics\"}, {\"price_range\": \"mid\"}]},\n    return_metadata=True\n)\n\nBest Practices\nNaming Conventions\nBucket names: 3-32 chars, lowercase letters, numbers, hyphens only\nIndex names: 3-63 chars\nVector keys: 1-1024 chars, use meaningful identifiers\nBatch Operations\nInsert up to 500 vectors per call\nDelete up to 100 vectors per call\nUse pagination for listing operations\nError Handling\ntry:\n    result = client.create_vector_bucket(bucket_name)\nexcept tos.exceptions.TosClientError as e:\n    print(f'Client error: {e.message}')\nexcept tos.exceptions.TosServerError as e:\n    print(f'Server error: {e.code}, Request ID: {e.request_id}')\n\nPerformance Tips\nChoose appropriate vector dimensions (balance accuracy vs performance)\nUse metadata filtering to reduce search space\nUse cosine similarity for normalized vectors\nUse Euclidean distance for absolute distances\nImportant Limits\nVector buckets: Max 100 per account\nVector dimensions: 1-4096\nBatch insert: 1-500 vectors per call\nBatch get/delete: 1-100 vectors per call\nQuery TopK: 1-30 results\nAdditional Resources\n\nFor detailed API reference, see REFERENCE.md For complete workflows, see WORKFLOWS.md For example scripts, see the scripts/ directory"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/jneless/volcengine-tos-vectors-skills",
    "publisherUrl": "https://clawhub.ai/jneless/volcengine-tos-vectors-skills",
    "owner": "jneless",
    "version": "1.0.2",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/volcengine-tos-vectors-skills",
    "downloadUrl": "https://openagent3.xyz/downloads/volcengine-tos-vectors-skills",
    "agentUrl": "https://openagent3.xyz/skills/volcengine-tos-vectors-skills/agent",
    "manifestUrl": "https://openagent3.xyz/skills/volcengine-tos-vectors-skills/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/volcengine-tos-vectors-skills/agent.md"
  }
}