Back to home

loopwithai

LoopWithAI

Multi-agent DeepSeek Harness workbench with switchable Pi, OpenAI Codex, Claude Code, and native DeepSeek Agent Loops.

Stars
1
Language
TypeScript
Created
Aug 12, 2026
Updated
Aug 15, 2026

Introduction

LoopWithAI otter logo

LoopWithAI

A multi-agent workbench for DeepSeek Harness.

Run Pi, OpenAI Codex, Claude Code, or the native DeepSeek Agent Loop in one local Web UI.

简体中文 · DeepSeek Harness · Quick start

DeepSeek Harness Node.js 24+ TypeScript Local first

LoopWithAI turns DeepSeek Harness into a local multi-agent coding workbench. It keeps Harness's native Cordis plugin architecture and makes its Agent Loop replaceable, so you can switch between Pi Coding Agent, OpenAI Codex, Claude Code, and the original DeepSeek Agent Loop without adding an ACP gateway or a separate driver layer.

Pi is the default Agent. Every runtime keeps its native model access, tools, approvals, MCP configuration, skills/extensions, and local authentication.

DeepSeek Harness is currently a developer preview. LoopWithAI follows its plugin APIs closely, so breaking upstream changes may require an update.

Why LoopWithAI

  • One DeepSeek Harness, multiple Agents — change the active Agent Loop from the composer instead of moving between separate terminal apps.
  • Native integrations — Pi uses its TypeScript SDK, Codex uses codex app-server, Claude Code uses the Agent SDK, and DeepSeek uses Harness's original Agent Loop.
  • Models and Thinking controls — choose the provider/model and supported reasoning level directly beside the prompt.
  • Full coding tools — read, bash, edit, write, project instructions, skills, extensions, MCP servers, and approval flows remain available where the selected Agent supports them.
  • Local-first credentials and sessions — tokens remain in the native Pi, Codex, Claude Code, or environment stores. LoopWithAI does not run a hosted credential gateway.
  • Workspace continuity — reopen the last Workspace automatically; a fresh install starts at ~/.lwa/workspace.
  • Proxy support — use terminal environment variables, the macOS system proxy/Clash, a manual HTTP proxy, or force direct connections.
  • Vite development workflow — client-side workbench controls update with HMR while Harness remains running.

Supported Agents

AgentIntegrationAuthenticationNative capabilities retained
Pi (default)@earendil-works/pi-coding-agent SDKAccounts panel, pi /login, or ~/.pi/agentmodels/providers, tools, skills, extensions, sessions, Thinking levels
DeepSeekoriginal @deepseek-ai/dsh-agent-loopDEEPSEEK_API_KEY and normal Harness settingsoriginal Harness Agent Loop and DeepSeek models
OpenAI Codexcodex app-server --stdioexisting codex login sessiontools, MCP, sandbox, approvals, threads, models, reasoning effort
Claude Code@anthropic-ai/claude-agent-sdkexisting Claude Code login or Anthropic environmentClaude Code tool preset, settings, skills, plugins, MCP, permissions

LoopWithAI replaces the single process-wide Agent Loop transactionally through Cordis Loader. A blank conversation switches immediately. If the current conversation already has history, the UI asks for confirmation and opens a new conversation in the same Workspace, preventing a silent mid-session runtime change.

Quick start

Requirements:

  • Node.js 24 or newer
  • npm and Git
  • credentials for whichever Agent you want to use

Clone, install, and start:

git clone https://github.com/loopwithai/LoopWithAI.git
cd LoopWithAI
npm install
npm run dev

Or use one shell command:

git clone https://github.com/loopwithai/LoopWithAI.git && cd LoopWithAI && npm install && npm run dev

Open http://127.0.0.1:3210. npm run dev also starts the Vite HMR server on port 5174.

For a production-style local start without the Vite development server:

npm start

Sign in to an Agent

Pi

Select Pi, then open Accounts beside the composer. The Web flow supports the OAuth providers exposed by Pi, including ChatGPT/OpenAI Codex and Anthropic. You can also authenticate in the terminal:

pi
# then run /login

Pi continues to own its configuration and credentials under ~/.pi/agent. LoopWithAI never returns raw tokens to the browser.

OpenAI Codex

Install and sign in with the official OpenAI Codex CLI, then select Codex in LoopWithAI:

npm install -g @openai/codex
codex login

