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
| Setting | Value |
|---|---|
| Base URL (OpenAI-compatible tools) | https://kura.hillstribe.tech/v1 |
| Base URL (Anthropic-format tools, e.g. Claude Code) | https://kura.hillstribe.tech |
| API key | Your Kura key (sk-…) from Products → Kura API |
| Main model | deepseek/deepseek-v4-pro |
| Fast / cheap model | deepseek/deepseek-v4-flash |
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
- Open Products → Hermes, press Show credentials, and sign in to your Hermes dashboard.
- Open the model / provider settings (or run
hermes modelin its terminal) and choose Custom endpoint. - Base URL
https://kura.hillstribe.tech/v1, API key: your Kura key, modeldeepseek/deepseek-v4-pro. - 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:
model:
provider: custom
base_url: https://kura.hillstribe.tech/v1
api_key: ${KURA_API_KEY}
default: deepseek/deepseek-v4-proKURA_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/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.
{
"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_URLis the host without/v1, because Claude Code adds the path itself.ANTHROPIC_AUTH_TOKENsends the key asAuthorization: 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_BETASstops pre-release request fields that non-Anthropic models reject.
Or, for one terminal session only:
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
{
"$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.
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)
- Open the extension's settings and set API Provider to OpenAI Compatible.
- Base URL:
https://kura.hillstribe.tech/v1 - API Key: your Kura key
- Model ID:
deepseek/deepseek-v4-pro - 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)
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)
- Credentials → New → OpenAI. Paste your Kura key as the API Key and set Base URL to
https://kura.hillstribe.tech/v1. - Add an AI Agent node with an OpenAI Chat Model sub-node that uses this credential.
- Set the model to By ID (or an expression) with the value
deepseek/deepseek-v4-flashordeepseek/deepseek-v4-pro. - 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.
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
| Symptom | Likely cause |
|---|---|
404 Not found | Base URL is wrong: /v1 is missing or doubled. Claude Code needs the host without /v1 |
401 | Key missing or revoked, or the tool sends it in the wrong variable. For Claude Code, use ANTHROPIC_AUTH_TOKEN |
403 | That model isn't enabled for your account. Check the Kura dashboard page |
422 budget_exceeded | Free credit and balance used up (or email not verified). Top up under Billing |
400 after a tool call | The harness dropped reasoning_content from history. Update the tool, or try deepseek-v4-flash with thinking disabled |
| Unknown model warning | Normal for tools that check a built-in list. Kura still routes the provider/model name |