> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Agent Hub

> Shared MCP, memory, and skills for ollama launch agents — one Arka-managed hub that Claude Code, Hermes, OpenClaw, and other agents can consume.

The **Arka Agent Hub** is a shared interoperability layer for coding agents launched via `ollama launch`. Arka does not patch or fork external agents. Instead, it exports canonical config files, merges MCP into known agent paths when you opt in, and sets environment variables that any agent can read.

## What gets shared

| Hub path                                  | Source                    | Purpose                                     |
| ----------------------------------------- | ------------------------- | ------------------------------------------- |
| `~/.config/arka/hub/mcp.json`             | `~/.config/arka/mcp.json` | Single MCP config (Cursor-compatible)       |
| `~/.config/arka/hub/memory/summary.json`  | unified memory + sessions | Lightweight facts and session index         |
| `~/.config/arka/hub/memory/context.md`    | unified memory + sessions | Human-readable context bundle               |
| `~/.config/arka/hub/memory/README.md`     | generated                 | How each agent should load context          |
| `~/.config/arka/hub/skills/manifest.json` | `discover_skills()`       | Installed Arka skills other agents can read |
| `~/.config/arka/hub/skills/INSTALL.md`    | generated                 | Skill install instructions                  |
| `~/.config/arka/hub/launch.env`           | generated                 | Sourceable env contract for any agent       |
| `~/.config/arka/hub/agents.json`          | static registry           | Agent catalog + last sync timestamps        |

## Quick start

```bash theme={null}
# Export-only sync (v1 behavior — no agent config writes)
arka agent_hub sync

# Full unification: merge MCP into agent configs + memory tails
arka agent_hub sync --unify

# List supported ollama launch agents
arka agent_hub list

# Launch with shared env vars (syncs first by default)
arka agent_hub launch claude
arka agent_hub launch hermes
arka agent_hub launch openclaw

# Probe which agent configs exist on this machine
arka agent_hub detect

# Show per-agent MCP merge status
arka agent_hub adapters
arka agent_hub tools

# Import memory export back into Arka
arka agent_hub import-memory path/to/export.json

# From MCP: list IDE memory sources, then import
arka mcp call arka arka_agent_hub --args '{"action":"memory_sources"}'
arka mcp call arka arka_agent_hub --args '{"action":"import_memory","all":true}'

# Check sync state and unify status
arka agent_hub status

# Verify ollama + hub paths + per-agent unify status
arka agent_hub doctor
```

From fish:

```fish theme={null}
arka agent_hub sync
arka agent_hub sync --unify
arka agent_hub detect
arka agent_hub launch claude
source ~/.config/arka/hub/launch.env
```

Natural language:

```fish theme={null}
agent "sync agent hub"
agent "launch claude code"
agent "shared mcp for agents"
agent "detect agent hub configs"
```

## Full unification (v2)

**Export-only** (`agent_hub sync`) copies hub files and writes `launch.env` — safe, no external config changes.

**Full unification** (`agent_hub sync --unify`) additionally:

1. **MCP merge** — Adds hub `mcpServers` into each agent's known config path (creates file if missing). Existing user servers are preserved unless you pass `--replace`.
2. **Memory bundle** — Writes `context.md`, `memory/README.md`, and optionally copies the tail of OpenClaw `MEMORY.md` into `hub/memory/openclaw_memory_tail.md`.
3. **Skills docs** — Writes `skills/INSTALL.md` with manifest paths and env vars.
4. **Launch contract** — Regenerates `launch.env` with the full env var set.

```bash theme={null}
# Safe merge (add missing MCP servers only)
arka agent_hub sync --unify

# Destructive: replace agent MCP with hub servers
arka agent_hub sync --unify --replace
```

Before `--unify` runs, Arka auto-backs up your config directory to `config/backups/arka-config-YYYY-MM-DD.tar.gz` (default on). Disable with `ARKA_CONFIG_BACKUP_ON_UNIFY=0`, or run `arka config backup` manually anytime.

Use `agent_hub detect` to see which config files exist locally, `agent_hub adapters` to see what would merge or is already merged, and `agent_hub tools` to list exported MCP servers without exposing credentials.

## Supported agents

| Key         | Name                 | Launch command            |
| ----------- | -------------------- | ------------------------- |
| `claude`    | Claude Code          | `ollama launch claude`    |
| `codex-app` | Codex App            | `ollama launch codex-app` |
| `hermes`    | Hermes Agent         | `ollama launch hermes`    |
| `openclaw`  | OpenClaw             | `ollama launch openclaw`  |
| `opencode`  | OpenCode             | `ollama launch opencode`  |
| `codex`     | Codex CLI            | `ollama launch codex`     |
| `copilot`   | GitHub Copilot Agent | `ollama launch copilot`   |
| `droid`     | Droid                | `ollama launch droid`     |
| `pi`        | Pi Agent             | `ollama launch pi`        |

Each agent has documented MCP config paths (Cursor, Claude Desktop, `~/.codex/mcp.json`, etc.). `sync --unify` merges into all paths for that agent.

## Environment contract

When you run `agent_hub launch` or source `launch.env`, Arka sets:

| Variable               | Points to                                           |
| ---------------------- | --------------------------------------------------- |
| `ARKA_HUB_DIR`         | Hub root (`~/.config/arka/hub/`)                    |
| `ARKA_MCP_CONFIG`      | Hub MCP config                                      |
| `ARKA_MEMORY_DIR`      | Hub memory exports                                  |
| `ARKA_CONTEXT_MD`      | Human-readable `memory/context.md`                  |
| `ARKA_SKILLS_MANIFEST` | Skills manifest JSON                                |
| `ARKA_SKILLS_DIR`      | Skills directory                                    |
| `MCP_CONFIG`           | Same as `ARKA_MCP_CONFIG` (for agents that read it) |

