DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to run a production agent with swappable model providers with Octop Harness

Build one deepagents-based agent that can switch between OpenAI, Anthropic, Bedrock, and preset providers.

Short answer: Confirm Python 3.12 or newer is installed; then install the package with pip install octop-harness; export your provider API key as an environment variable in your shell. All steps.

Credentials. Model provider API keys are read from your environment, so keep them out of source code and shared workspace files.

Who it is forA Python developer who needs an agent in production and wants to change model providers without rewriting the agent.

The problemWiring a model, tools, and checkpoints into a deployable agent takes many decisions, and locking into one provider makes switching costly.

The outcomeA working HarnessAgent that answers prompts through a model chosen by configuration, with failures raised as exceptions for the host to handle.

What you need first

  • Python 3.12 or newer
  • An API key for at least one model provider (OpenAI, Anthropic, AWS Bedrock, or an OpenAI-compatible endpoint)

Steps

  1. Confirm Python 3.12 or newer is installed.
  2. Install the package with pip install octop-harness. (inferred, check the README)
  3. Export your provider API key as an environment variable in your shell.
  4. Run octop-harness init to create an agent workspace. (inferred, check the README)
  5. Create a HarnessAgent through HarnessAgentManager, send a prompt with call(), and wrap the call in exception handling.

Prompt for your agent

In the TencentCloud/octop-harness repo, create a HarnessAgentManager with one agent that uses the model provider <provider>. Send the prompt <prompt> through call() and return the reply. Verify the reply is non-empty and that exceptions from call() are caught.

Caveat. The README does not give the exact pip install command, so the install step above is inferred and should be checked against the project's install docs.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for TencentCloud/octop-harness and "Run a production agent with swappable model providers"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer