Connecting DeepSeek Harness to the Real World with AgentKey

Connecting DeepSeek Harness to the Real World with AgentKey

Large language models are excellent at understanding, reasoning, and generating content. But when a task depends on today's news, social conversations, product prices, company information, or on-chain activity, the model's existing knowledge is no longer enough.

That is where an agent harness becomes essential. The model does the thinking, the harness keeps it working in a real environment, and external tools bring live information into context.

DeepSeek Harness (DSH) and AgentKey cover two complementary parts of this stack. DSH provides an open, composable, and traceable agent runtime. AgentKey provides a unified live-data access layer. Together, they let a locally running DSH agent search the web, inspect social platforms, query market and on-chain data, and preserve the complete tool-call trail inside the session trajectory.

What is DeepSeek Harness?

DeepSeek Harness, invoked through the dsh command, is an open-source agent harness developed by DeepSeek. DeepSeek describes the model as the soul of an agent, while the harness helps it understand its environment, use tools, and continue working in real-world settings.

DSH is built on Cordis and follows one central idea: Everything is a Plugin. Model adapters, tools, skills, sessions, sandboxes, storage, agent loops, scheduling, and even the UI can be mounted, replaced, or recomposed. Developers can change the capability stack through configuration instead of modifying the DSH source code.

Its main advantages include:

  • Composable by design: capabilities are assembled through plugins and configuration layers, making it possible to choose different models, tools, permission policies, storage systems, and execution modes for different use cases.
  • Traceable execution: system prompts, reasoning, tool calls and results, subagent scheduling, and context injection are written to an append-only session log that supports inspection, resume, fork, search, and replay.
  • Multiple runtime modes: Standard Mode provides a full agent workflow; Code Mode lets generated code orchestrate multiple tool calls; Minimal Mode supports focused model benchmarking; Creator Mode helps developers inspect the runtime and build plugins or presets.
  • Open source and locally runnable: DSH is released under the MIT license and can be used through its Web UI or built and extended from source.

DSH is currently in developer preview, so plugin APIs and configuration contracts may still introduce breaking changes. Production users should pin the DSH version and validate their profiles, patches, and plugins before upgrading.

What is AgentKey?

AgentKey is not a model or another chat assistant. It is an external data-access layer for AI agents. Through one MCP connection, it gives an agent access to capabilities such as web search, content extraction, social media, finance, e-commerce, business intelligence, and crypto or on-chain data.

The traditional approach requires separate accounts and API keys for search, social data, market feeds, and other services—plus separate SDKs, quotas, bills, and failure handling. AgentKey brings these integrations under one account, one shared balance, and one agent-facing workflow, while maintaining a changing catalog of providers and tools in the cloud.

Instead of asking the model to memorize fixed API operation names, AgentKey exposes three tools for dynamic discovery:

  1. find_tools searches the current catalog using the user's full intent and returns suitable tools with their per-call cost.
  2. describe_tool returns the selected tool's parameter schema, required fields, and confirmed cost.
  3. execute_tool runs the tool using the schema that was just inspected.

This creates a consistent agent workflow:

User request
   ↓
DSH Agent + AgentKey Skill
   ↓
find_tools → describe_tool → execute_tool
   ↓
AgentKey routes the request to an appropriate data service
   ↓
The result returns to DSH and is recorded in the session trajectory

This architecture delivers several practical advantages:

  • No separate integration for every data source: one connection unlocks multiple categories of live-data tools.
  • A catalog that can keep evolving: the agent discovers capabilities at runtime instead of relying on hard-coded operation names that become stale.
  • Visible cost before execution: per-call credit information is available before the agent commits to an operation, making batch tasks easier to control.
  • Room for routing and fallback: if one data path is unavailable, the agent can choose a sibling interface, another version, or an alternative provider.
  • No dependency on a single model or harness: AgentKey acts as a data layer that can serve DSH and other agents that support MCP and skills.

Why do AgentKey and DSH fit together?

DSH answers the question, “How should the agent run?” AgentKey answers, “How should the agent obtain live external data?”

Layer DSH provides AgentKey provides
Reasoning and execution Agent loop, model adapters, sessions, and context
Tool system Tool registration, policies, permissions, and call traces Dynamic discovery and execution of external data tools
Extension mechanism Cordis plugins, profiles, bundles, and patches MCP Server + AgentKey Skill
Observability Session log, trajectory, resume, fork, and replay Tool selection, parameters, cost, and results
Real-world data Connections to MCP and other tool plugins Search, web, social, finance, e-commerce, business, and on-chain data

With both in place, DSH does more than answer questions locally. It can understand a task, select an external capability, retrieve live information, cross-check the result, and produce an answer while the entire process remains governed by DSH tool policies and session tracing.

Integrate AgentKey in five minutes

Step 1: Start DSH

After installing Node.js, launch the DSH Web UI:

npx @deepseek-ai/dsh web

By default, the Web UI starts at http://127.0.0.1:3080 and opens in your browser.

Step 2: Install AgentKey

