[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77H6AQG2B1ZMVXPYCXYHFKR":3,"skill-same:01M77H6AQG2B1ZMVXPYCXYHFKR":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M77H6AQG2B1ZMVXPYCXYHFKR","gradient-knowledge-base",null,"Community skill (unofficial) for DigitalOcean Gradient Knowledge Bases. Build RAG pipelines: store documents in DO Spaces, configure data sources, manage indexing, and run semantic or hybrid search queries.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fg\u002Fgradient-knowledge-base\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gradient-knowledge-base\ndescription: >\n  Community skill (unofficial) for DigitalOcean Gradient Knowledge Bases.\n  Build RAG pipelines: store documents in DO Spaces, configure data sources,\n  manage indexing, and run semantic or hybrid search queries.\nfiles: [\"scripts\u002F*\"]\nhomepage: https:\u002F\u002Fgithub.com\u002FRogue-Iteration\u002FTheBigClaw\nmetadata:\n  clawdbot:\n    emoji: \"📚\"\n    primaryEnv: DO_API_TOKEN\n    requires:\n      env:\n        - DO_API_TOKEN\n        - DO_SPACES_ACCESS_KEY\n        - DO_SPACES_SECRET_KEY\n        - GRADIENT_API_KEY\n      bins:\n        - python3\n      pip:\n        - requests>=2.31.0\n        - boto3>=1.34.0\n  author: Rogue Iteration\n  version: \"0.1.4\"\n  tags: [\"digitalocean\", \"gradient-ai\", \"knowledge-base\", \"rag\", \"semantic-search\", \"do-spaces\"]\n---\n\n# 🦞 Gradient AI — Knowledge Bases & RAG\n\n> ⚠️ **This is an unofficial community skill**, not maintained by DigitalOcean. Use at your own risk.\n\n> *\"A lobster never forgets. Neither should your agent.\" — the KB lobster*\n\nBuild a [Retrieval-Augmented Generation](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fdetails\u002Ffeatures\u002F#retrieval-augmented-generation-rag) pipeline using DigitalOcean's Gradient Knowledge Bases. Store your documents in DO Spaces, index them into a managed Knowledge Base (backed by OpenSearch), and query them with semantic or hybrid search.\n\n## Architecture\n\n```\nYour Agent                   DigitalOcean\n┌─────────────┐     upload    ┌──────────────┐\n│  Documents  │ ──────────▶  │  DO Spaces   │\n└─────────────┘              │  (S3-compat) │\n                              └──────┬───────┘\n                                     │ auto-index\n                              ┌──────▼───────┐\n                              │ Knowledge    │\n                              │ Base (KBaaS) │\n                              │ ┌──────────┐ │\n                              │ │OpenSearch│ │\n                              │ └──────────┘ │\n                              └──────┬───────┘\n                                     │ retrieve\n┌─────────────┐     answer    ┌──────▼───────┐\n│  Your Agent │ ◀──────────  │  RAG Results │\n│  + LLM      │              │  + Citations │\n└─────────────┘              └──────────────┘\n```\n\n📖 *[Knowledge Base docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F)*\n\n## API Endpoints\n\nThis skill connects to three official DigitalOcean service endpoints:\n\n| Hostname | Purpose | Docs |\n|----------|---------|------|\n| `api.digitalocean.com` | KB management (create, list, delete, data sources) | [DO API Reference](https:\u002F\u002Fdocs.digitalocean.com\u002Freference\u002Fapi\u002F) |\n| `kbaas.do-ai.run` | KB retrieval — semantic\u002Fhybrid search queries | [KB Retrieval docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F) |\n| `inference.do-ai.run` | LLM chat completions for RAG synthesis | [Inference docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fuse-serverless-inference\u002F) |\n| `\u003Cregion>.digitaloceanspaces.com` | S3-compatible object storage | [Spaces docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fspaces\u002F) |\n\nAll endpoints are owned and operated by DigitalOcean. The `*.do-ai.run` hostnames are the Gradient AI Platform's service domains.\n\n## Authentication\n\nThis skill uses **two different credentials** — think of it as a two-claw approach:\n\n| Credential | Used For | Env Var |\n|------------|----------|---------|\n| DO API Token | KB management, indexing, queries | `DO_API_TOKEN` |\n| Gradient API Key | LLM inference for RAG synthesis | `GRADIENT_API_KEY` |\n| Spaces Keys | S3-compatible uploads | `DO_SPACES_ACCESS_KEY` + `DO_SPACES_SECRET_KEY` |\n\n> **Credential scoping:** Use minimally-scoped tokens. Create a dedicated [Model Access Key](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fmanage-access-keys\u002F) for `GRADIENT_API_KEY`. For `DO_API_TOKEN`, use a [scoped API token](https:\u002F\u002Fdocs.digitalocean.com\u002Freference\u002Fapi\u002Fcreate-personal-access-token\u002F) with only Knowledge Base and Spaces permissions. Avoid using your account-root token.\n\nOptional but recommended:\n```bash\nexport GRADIENT_KB_UUID=\"your-kb-uuid\"     # Default KB for queries\nexport DO_SPACES_BUCKET=\"your-bucket\"      # Default bucket for uploads\nexport DO_SPACES_ENDPOINT=\"https:\u002F\u002Fnyc3.digitaloceanspaces.com\"\n```\n\n---\n\n## Tools\n\n### 📦 Store Documents in Spaces\n\nUpload files to DO Spaces for Knowledge Base indexing. This is the storage layer — documents land here before being indexed.\n\n```bash\n# Upload a file\npython3 gradient_spaces.py --upload \u002Fpath\u002Fto\u002Freport.md --bucket my-kb-data\n\n# Upload with a key prefix (folder structure)\npython3 gradient_spaces.py --upload report.md --bucket my-kb-data --prefix \"research\u002F2026-02-15\u002F\"\n\n# List files in a bucket\npython3 gradient_spaces.py --list --bucket my-kb-data\n\n# List files with a prefix filter\npython3 gradient_spaces.py --list --bucket my-kb-data --prefix \"research\u002F\"\n\n# Delete a file\npython3 gradient_spaces.py --delete \"research\u002Fold_report.md\" --bucket my-kb-data\n```\n\n📖 *[DO Spaces docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fspaces\u002F)*\n\n---\n\n### 🏗️ Create and Manage Knowledge Bases\n\nFull CRUD for Knowledge Bases. Create them programmatically instead of clicking through the console like a land-dweller.\n\n```bash\n# List all Knowledge Bases\npython3 gradient_kb_manage.py --list\n\n# Create a new KB\npython3 gradient_kb_manage.py --create --name \"My Research KB\" --region nyc3\n\n# Show details for a specific KB\npython3 gradient_kb_manage.py --show --kb-uuid \"your-kb-uuid\"\n\n# Delete a KB (⚠️ permanent!)\npython3 gradient_kb_manage.py --delete --kb-uuid \"your-kb-uuid\"\n```\n\n📖 *[Create KBs via API](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F)*\n\n---\n\n### 📁 Manage Data Sources\n\nConnect your Spaces bucket (or web URLs) to a Knowledge Base. This is what tells the KB \"index these documents.\"\n\n```bash\n# Add a DO Spaces data source\npython3 gradient_kb_manage.py --add-source \\\n  --kb-uuid \"your-kb-uuid\" \\\n  --bucket my-kb-data \\\n  --prefix \"research\u002F\"\n\n# List data sources for a KB\npython3 gradient_kb_manage.py --list-sources --kb-uuid \"your-kb-uuid\"\n\n# Trigger re-indexing (auto-detects the data source)\npython3 gradient_kb_manage.py --reindex --kb-uuid \"your-kb-uuid\"\n\n# Trigger re-indexing for a specific source\npython3 gradient_kb_manage.py --reindex --kb-uuid \"your-kb-uuid\" --source-uuid \"ds-uuid\"\n```\n\n> **🦞 Pro tip: Auto-indexing.** If your KB has auto-indexing enabled, you can skip manual re-index triggers. The KB will detect changes in your Spaces bucket automatically. Configure it in the [DigitalOcean Console](https:\u002F\u002Fcloud.digitalocean.com) → Knowledge Base → Settings.\n\n---\n\n### 🔍 Query the Knowledge Base\n\nSearch your indexed documents with semantic or hybrid queries. This is where the magic happens — your documents become answers.\n\n```bash\n# Basic query\npython3 gradient_kb_query.py --query \"What happened with the Q4 earnings?\"\n\n# Control number of results\npython3 gradient_kb_query.py --query \"Revenue trends\" --num-results 20\n\n# Tune hybrid search balance (see below)\npython3 gradient_kb_query.py --query \"$CAKE price movement\" --alpha 0.5\n\n# JSON output (for piping to other tools)\npython3 gradient_kb_query.py --query \"SEC filings summary\" --json\n```\n\n**Direct API call:**\n```bash\ncurl -s https:\u002F\u002Fkbaas.do-ai.run\u002Fv1\u002F{kb-uuid}\u002Fretrieve \\\n  -H \"Authorization: Bearer $DO_API_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"query\": \"What happened with Q4 earnings?\",\n    \"num_results\": 10,\n    \"alpha\": 0.5\n  }'\n```\n\n📖 *[KB retrieval API](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F#query-a-knowledge-base)*\n\n---\n\n### 🎛️ The `alpha` Parameter — Hybrid Search Tuning\n\nThis is the secret sauce. The `alpha` parameter controls the balance between **lexical** (keyword) and **semantic** (meaning) search:\n\n| Alpha | Behavior | Best For |\n|-------|----------|----------|\n| `0.0` | Pure lexical (keyword matching) | Exact terms: ticker symbols, filing numbers, dates |\n| `0.5` | Balanced hybrid | General research queries |\n| `1.0` | Pure semantic (meaning-based) | Open-ended: \"what happened with...\", \"summarize...\" |\n\n> **🦞 Rule of claw:** Start at `0.5`. Go lower when searching for specific things (`$CAKE`, `10-K`, `2026-02-15`). Go higher when exploring ideas (\"What's the market sentiment?\").\n\n---\n\n### 🧠 RAG-Enhanced Queries\n\nThe full pipeline: query the KB → build a context prompt → call an LLM to synthesize. One command, complete answers with citations.\n\n```bash\npython3 gradient_kb_query.py \\\n  --query \"Summarize all research on $CAKE\" \\\n  --rag \\\n  --model \"openai-gpt-oss-120b\"\n```\n\nThis automatically:\n1. 🔍 Queries the Knowledge Base for relevant documents\n2. 📝 Builds a prompt with the retrieved context\n3. 🤖 Calls the LLM to synthesize an answer\n\n> **Note:** RAG queries call the [Gradient Inference API](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fuse-serverless-inference\u002F) under the hood, so you'll need `GRADIENT_API_KEY` set. If you have the `gradient-inference` skill loaded too, you're all set.\n\n---\n\n## Advanced Configuration\n\n### Embedding Models & Chunking\n\nWhen creating a Knowledge Base, you can choose how documents are split into searchable chunks:\n\n| Strategy | How It Works | Best For |\n|----------|-------------|----------|\n| **Section-based** | Splits on document structure (headings, paragraphs) | Structured reports |\n| **Semantic** | Splits on meaning boundaries | Narrative content |\n| **Hierarchical** | Preserves document hierarchy in chunks | Technical docs |\n| **Fixed-length** | Equal-sized chunks | Uniform data |\n\nConfigure these in the [DigitalOcean Console](https:\u002F\u002Fcloud.digitalocean.com) when creating the KB, or via the API's `embedding_model` and chunking parameters.\n\n📖 *[KB configuration options](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fdetails\u002Ffeatures\u002F#retrieval-augmented-generation-rag)*\n\n---\n\n## CLI Reference\n\nAll scripts accept `--json` for machine-readable output.\n\n```\ngradient_spaces.py      --upload FILE | --list | --delete KEY\n                        [--bucket NAME] [--prefix PATH] [--key KEY] [--json]\n\ngradient_kb_manage.py   --list | --create | --show | --delete\n                        | --list-sources | --add-source | --reindex\n                        [--kb-uuid UUID] [--source-uuid UUID]\n                        [--name NAME] [--region REGION] [--bucket NAME]\n                        [--prefix PATH] [--json]\n\ngradient_kb_query.py    --query TEXT [--kb-uuid UUID] [--num-results N]\n                        [--alpha F] [--rag] [--model ID] [--json]\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `DO_API_TOKEN` | ✅ | DO API token (scopes: GenAI + Spaces) |\n| `DO_SPACES_ACCESS_KEY` | ✅ | Spaces access key |\n| `DO_SPACES_SECRET_KEY` | ✅ | Spaces secret key |\n| `DO_SPACES_ENDPOINT` | Optional | Spaces endpoint (default: `https:\u002F\u002Fnyc3.digitaloceanspaces.com`) |\n| `DO_SPACES_BUCKET` | Optional | Default bucket name |\n| `GRADIENT_KB_UUID` | Optional | Default KB UUID (saves typing `--kb-uuid` every time) |\n| `GRADIENT_API_KEY` | For RAG | Needed when using `--rag` for LLM synthesis |\n\n## External Endpoints\n\n| Endpoint | Purpose |\n|----------|---------|\n| `https:\u002F\u002Fkbaas.do-ai.run\u002Fv1\u002F{uuid}\u002Fretrieve` | KB retrieval API |\n| `https:\u002F\u002Fapi.digitalocean.com\u002Fv2\u002Fgen-ai\u002Fknowledge_bases\u002F` | KB management API |\n| `https:\u002F\u002F{region}.digitaloceanspaces.com` | DO Spaces (S3-compatible) |\n\n## Security & Privacy\n\n- Your `DO_API_TOKEN` is sent as a Bearer token to `api.digitalocean.com` and `kbaas.do-ai.run`\n- Spaces credentials are used for S3-compatible uploads to `{region}.digitaloceanspaces.com`\n- Documents you upload become **private** in your Spaces bucket by default\n- KB queries are scoped to your account — no cross-tenant access\n- No credentials or data are sent to any third-party endpoints\n\n## Trust Statement\n\n> By using this skill, documents and queries are sent to DigitalOcean's Knowledge Base\n> and Spaces APIs. Only install if you trust DigitalOcean with the documents you index.\n\n## Important Notes\n\n- Documents uploaded to Spaces are **private by default**\n- Re-indexing is **best-effort** — if the API call fails, auto-indexing kicks in on its own schedule\n- The retrieval API returns document **chunks**, not full documents\n- Deleting a KB is **permanent** — the indexed data is gone. The source files in Spaces are not affected.\n","# 🦞 Gradient AI — Knowledge Bases & RAG\n\n> ⚠️ **This is an unofficial community skill**, not maintained by DigitalOcean. Use at your own risk.\n\n> *\"A lobster never forgets. Neither should your agent.\" — the KB lobster*\n\nBuild a [Retrieval-Augmented Generation](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fdetails\u002Ffeatures\u002F#retrieval-augmented-generation-rag) pipeline using DigitalOcean's Gradient Knowledge Bases. Store your documents in DO Spaces, index them into a managed Knowledge Base (backed by OpenSearch), and query them with semantic or hybrid search.\n\n## Architecture\n\n```\nYour Agent                   DigitalOcean\n┌─────────────┐     upload    ┌──────────────┐\n│  Documents  │ ──────────▶  │  DO Spaces   │\n└─────────────┘              │  (S3-compat) │\n                              └──────┬───────┘\n                                     │ auto-index\n                              ┌──────▼───────┐\n                              │ Knowledge    │\n                              │ Base (KBaaS) │\n                              │ ┌──────────┐ │\n                              │ │OpenSearch│ │\n                              │ └──────────┘ │\n                              └──────┬───────┘\n                                     │ retrieve\n┌─────────────┐     answer    ┌──────▼───────┐\n│  Your Agent │ ◀──────────  │  RAG Results │\n│  + LLM      │              │  + Citations │\n└─────────────┘              └──────────────┘\n```\n\n📖 *[Knowledge Base docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F)*\n\n## API Endpoints\n\nThis skill connects to three official DigitalOcean service endpoints:\n\n| Hostname | Purpose | Docs |\n|----------|---------|------|\n| `api.digitalocean.com` | KB management (create, list, delete, data sources) | [DO API Reference](https:\u002F\u002Fdocs.digitalocean.com\u002Freference\u002Fapi\u002F) |\n| `kbaas.do-ai.run` | KB retrieval — semantic\u002Fhybrid search queries | [KB Retrieval docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F) |\n| `inference.do-ai.run` | LLM chat completions for RAG synthesis | [Inference docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fuse-serverless-inference\u002F) |\n| `\u003Cregion>.digitaloceanspaces.com` | S3-compatible object storage | [Spaces docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fspaces\u002F) |\n\nAll endpoints are owned and operated by DigitalOcean. The `*.do-ai.run` hostnames are the Gradient AI Platform's service domains.\n\n## Authentication\n\nThis skill uses **two different credentials** — think of it as a two-claw approach:\n\n| Credential | Used For | Env Var |\n|------------|----------|---------|\n| DO API Token | KB management, indexing, queries | `DO_API_TOKEN` |\n| Gradient API Key | LLM inference for RAG synthesis | `GRADIENT_API_KEY` |\n| Spaces Keys | S3-compatible uploads | `DO_SPACES_ACCESS_KEY` + `DO_SPACES_SECRET_KEY` |\n\n> **Credential scoping:** Use minimally-scoped tokens. Create a dedicated [Model Access Key](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fmanage-access-keys\u002F) for `GRADIENT_API_KEY`. For `DO_API_TOKEN`, use a [scoped API token](https:\u002F\u002Fdocs.digitalocean.com\u002Freference\u002Fapi\u002Fcreate-personal-access-token\u002F) with only Knowledge Base and Spaces permissions. Avoid using your account-root token.\n\nOptional but recommended:\n```bash\nexport GRADIENT_KB_UUID=\"your-kb-uuid\"     # Default KB for queries\nexport DO_SPACES_BUCKET=\"your-bucket\"      # Default bucket for uploads\nexport DO_SPACES_ENDPOINT=\"https:\u002F\u002Fnyc3.digitaloceanspaces.com\"\n```\n\n---\n\n## Tools\n\n### 📦 Store Documents in Spaces\n\nUpload files to DO Spaces for Knowledge Base indexing. This is the storage layer — documents land here before being indexed.\n\n```bash\n# Upload a file\npython3 gradient_spaces.py --upload \u002Fpath\u002Fto\u002Freport.md --bucket my-kb-data\n\n# Upload with a key prefix (folder structure)\npython3 gradient_spaces.py --upload report.md --bucket my-kb-data --prefix \"research\u002F2026-02-15\u002F\"\n\n# List files in a bucket\npython3 gradient_spaces.py --list --bucket my-kb-data\n\n# List files with a prefix filter\npython3 gradient_spaces.py --list --bucket my-kb-data --prefix \"research\u002F\"\n\n# Delete a file\npython3 gradient_spaces.py --delete \"research\u002Fold_report.md\" --bucket my-kb-data\n```\n\n📖 *[DO Spaces docs](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fspaces\u002F)*\n\n---\n\n### 🏗️ Create and Manage Knowledge Bases\n\nFull CRUD for Knowledge Bases. Create them programmatically instead of clicking through the console like a land-dweller.\n\n```bash\n# List all Knowledge Bases\npython3 gradient_kb_manage.py --list\n\n# Create a new KB\npython3 gradient_kb_manage.py --create --name \"My Research KB\" --region nyc3\n\n# Show details for a specific KB\npython3 gradient_kb_manage.py --show --kb-uuid \"your-kb-uuid\"\n\n# Delete a KB (⚠️ permanent!)\npython3 gradient_kb_manage.py --delete --kb-uuid \"your-kb-uuid\"\n```\n\n📖 *[Create KBs via API](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F)*\n\n---\n\n### 📁 Manage Data Sources\n\nConnect your Spaces bucket (or web URLs) to a Knowledge Base. This is what tells the KB \"index these documents.\"\n\n```bash\n# Add a DO Spaces data source\npython3 gradient_kb_manage.py --add-source \\\n  --kb-uuid \"your-kb-uuid\" \\\n  --bucket my-kb-data \\\n  --prefix \"research\u002F\"\n\n# List data sources for a KB\npython3 gradient_kb_manage.py --list-sources --kb-uuid \"your-kb-uuid\"\n\n# Trigger re-indexing (auto-detects the data source)\npython3 gradient_kb_manage.py --reindex --kb-uuid \"your-kb-uuid\"\n\n# Trigger re-indexing for a specific source\npython3 gradient_kb_manage.py --reindex --kb-uuid \"your-kb-uuid\" --source-uuid \"ds-uuid\"\n```\n\n> **🦞 Pro tip: Auto-indexing.** If your KB has auto-indexing enabled, you can skip manual re-index triggers. The KB will detect changes in your Spaces bucket automatically. Configure it in the [DigitalOcean Console](https:\u002F\u002Fcloud.digitalocean.com) → Knowledge Base → Settings.\n\n---\n\n### 🔍 Query the Knowledge Base\n\nSearch your indexed documents with semantic or hybrid queries. This is where the magic happens — your documents become answers.\n\n```bash\n# Basic query\npython3 gradient_kb_query.py --query \"What happened with the Q4 earnings?\"\n\n# Control number of results\npython3 gradient_kb_query.py --query \"Revenue trends\" --num-results 20\n\n# Tune hybrid search balance (see below)\npython3 gradient_kb_query.py --query \"$CAKE price movement\" --alpha 0.5\n\n# JSON output (for piping to other tools)\npython3 gradient_kb_query.py --query \"SEC filings summary\" --json\n```\n\n**Direct API call:**\n```bash\ncurl -s https:\u002F\u002Fkbaas.do-ai.run\u002Fv1\u002F{kb-uuid}\u002Fretrieve \\\n  -H \"Authorization: Bearer $DO_API_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"query\": \"What happened with Q4 earnings?\",\n    \"num_results\": 10,\n    \"alpha\": 0.5\n  }'\n```\n\n📖 *[KB retrieval API](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fcreate-manage-knowledge-bases\u002F#query-a-knowledge-base)*\n\n---\n\n### 🎛️ The `alpha` Parameter — Hybrid Search Tuning\n\nThis is the secret sauce. The `alpha` parameter controls the balance between **lexical** (keyword) and **semantic** (meaning) search:\n\n| Alpha | Behavior | Best For |\n|-------|----------|----------|\n| `0.0` | Pure lexical (keyword matching) | Exact terms: ticker symbols, filing numbers, dates |\n| `0.5` | Balanced hybrid | General research queries |\n| `1.0` | Pure semantic (meaning-based) | Open-ended: \"what happened with...\", \"summarize...\" |\n\n> **🦞 Rule of claw:** Start at `0.5`. Go lower when searching for specific things (`$CAKE`, `10-K`, `2026-02-15`). Go higher when exploring ideas (\"What's the market sentiment?\").\n\n---\n\n### 🧠 RAG-Enhanced Queries\n\nThe full pipeline: query the KB → build a context prompt → call an LLM to synthesize. One command, complete answers with citations.\n\n```bash\npython3 gradient_kb_query.py \\\n  --query \"Summarize all research on $CAKE\" \\\n  --rag \\\n  --model \"openai-gpt-oss-120b\"\n```\n\nThis automatically:\n1. 🔍 Queries the Knowledge Base for relevant documents\n2. 📝 Builds a prompt with the retrieved context\n3. 🤖 Calls the LLM to synthesize an answer\n\n> **Note:** RAG queries call the [Gradient Inference API](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fhow-to\u002Fuse-serverless-inference\u002F) under the hood, so you'll need `GRADIENT_API_KEY` set. If you have the `gradient-inference` skill loaded too, you're all set.\n\n---\n\n## Advanced Configuration\n\n### Embedding Models & Chunking\n\nWhen creating a Knowledge Base, you can choose how documents are split into searchable chunks:\n\n| Strategy | How It Works | Best For |\n|----------|-------------|----------|\n| **Section-based** | Splits on document structure (headings, paragraphs) | Structured reports |\n| **Semantic** | Splits on meaning boundaries | Narrative content |\n| **Hierarchical** | Preserves document hierarchy in chunks | Technical docs |\n| **Fixed-length** | Equal-sized chunks | Uniform data |\n\nConfigure these in the [DigitalOcean Console](https:\u002F\u002Fcloud.digitalocean.com) when creating the KB, or via the API's `embedding_model` and chunking parameters.\n\n📖 *[KB configuration options](https:\u002F\u002Fdocs.digitalocean.com\u002Fproducts\u002Fgradient-ai-platform\u002Fdetails\u002Ffeatures\u002F#retrieval-augmented-generation-rag)*\n\n---\n\n## CLI Reference\n\nAll scripts accept `--json` for machine-readable output.\n\n```\ngradient_spaces.py      --upload FILE | --list | --delete KEY\n                        [--bucket NAME] [--prefix PATH] [--key KEY] [--json]\n\ngradient_kb_manage.py   --list | --create | --show | --delete\n                        | --list-sources | --add-source | --reindex\n                        [--kb-uuid UUID] [--source-uuid UUID]\n                        [--name NAME] [--region REGION] [--bucket NAME]\n                        [--prefix PATH] [--json]\n\ngradient_kb_query.py    --query TEXT [--kb-uuid UUID] [--num-results N]\n                        [--alpha F] [--rag] [--model ID] [--json]\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `DO_API_TOKEN` | ✅ | DO API token (scopes: GenAI + Spaces) |\n| `DO_SPACES_ACCESS_KEY` | ✅ | Spaces access key |\n| `DO_SPACES_SECRET_KEY` | ✅ | Spaces secret key |\n| `DO_SPACES_ENDPOINT` | Optional | Spaces endpoint (default: `https:\u002F\u002Fnyc3.digitaloceanspaces.com`) |\n| `DO_SPACES_BUCKET` | Optional | Default bucket name |\n| `GRADIENT_KB_UUID` | Optional | Default KB UUID (saves typing `--kb-uuid` every time) |\n| `GRADIENT_API_KEY` | For RAG | Needed when using `--rag` for LLM synthesis |\n\n## External Endpoints\n\n| Endpoint | Purpose |\n|----------|---------|\n| `https:\u002F\u002Fkbaas.do-ai.run\u002Fv1\u002F{uuid}\u002Fretrieve` | KB retrieval API |\n| `https:\u002F\u002Fapi.digitalocean.com\u002Fv2\u002Fgen-ai\u002Fknowledge_bases\u002F` | KB management API |\n| `https:\u002F\u002F{region}.digitaloceanspaces.com` | DO Spaces (S3-compatible) |\n\n## Security & Privacy\n\n- Your `DO_API_TOKEN` is sent as a Bearer token to `api.digitalocean.com` and `kbaas.do-ai.run`\n- Spaces credentials are used for S3-compatible uploads to `{region}.digitaloceanspaces.com`\n- Documents you upload become **private** in your Spaces bucket by default\n- KB queries are scoped to your account — no cross-tenant access\n- No credentials or data are sent to any third-party endpoints\n\n## Trust Statement\n\n> By using this skill, documents and queries are sent to DigitalOcean's Knowledge Base\n> and Spaces APIs. Only install if you trust DigitalOcean with the documents you index.\n\n## Important Notes\n\n- Documents uploaded to Spaces are **private by default**\n- Re-indexing is **best-effort** — if the API call fails, auto-indexing kicks in on its own schedule\n- The retrieval API returns document **chunks**, not full documents\n- Deleting a KB is **permanent** — the indexed data is gone. The source files in Spaces are not affected.\n",{"name":5,"files":24,"homepage":26,"metadata":27,"description":50},[25],"scripts\u002F*","https:\u002F\u002Fgithub.com\u002FRogue-Iteration\u002FTheBigClaw",{"tags":28,"author":35,"version":36,"clawdbot":37},[29,30,31,32,33,34],"digitalocean","gradient-ai","knowledge-base","rag","semantic-search","do-spaces","Rogue Iteration","0.1.4",{"emoji":38,"requires":39,"primaryEnv":41},"📚",{"env":40,"pip":45,"bins":48},[41,42,43,44],"DO_API_TOKEN","DO_SPACES_ACCESS_KEY","DO_SPACES_SECRET_KEY","GRADIENT_API_KEY",[46,47],"requests>=2.31.0","boto3>=1.34.0",[49],"python3","Community skill (unofficial) for DigitalOcean Gradient Knowledge Bases. Build RAG pipelines: store documents in DO Spaces, configure data sources, manage indexing, and run semantic or hybrid search queries.\n","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fg\u002Fgradient-knowledge-base",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill gradient-knowledge-base",{"tool":66,"command":67},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill gradient-knowledge-base",{"tool":69,"command":70},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill gradient-knowledge-base","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fg\u002Fgradient-knowledge-base\u002FSKILL.md",true,[],[75,82,89,96,103,110],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]