OpenClaw architecture

A self-hosted gateway that connects the chat apps you already use to AI coding agents.

What is OpenClaw?

OpenClaw is an open-source, self-hosted gateway that sits between everyday chat applications and AI coding agents. Instead of driving an agent from a terminal, you talk to it from a chat client, and the gateway you run handles the connection, the conversation state, and access to the underlying agent.

Because you host it yourself, the questions that matter about OpenClaw are architectural ones. Which component terminates the inbound chat connection? Where does conversation state live? How do plugins extend the gateway without forking it? Which parts reach out to external AI providers, and what does that mean for secrets and network access? Those answers are spread across the repository rather than written down in one place.

The architecture map on this page is what JigsawML produced by analysing the OpenClaw repository. It groups the code into the components that actually exist, draws the dependencies between them, and lets you drill into any component to see the code behind it.

Key components in the OpenClaw architecture

JigsawML identified and labelled these components automatically by analysing the OpenClaw repository. Open the interactive map to expand any of them and read the underlying code.

  • Gateway Runtime

    The core runtime that accepts inbound chat traffic and coordinates every other component.

  • Chat Flows

    Conversation handling — how incoming messages are interpreted and turned into agent work.

  • AI Provider

    The integration layer that talks to upstream AI model providers.

  • Plugin System

    Extension points that let the gateway be customised without modifying the core.

  • Client Apps

    The chat-side clients and surfaces that connect into the gateway.

  • CLI Onboarding

    Command-line setup and configuration paths used to stand up an instance.

  • Media Processing

    Handling for attachments and non-text media that arrive in conversations.

  • Infrastructure Security

    Authentication, secrets handling, and the guardrails around a self-hosted deployment.

  • Testing QA

    The test suites and quality tooling that cover the runtime.

  • External Services

    Third-party services the gateway depends on at runtime.

Explore the OpenClaw architecture map

The map is live and interactive - pan, zoom, drill into a component, and ask questions about how OpenClaw fits together. No login required.

Open the OpenClaw map

How this map was generated

JigsawML ingested the public repository, resolved its dependencies, and grouped the code into architectural components using AI agents and a knowledge graph. Nothing here was drawn by hand. The same process runs against private repositories and cloud accounts, and re-runs on every commit so the map never goes stale.

Map your own codebase

Other open-source architectures