On macOS or Linux, run the official installer and target DSH only:

curl -fsSL https://agentkey.app/install.sh | bash -s -- --only dsh

On Windows PowerShell, run:

& ([scriptblock]::Create((irm https://agentkey.app/install.ps1))) -Only "dsh"

The installer performs two distinct and equally important tasks:

  • It installs the AgentKey Skill globally so the agent learns to follow the find_tools → describe_tool → execute_tool workflow.
  • It starts AgentKey device-code login and writes an authenticated remote MCP configuration into the DSH home-level patch.

Complete the authorization when the browser opens. The server connection, the Skill, and authentication are separate pieces: installing only the Skill does not create MCP tools, while writing only the MCP configuration does not ensure that the model follows the correct dynamic-discovery workflow.

If you prefer to see each operation explicitly, run the two manual commands instead:

npx -y skills add chainbase-labs/agentkey -g -a universal -s agentkey -y
npx -y @agentkey/cli --auth-login --only dsh

The second command uses a device-code flow rather than generic MCP OAuth. The current DSH MCP Client passes static headers to its Streamable HTTP transport but does not provide the authProvider required for 401/OAuth discovery. AgentKey therefore uses its CLI to write a Bearer key before DSH connects.

Step 3: Understand where the configuration goes

The AgentKey CLI maintains one marked Loader block in:

${DSH_HOME:-~/.dsh}/cordis.patch.yml

This is the DSH home-level patch, so it is composed over current and future profiles without duplicating the same key in every profile. A running profile can observe the change through HMR, while stopped and future profiles load it the next time they start.

This is a CLI-managed DSH MCP integration, not a native DSH bundle installed through dsh plugin add. The real API key should exist only in the local home patch. Never commit that key or configuration file to Git.

Verify that the integration really works

Do not treat a Mounted status in the plugin page as proof that setup is complete. Mounted means Cordis loaded the configuration row; it does not prove that MCP authenticated and synchronized its tools.

Verify the integration in three steps:

  1. Open DSH → Settings → Plugins → Plugin list and search for the configured id agentkey. Expanding the row should show mcp-client, backed by @deepseek-ai/dsh-mcp-client.
  2. In the preset or session where you plan to use AgentKey, confirm that these three core tools are visible:
    • mcp__agentkey__find_tools
    • mcp__agentkey__describe_tool
    • mcp__agentkey__execute_tool
  3. Submit a task that requires live data and inspect the trajectory to confirm that discovery, description, and execution actually occurred.

For example, ask DSH:

Use AgentKey to find today's latest AI news. Start with find_tools, inspect the selected tool with describe_tool, execute it, and summarize the major developments with sources.

You can also try more practical workflows:

  • “Search Reddit and X for discussions about this product from the past month, then summarize recurring pain points and feature requests.”
  • “Compare the current price, reviews, and sales signals for this product across several e-commerce platforms.”
  • “Inspect this wallet's recent on-chain activity and summarize it by protocol and asset type.”
  • “Combine company information, recent news, and market data into a current company brief.”

Avoid hard-coding a provider operation name in the prompt. The AgentKey catalog evolves, so allowing find_tools to select a capability from the complete user request is generally more reliable than fixing the workflow to one interface.

Troubleshooting

The plugin is Mounted, but AgentKey tools are missing

Check the tool allow/deny policy of the active preset, session, or subagent. The home patch makes the MCP Client available for profile composition, but it does not force every context to expose every tool. Then inspect the MCP connection logs and confirm that authentication and tool synchronization completed successfully.

DSH returns 401

The local Bearer key may be missing or invalid. Run the authentication command again to rotate the key and replace the managed configuration block:

npx -y @agentkey/cli --auth-login --only dsh

DSH reports serverName already in use

An older preset or session may still contain another MCP Client using serverName: agentkey. Run the current CLI again so it can handle legacy configuration. If an existing session already loaded the old preset, close that session or restart DSH once.

The configuration is not where you expected

Check whether DSH_HOME is set. When it is not set, DSH defaults to ~/.dsh. The CLI prints the actual destination in its success summary; treat that path as authoritative.

A remote or headless environment cannot open the browser

Use no-browser mode so the CLI prints the authorization URL and a QR code:

npx -y @agentkey/cli --auth-login --only dsh --no-browser

Conclusion

A useful agent is more than a model that can generate an answer. It also needs a reliable runtime, clear tool boundaries, traceable execution, and a way to reach live information outside its training data.

DSH turns models, tools, skills, sessions, sandboxes, and UI components into a composable harness. AgentKey turns fragmented external data APIs into capabilities an agent can discover and call dynamically. Together, they preserve the openness, observability, and configurability of DSH while reducing the effort required to add search, social, market, commerce, business, and on-chain data.

If you are already experimenting with DeepSeek Harness, the simplest starting point is to install AgentKey and ask DSH a question that can only be answered with current information:

curl -fsSL https://agentkey.app/install.sh | bash -s -- --only dsh

That is the step from an agent that “knows a lot” to one that can connect to the world and get work done.

References