INhillstribe docsDashboard →

Use DeepSeek in agent harnesses

An agent harness is the program around the model: it plans, calls tools, edits files and loops until the job is done. Point any of these at Kura and they run on DeepSeek V4, paid from your $1 free credit and then your Hillstribe balance.

What you need

SettingValue
Base URL (OpenAI-compatible tools)https://kura.hillstribe.tech/v1
Base URL (Anthropic-format tools, e.g. Claude Code)https://kura.hillstribe.tech
API keyYour Kura key (sk-…) from Products → Kura API
Main modeldeepseek/deepseek-v4-pro
Fast / cheap modeldeepseek/deepseek-v4-flash
Create a separate key for each tool (for example claude-code-laptop or hermes). The dashboard then shows which one is spending, and you can revoke one without breaking the others.

Hermes Agent

Hermes hosted by Hillstribe

  1. Open Products → Hermes, press Show credentials, and sign in to your Hermes dashboard.
  2. Open the model / provider settings (or run hermes model in its terminal) and choose Custom endpoint.
  3. Base URL https://kura.hillstribe.tech/v1, API key: your Kura key, model deepseek/deepseek-v4-pro.
  4. Send a message. The request appears under Usage this month on the Kura page within a few minutes.

Self-hosted Hermes

Run hermes model, choose Custom endpoint and enter the same three values. Or edit ~/.hermes/config.yaml yourself:

~/.hermes/config.yaml
model:
  provider: custom
  base_url: https://kura.hillstribe.tech/v1
  api_key: ${KURA_API_KEY}
  default: deepseek/deepseek-v4-pro
~/.hermes/.env
KURA_API_KEY=sk-...

Check it with hermes status. You can switch models during a session with /model.

Claude Code

Claude Code talks the Anthropic Messages API. Kura serves that API too, at https://kura.hillstribe.tech/v1/messages, for every model in its catalog. That includes DeepSeek, so Claude Code can run on deepseek/deepseek-v4-pro.

Anthropic doesn't support running Claude Code on non-Claude models. The core loop (reading and editing files, running commands, tools) works with DeepSeek through Kura, but some features may behave differently or be unavailable, such as images, server-side web search and Remote Control. If you want the official experience through the same key, use anthropic/claude-sonnet-5-5 or anthropic/claude-opus-5-5 as the model.

Put the settings in your user settings file. Don't put them in a project's .claude/settings.json, because that gets committed.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://kura.hillstribe.tech",
    "ANTHROPIC_AUTH_TOKEN": "sk-...your Kura key...",
    "ANTHROPIC_MODEL": "deepseek/deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek/deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek/deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek/deepseek-v4-flash",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}
  • ANTHROPIC_BASE_URL is the host without /v1, because Claude Code adds the path itself.
  • ANTHROPIC_AUTH_TOKEN sends the key as Authorization: Bearer, which is what Kura expects.
  • The Haiku model is used for background tasks (titles, summaries), so the cheaper Flash model is a good fit.
  • CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS stops pre-release request fields that non-Anthropic models reject.

Or, for one terminal session only:

shell
export ANTHROPIC_BASE_URL=https://kura.hillstribe.tech
export ANTHROPIC_AUTH_TOKEN=$KURA_API_KEY
export ANTHROPIC_MODEL=deepseek/deepseek-v4-pro
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek/deepseek-v4-flash
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
claude

Test the connection first. You should get JSON back that starts with {"id":"msg_:

curl https://kura.hillstribe.tech/v1/messages \
  -H "Authorization: Bearer $KURA_API_KEY" \
  -H "anthropic-version: 2023-06-01" -H "content-type: application/json" \
  -d '{"model":"deepseek/deepseek-v4-flash","max_tokens":50,
       "messages":[{"role":"user","content":"Say hi"}]}'

Inside Claude Code, /status shows the base URL and model in use.

OpenCode

opencode.json (project) or ~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "kura": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Kura",
      "options": {
        "baseURL": "https://kura.hillstribe.tech/v1",
        "apiKey": "{env:KURA_API_KEY}"
      },
      "models": {
        "deepseek/deepseek-v4-pro":   { "name": "DeepSeek V4 Pro (Kura)" },
        "deepseek/deepseek-v4-flash": { "name": "DeepSeek V4 Flash (Kura)" }
      }
    }
  },
  "model": "kura/deepseek/deepseek-v4-pro",
  "small_model": "kura/deepseek/deepseek-v4-flash"
}

