Skip to content

DeepSeek V4 with DeepSeek use: First Agent Setup

Pair DeepSeek V4 with DeepSeek use for a local coding agent. Flash vs Pro, thinking effort, peak-rate traps, and a disposable-workspace first run.

6 min readBeginner

Which V4 tier do you actually wire into DeepSeek use on day one – and at what thinking effort? That pairing choice matters more than another architecture tour. You can run a local coding agent on DeepSeek V4 without a GPU cluster or dumping half a monorepo into chat. Miss peak windows, concurrency caps, or the fake-sandbox boundary though, and the same loop gets expensive or unsafe fast.

This walkthrough goes zero → disposable-workspace agent in minutes. Model/effort picks and what breaks first sit up front. No calculator CLI demo.

DeepSeek V4 + use: what you’re actually wiring

DeepSeek’s own framing is blunt: Agent = Model + use. V4-Pro or V4-Flash does the reasoning. DeepSeek use (CLI: dsh) is the MIT-licensed developer-preview layer – tools, sessions, sandboxes, loops, UI – shipped as Cordis plugins you swap without forking core. Breaking changes are expected; read that as a feature flag on your patience.[[1]](https://deepseek.com/use/en/)

Two MoE instruct models, default 1M-token context, max output up to 384K on the official API. V4 release notes put Pro at 1.6T total / 49B active and Flash at 284B / 13B active. Long-context cost drops hard with hybrid sparse attention: the V4 technical report (arXiv:2606.19348) pegs V4-Pro at roughly 27% of V3.2’s single-token inference FLOPs and ~10% of the KV cache at 1M context.[[2]](https://arxiv.org/abs/2606.19348)

Piece Flash (0731) Pro (0813)
API id deepseek-v4-flash deepseek-v4-pro
Active params 13B 49B
Context / max out 1M / 384K 1M / 384K
Off-peak in/out (cache miss) $0.22 / $0.66 per 1M $0.66 / $1.98 per 1M
Peak in/out $0.44 / $1.32 $1.32 / $3.96
Concurrency limit 2500 500

Figures above track DeepSeek’s Models & Pricing page as of the late August 2026 docs snapshot – recheck before you budget a long agent farm; list prices move. Peak windows: 01:00-04:00 and 06:00-10:00 UTC, Monday-Friday. Off-peak is half of peak on both input and output. Cache-hit input falls further ($0.007 Flash / $0.022 Pro off-peak).[[3]](https://api-docs.deepseek.com/quick_start/pricing)

Step-by-step: first agent on a throwaway folder

Don’t aim this at production on day one. Copy a small repo into a disposable folder.

  1. Install Node.js ^22.19 or ≥24 (23.x odd line isn’t in engines). Verify with node -v.
  2. Create an API key on the DeepSeek platform.
  3. Start the Web UI:
npx @deepseek-ai/dsh web

UI defaults to http://127.0.0.1:3080 and usually opens a browser locally (--no-open if you only want the server). From source: clone → pnpm installpnpm run buildpnpm dsh web. The repo SAFETY notice is not decoration – read it before the agent touches a real disk tree.[[4]](https://github.com/deepseek-ai/deepseek-use)

  1. Settings → Models: paste the key. Select deepseek-v4-flash first.
  2. Add a workspace pointing at that disposable folder. No workspace selected → composer stays dead.
  3. Leave mode on Standard (full toolset). Minimal is bare-shell benchmark territory. Code mode has the model emit TypeScript that orchestrates tools – strong when the script is right, messy when it isn’t.

Prompt shape that stays bounded:

In this workspace only: list failing tests if any, propose the smallest fix,
apply it, re-run the relevant test command, and stop. Do not touch files
outside this directory. Edit in place; avoid rewriting whole files.

Outside use, raw API calls still default thinking on at high effort. Minimal OpenAI-SDK shape (toggle + effort from the Thinking Mode guide):

from openai import OpenAI
client = OpenAI(api_key="...", base_url="https://api.deepseek.com")
resp = client.chat.completions.create(
 model="deepseek-v4-flash",
 messages=[{"role": "user", "content": "Refactor foo.py helpers only."}],
 reasoning_effort="high",
 extra_body={"thinking": {"type": "enabled"}},
)

Turn thinking off for cheap chatty loops. Keep max for multi-step work where failure is costly. While thinking is active, temperature / top_p / penalty knobs are ignored.[[5]](https://api-docs.deepseek.com/guides/thinking_mode/)

Common pitfalls that burn time or money

Happy-path install hides these. They show up on the second afternoon.

  • Peak-rate surprise. Identical agent loop at 07:00 UTC on a weekday meters at 2× off-peak on input and output. Park heavy use jobs in off-peak windows when you can.
  • Thinking default tax. High effort on scaffolding (“rename this folder”) still emits reasoning tokens. Disable thinking or drop to low for mechanical edits; reserve max for hard agentic passes.
  • Workspace ≠ jail. Community reports cover agents leaving the selected project folder and reading unrelated local files on long runs. Dedicated OS user, VM, or truly disposable clone beats a polite prompt line. Official SAFETY text already tells you to review before running.
  • Stale UI under load. Progress can sit at 5/9 todos while the session log already finished the work – write-behind persistence. Reload before you kill the job or pay twice for a restart.
  • “API key is invalid” lying. Turns out quota hits, 403s, and gateway failures sometimes flatten to that same string in the UI. Check raw provider errors and balance before you mint a new key.
  • Pro concurrency 500 vs Flash 2500. Parallel subagents hit Pro’s wall sooner. Flash is the throughput tier when many sessions run at once.

Pro tip: Default brain = Flash + high effort. Move to Pro + max only after Flash fails the same task twice. Quality gap shows on deep multi-file refactors. Bill gap shows if every todo list starts on Pro during peak UTC.

Is “everything is a plugin” worth preview friction? If you want to swap models, loops, or sandboxes without rewriting an agent product – yes. If you want a polished closed coding IDE tomorrow morning – maybe not yet.

How this stack compares to the usual alternatives

You’re picking a model + open use pair, not one SaaS button.

DeepSeek V4 + use Claude Code-style closed agent Chat-only V4 web
Local tools / repo edit Yes (plugin tools, shell, editor) Yes, productized No real FS agent
Swap model freely Yes (DeepSeek + OpenAI-compatible others) Usually locked N/A
Open weights path V4 weights MIT; use MIT No N/A
Cost control Flash/Pro + peak/off-peak + cache Subscription / premium tokens Free tier limits
Stability Developer preview, breaking changes Productized Stable chat

Private monorepo, weekend spike, full control, cheap tokens – this stack fits. Need zero babysitting and a vendor on the hook at 9am Monday? Closed agents still win on polish. No third option needed for that call.

FAQ

Do I need V4-Pro inside DeepSeek use?

No. Start on Flash. Bump to Pro only when Flash fails the same multi-step task twice.

What’s the difference between Standard, Code, and Minimal modes?

Standard = full toolset (edit, shell, search, skills, subagents) – use it until you have a reason not to. Code mode writes a TypeScript program that calls tools in bulk; fewer round-trips when the script is right, nastier blast radius when it isn’t (one bad generated loop can thrash the workspace). Minimal strips down to shell + file editor so you can benchmark the model without use fat. Creator is the in-memory plugin composition view.

Will 1M context make long agent runs cheap automatically?

No. Feasible ≠ cheap. Lower FLOPs/KV versus prior DeepSeek gens (see the V4 paper) plus cache hits on repeated prefixes help a lot – but tool results still land in the session log, thinking traces still bill as output, and peak UTC windows still double the meter. Scope the task, stay on Flash until you can’t, glance at the clock before a multi-hour loop.[[2]](https://arxiv.org/abs/2606.19348)

Next: empty folder, one small failing test project, npx @deepseek-ai/dsh web, Flash selected, single constrained fix. Mount the main repo only after that run looks sane.