LoopWithAI starts codex app-server --stdio when needed and reuses the CLI's existing local login. Set CODEX_BINARY only if your codex executable is not on PATH.

Claude Code

Authenticate with Claude Code normally, then select Claude Code:

npm install -g @anthropic-ai/claude-code
claude

The runtime uses the Claude Agent SDK and your normal Claude Code settings. Standard Anthropic environment credentials also continue to work.

Native DeepSeek Agent Loop

Export your DeepSeek key before starting LoopWithAI:

export DEEPSEEK_API_KEY="your-api-key"
npm run dev

Harness also supports its normal credential/settings layers. DEEPSEEK_BASE_URL can override the public DeepSeek endpoint when required.

Using the workbench

  1. Choose or add a Workspace. On startup, LoopWithAI restores the last valid Workspace; otherwise it creates ~/.lwa/workspace using the operating system's home directory.
  2. Select Pi, DeepSeek, Codex, or Claude Code in the composer.
  3. Select an available model and provider.
  4. Select a Thinking level when the model exposes one.
  5. Choose the Workspace access/approval mode and send your prompt.
  6. Answer tool or permission requests in the Harness UI when the Agent asks.

Runtime, provider, model, and reasoning provenance are kept separately in assistant records so the source remains clear when work is replayed.

Network proxy and Clash

Open Settings → Proxy:

  • Auto (default) checks LOOPWITHAI_PROXY, then HTTPS_PROXY, HTTP_PROXY, ALL_PROXY and their lowercase variants. On macOS, it also detects the current system HTTP/HTTPS proxy, including a Clash system proxy.
  • Manual uses the http:// or https:// proxy URL entered in the UI and overrides automatic detection. Example: http://127.0.0.1:7897.
  • Off forces direct connections and removes inherited proxy variables from Agent child processes.

Changes apply to subsequent requests without restarting Harness. NO_PROXY/no_proxy is preserved. Proxy passwords are treated as write-only secrets and are never returned to the browser. SOCKS and PAC URLs are not supported yet; use the HTTP or mixed port exposed by Clash.

Development

npm run dev        # DeepSeek Harness + Vite HMR; Pi is the default Agent
npm start          # build plugins and run Harness without Vite
npm run build      # build all Agent plugins and validate the Harness profile
npm test           # run unit and integration tests with fake/local providers
npm run typecheck  # strict TypeScript checks
npm run check      # vendor checks + tests + typecheck + production build

The generated Harness patch uses checkout-relative file URLs, so the repository can be cloned into any directory, including paths containing spaces. Host-side TypeScript changes require restarting Harness; changes to packages/agent-loop-selector/src/client.ts are hot-replaced by Vite.

Architecture

DeepSeek Harness Web + Cordis
└── agent-loop-runtime (transactional Loader entry)
    ├── Pi Agent Loop          — direct Pi TypeScript SDK
    ├── DeepSeek Agent Loop    — original Harness plugin
    ├── Codex Agent Loop       — codex app-server protocol
    └── Claude Code Agent Loop — Claude Agent SDK
apps/harness-web/              portable Harness profile and local launcher
packages/agent-loop-selector/  runtime/model/Thinking controls and Loader switch
packages/agent-loop-pi/        Pi SDK AgentFactory and Harness event bridge
packages/agent-loop-codex/     Codex app-server AgentFactory
packages/agent-loop-claude/    Claude Agent SDK AgentFactory
packages/network-proxy/        process-wide proxy service and Settings UI

The older event-sourced Loop prototype remains parked under apps/web and packages/core; it is not the default product surface and is not part of the current development focus.

Security and privacy

  • The workbench runs locally and does not proxy Agent traffic through a LoopWithAI cloud service.
  • Runtime credentials remain in their native local stores or environment variables.
  • Credential APIs expose status and safe model metadata, never raw secret values.
  • Tool execution and network access still depend on the selected Agent and the approval mode you choose.

Built on

Contributing

Issues and pull requests are welcome. Please run npm run check before opening a pull request and keep new Agent integrations inside the native DeepSeek Harness/Cordis Agent Loop plugin boundary.

License status

The project owner has not selected a license for LoopWithAI yet. Until a LICENSE file is added, do not assume reuse or redistribution rights beyond applicable copyright law. Third-party components retain their own licenses; see THIRD_PARTY_NOTICES.md.

LoopWithAI is an independent project and is not affiliated with DeepSeek, OpenAI, Anthropic, or the Pi maintainers.