Export KURA_API_KEY in your shell, start opencode, and pick the model with /models.

Aider

Aider marks OpenAI-compatible endpoints with an openai/ prefix, so the model name becomes openai/deepseek/deepseek-v4-pro.

shell
export OPENAI_API_BASE=https://kura.hillstribe.tech/v1
export OPENAI_API_KEY=$KURA_API_KEY
aider --model openai/deepseek/deepseek-v4-pro --weak-model openai/deepseek/deepseek-v4-flash

Aider may warn that it doesn't know this model's context size or price. You can ignore that, because Kura bills by real usage.

Cline / Roo Code (VS Code)

  1. Open the extension's settings and set API Provider to OpenAI Compatible.
  2. Base URL: https://kura.hillstribe.tech/v1
  3. API Key: your Kura key
  4. Model ID: deepseek/deepseek-v4-pro
  5. Optional: set the context window to 1,000,000 and turn on the reasoning or thinking display if the extension has one.

Continue (VS Code / JetBrains)

~/.continue/config.yaml
name: Kura
version: 1.0.0
schema: v1
models:
  - name: DeepSeek V4 Pro (Kura)
    provider: openai
    model: deepseek/deepseek-v4-pro
    apiBase: https://kura.hillstribe.tech/v1
    apiKey: ${{ secrets.KURA_API_KEY }}
    roles: [chat, edit, apply]
  - name: DeepSeek V4 Flash (Kura)
    provider: openai
    model: deepseek/deepseek-v4-flash
    apiBase: https://kura.hillstribe.tech/v1
    apiKey: ${{ secrets.KURA_API_KEY }}
    roles: [chat, autocomplete]

n8n (AI Agent node)

  1. Credentials → New → OpenAI. Paste your Kura key as the API Key and set Base URL to https://kura.hillstribe.tech/v1.
  2. Add an AI Agent node with an OpenAI Chat Model sub-node that uses this credential.
  3. Set the model to By ID (or an expression) with the value deepseek/deepseek-v4-flash or deepseek/deepseek-v4-pro.
  4. Attach tools (HTTP Request, Code, your workflows) to the agent. Tool calling works with both DeepSeek models.

Your own agent (SDK)

Building your own harness? The DeepSeek guide has a complete tool-calling loop in Python, plus LangChain and Vercel AI SDK examples. The one DeepSeek-specific rule: when you use tools, append each assistant message to the history unchanged, with its reasoning_content and tool_calls, or DeepSeek returns 400.

Any framework that accepts an OpenAI base URL works the same way: CrewAI, LlamaIndex, Pydantic AI, the OpenAI Agents SDK and others.

OpenAI Agents SDK · pip install openai-agents
import os
from agents import Agent, Runner, OpenAIChatCompletionsModel, set_tracing_disabled
from openai import AsyncOpenAI

set_tracing_disabled(True)  # tracing would try to upload to OpenAI with your Kura key
kura = AsyncOpenAI(base_url="https://kura.hillstribe.tech/v1", api_key=os.environ["KURA_API_KEY"])

agent = Agent(
    name="helper",
    instructions="You are concise.",
    model=OpenAIChatCompletionsModel(model="deepseek/deepseek-v4-pro", openai_client=kura),
)
print(Runner.run_sync(agent, "Plan a 3-day trek near Kathmandu").final_output)

Troubleshooting

SymptomLikely cause
404 Not foundBase URL is wrong: /v1 is missing or doubled. Claude Code needs the host without /v1
401Key missing or revoked, or the tool sends it in the wrong variable. For Claude Code, use ANTHROPIC_AUTH_TOKEN
403That model isn't enabled for your account. Check the Kura dashboard page
422 budget_exceededFree credit and balance used up (or email not verified). Top up under Billing
400 after a tool callThe harness dropped reasoning_content from history. Update the tool, or try deepseek-v4-flash with thinking disabled
Unknown model warningNormal for tools that check a built-in list. Kura still routes the provider/model name