Claude Code usage

Openclaw Claude Bridge

HTTP bridge powering OpenClaw's AI agents via Claude Code CLI — manages persistent sessions, auto-resume, extended thinking, and provides a real-time React dashboard with per-agent cost tracking. Exposes an OpenAI-compatible API.

151 stars 24 forksUsage & cost trackers Source

Install

From source
git clone https://github.com/shinglokto/openclaw-claude-bridge.git

From the README

openclaw-claude-bridge

繁體中文 | English

An OpenAI-compatible HTTP proxy that lets OpenClaw agents use Claude through Claude Code CLI — with tool calling, session memory, and extended thinking.

Why This Exists

OpenClaw speaks the OpenAI API format. Claude Code CLI speaks its own format. This bridge sits in between and translates — so your OC agents can talk to Claude without either side needing to change.

Key principle: The bridge never executes tools. It only translates. OpenClaw owns the tool loop.

Quick Start

How It Works

Request Flow

1. OpenClaw sends a standard OpenAI chat completion request (messages, tools, model)
2. Bridge translates the messages into Claude CLI's text format and injects tool-calling instructions into the system prompt
3. Claude CLI processes the request and streams back a response
4. Bridge parses the response — if Claude wants to call a tool, it converts the  XML into OpenAI's tool_calls format; otherwise it returns clean text
5. OpenClaw either executes the requested tools and sends another request, or delivers the final answer to the user

Session Memory

Each agent in each conversation gets its own persistent Claude CLI session. This means Claude remembers previous messages without the bridge needing to resend the full history every time.

The routing key is channel + agent name, so agents in the same channel never interfere with each other.

Session state survives restarts — mappings and request history are saved to state.json and restored on startup. Stale sessions (where the CLI session file no longer exists) are automatically pruned.

For more details on the three-tier session lookup and edge cases, see docs/architecture.md.

Tool Calling

The bridge reads the tools array from OpenClaw's request and dynamically generates…
Read the full README on GitHub

Details

Language
JavaScript
License
MIT
Last updated
13 April 2026
Topics
ai-agentsclaudeclaude-codecli-wrapperdiscordnodejsopenclaw

FAQ

What is Openclaw Claude Bridge?

HTTP bridge powering OpenClaw's AI agents via Claude Code CLI — manages persistent sessions, auto-resume, extended thinking, and provides a real-time React dashboard with per-agent cost tracking. Exposes an OpenAI-compatible API. It is a usage for Claude Code, from shinglokto/openclaw-claude-bridge on GitHub.

How do I install Openclaw Claude Bridge?

Clone shinglokto/openclaw-claude-bridge from GitHub and follow the setup steps in its README.

Is Openclaw Claude Bridge popular?

shinglokto/openclaw-claude-bridge has 151 GitHub stars and 24 forks. It was last updated on 13 April 2026.

More usage & cost trackers

Browse the most popular Claude Code mods, all usage & cost trackers, or the skills and MCP server directories.