Agent-specific aliases (only where documented):

| Agent                    | Extra variable                       |
| ------------------------ | ------------------------------------ |
| OpenClaw                 | `OPENCLAW_MCP_CONFIG` → hub MCP path |
| Claude / Codex / Copilot | `ARKA_SKILLS_DIR` for plugin dirs    |

```bash theme={null}
source ~/.config/arka/hub/launch.env
```

## Memory import

Import memory **into Arka** from hub exports, session notes, or IDE-specific stores (Cursor rules, Codex `AGENTS.md`, OpenClaw `MEMORY.md`, and more). Imported text passes through Arka security gates before writing to unified memory or session notes.

### CLI

```bash theme={null}
# Explicit JSON or markdown export
arka agent_hub import-memory ~/.config/arka/hub/memory/summary.json
arka agent_hub import-memory ./notes.md
```

### MCP (Cursor, Claude Code, VS Code)

Use `arka_agent_hub` from any connected MCP client:

```json theme={null}
{ "action": "memory_sources" }
```

Returns importable files grouped by source id, for example `arka_session`, `cursor`, `arka_hub`, or `agent:openclaw`.

```json theme={null}
{ "action": "import_memory", "source": "cursor" }
{ "action": "import_memory", "source": "agent:claude" }
{ "action": "import_memory", "all": true }
{ "action": "import_memory", "path": "/path/to/export.json" }
```

Typical workflow:

1. Call `memory_sources` to see which IDE files exist on this machine.
2. Import one source (`source`) or everything detected (`all: true`).
3. Confirm with `arka memory status` or `arka_recall` from MCP.

From the terminal:

```bash theme={null}
arka mcp call arka arka_agent_hub --args '{"action":"memory_sources"}'
arka mcp call arka arka_agent_hub --args '{"action":"import_memory","all":true}'
```

### Supported IDE memory locations

| Source id        | IDE / agent       | Paths scanned                                           |
| ---------------- | ----------------- | ------------------------------------------------------- |
| `arka_session`   | Arka              | `~/.config/arka/agent-memory/MEMORY.md`                 |
| `arka_hub`       | Arka Hub export   | `hub/memory/summary.json`, `hub/memory/context.md`      |
| `cursor`         | Cursor            | `~/.cursor/rules/*.mdc` (user rules directory)          |
| `vscode_copilot` | VS Code / Copilot | `~/.github/copilot-instructions.md`                     |
| `agent:openclaw` | OpenClaw          | `~/.openclaw/MEMORY.md`, `~/.config/openclaw/MEMORY.md` |
| `agent:claude`   | Claude Code       | session `MEMORY.md`, Claude project files               |
| `agent:codex`    | Codex CLI / App   | `~/.codex/AGENTS.md`                                    |

Only files that exist locally are returned by `memory_sources`. Empty files are skipped with an error in the import result.

### Formats

| Format                   | Behavior                                                                     |
| ------------------------ | ---------------------------------------------------------------------------- |
| JSON (`summary.json`)    | Imports `facts` into unified memory and `long_term_notes` into session notes |
| Markdown (`.md`, `.mdc`) | Each non-empty bullet or line becomes a long-term session note               |

## MCP adapters

`agent_hub sync` writes **snippet files** under `~/.config/arka/hub/adapters/` showing how to merge hub MCP servers into Cursor or Claude Desktop configs.

With `--unify`, Arka merges hub servers directly into each agent's documented MCP paths (add-only by default).

To fully overwrite agent MCP with hub servers:

```bash theme={null}
arka agent_hub sync --unify --replace
```

Legacy `--force` still merges into Cursor/Claude Desktop adapter targets.

## Scoped export (edge / ClawBox)

On always-on edge devices (Jetson Orin, ClawBox), limit what the hub exports so shared context does not become shared trust:

```env theme={null}
ARKA_MEMORY_TRUST_MAX=team
ARKA_HUB_MEMORY_SCOPE=team:clawbox
```

| Setting                 | Effect                                                                      |
| ----------------------- | --------------------------------------------------------------------------- |
| `ARKA_MEMORY_TRUST_MAX` | Caps recall and hub export to `global`, `team`, `workflow`, or `run` tier   |
| `ARKA_HUB_MEMORY_SCOPE` | Filters hub `summary.json` / `context.md` to one team (e.g. `team:clawbox`) |

**Recommended edge pattern:**

```bash theme={null}
# Export-only — no writes to agent configs
arka agent_hub sync

# Do NOT run sync --unify on edge unless you intend to merge MCP into agent configs
source ~/.config/arka/hub/launch.env
```

Hub exports include `trust_tier` and `provenance` on facts plus a `scratchpad_preview` for scoped workflow memory.

Create a scoped team from template:

```bash theme={null}
arka team create clawbox --template clawbox-edge
```

## Related guides

* [MCP integration](/guides/mcp) — configure servers in `~/.config/arka/mcp.json`
* [Memory](/guides/memory) — unified memory layers exported to the hub
* [Skills](/guides/skills) — plugins listed in the skills manifest
* [OpenClaw-inspired features](/guides/openclaw-features) — session memory and skill gates
* [Hermes-inspired features](/guides/hermes-features) — channel sessions and sub-agents


## Related topics

- [MCP integration for Cursor and Claude](/guides/mcp.md)
- [Arka — AI terminal agent documentation](/index.md)
- [How to code with Arka](/guides/code-with-arka.md)
- [Agent Teams](/guides/agent-teams.md)
- [Long-term memory with Supermemory sync](/guides/memory.md)
