mcpField
A
ai-services

ai-services

github.com/digitalocean-labsCloud & DevOps3877 installsUpdated 3d ago
Repository

About ai-services

ai-services is a skill for configuring DigitalOcean Gradient AI Platform in App Platform applications. It covers Serverless Inference for direct LLM calls and the Agent Development Kit for agents, knowledge bases, guardrails, and multi-agent workflows.

Key features

  1. 01Choose inference or agent development
  2. 02Configure model access credentials
  3. 03Use an OpenAI-compatible inference API
  4. 04Set up agents with Gradient ADK
  5. 05Check available models

Use cases

  1. 01Add LLM inference to an App Platform app
  2. 02Build agents with knowledge bases or guardrails
  3. 03Configure credentials for AI deployments

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/digitalocean-labs/do-app-platform-skills --skill ai-services

After installing, type/ai-servicesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
reference/
agent-development-kit.md
serverless-inference.md

Details

From the project README

AI Services Skill

Configure DigitalOcean Gradient AI Platform for App Platform applications.

Tip: This is one specialized skill in the App Platform library. For complex multi-step projects, consider using the planner skill to generate a staged approach. For an overview of all available skills, see the root SKILL.md.


Quick Decision

What do you need?
├── Simple LLM API calls → Serverless Inference
│   OpenAI-compatible API, no agent management
│
└── Full AI agents → Agent Development Kit (ADK)
    Knowledge bases, RAG, guardrails, multi-agent routing
NeedSolutionReference
Call LLM models directlyServerless Inferenceserverless-inference.md
Build agents with knowledge basesADKagent-development-kit.md
Content filtering / guardrailsADKagent-development-kit.md
Multi-agent workflowsADKagent-development-kit.md

Credential Handling

Model access keys follow the standard credential hierarchy:

  1. GitHub Secrets (recommended): User creates key → adds to GitHub Secrets → app spec references
  2. App Platform Secrets: Set via doctl apps update with type: SECRET
# App Spec pattern
envs:
  - key: MODEL_ACCESS_KEY
    scope: RUN_TIME
    type: SECRET
    value: ${MODEL_ACCESS_KEY}   # From GitHub Secrets

Key creation: Control Panel → Serverless Inference → Model Access Keys

Keys shown only once after creation—store securely.


Quick Start: Serverless Inference

# .do/app.yaml
services:
  - name: api
    envs:
      - key: MODEL_ACCESS_KEY
        scope: RUN_TIME
        type: SECRET
        value: ${MODEL_ACCESS_KEY}
      - key: INFERENCE_ENDPOINT
        value: https://inference.do-ai.run
# Python SDK (OpenAI-compatible)
from openai import OpenAI
import os

client = OpenAI(
    base_url=os.environ["INFERENCE_ENDPOINT"] + "/v1",
    api_key=os.environ["MODEL_ACCESS_KEY"],
)

response = client.chat.completions.create(
    model="llama3.3-70b-instruct",
    messages=[{"role": "user", "content": "Hello!"}],
)

Full guide: See serverless-inference.md


Quick Start: Agent Development Kit

# Install and configure
pip install gradient-adk
gradient agent configure

# Run locally
gradient agent run
# → http://localhost:8080/run

# Deploy to DigitalOcean
gradient agent deploy
# Agent entrypoint
from gradient_adk import entrypoint

@entrypoint
def entry(payload, context):
    query = payload["prompt"]
    return {"response": "Hello from agent!"}

Full guide: See agent-development-kit.md


Available Models

ModelUse Case
llama3.3-70b-instructGeneral purpose, high quality
llama3-8bFaster, lower cost
mistral-7bEfficient, multilingual
# List all available models
doctl genai list-models

Check Gradient AI Models for current availability.


Reference Files


Quick Troubleshooting

ErrorCauseFix
401 UnauthorizedInvalid model access keyVerify key in GitHub Secrets
Model not foundInvalid model IDRun doctl genai list-models
Rate limit exceededToo many requestsImplement exponential backoff
ADK deploy failsMissing token scopesEnsure genai CRUD + project read scopes

Integration with Other Skills

  • → designer: Add AI service environment variables to app spec
  • → deployment: Model access key stored in GitHub Secrets
  • → devcontainers: Test AI integrations locally before deployment
  • → planner: Plan AI-enabled app deployments

Documentation Links

Comments

Markdown supported