# Harbor > Agent-native context infrastructure. Your agent never asks twice — Harbor remembers across sessions, learns which fields matter, and controls what each agent sees. ## What is Harbor? Harbor is open-source agent middleware that sits between your AI agents and the APIs they call. It connects via MCP and does three things: 1. **Your agent never asks twice** — Call 1: raw data. Call 5: raw data + context from every previous session. Harbor injects past analysis automatically — no code change, no manual recall. 2. **47 fields in, 3 fields out** — Your agent calls an API. It returns 47 fields. Your agent uses 3. After a few calls, Harbor learns which 3 — and only sends those. 3. **You decide what each agent sees** — Agent A gets full price data. Agent B gets a one-line summary. Same API, same call. One policy file. Harbor works with Claude Code, Gemini CLI, Cursor, Codex, Minimax, and any MCP-compatible client. ## Key capabilities - **Cross-agent memory**: Agent A saves an insight → Agent B picks it up automatically in the next session. No code change. Harbor injects context into `meta.context` automatically. - **Schema learning**: After a few calls, Harbor learns which fields the agent actually uses and only sends those. 47 fields in, 3 fields out. - **Credential isolation**: Harbor holds API keys in its credential store (AES-256-GCM encrypted for cloud sync). Agents connect via MCP and never see raw secrets. - **Response normalization**: Every API response becomes `data[]` + `meta{}` + `errors[]`. One format, any data source. - **Field-level access control (Govern)**: Controls which fields enter the context window. Agent A sees full data, Agent B sees a summary. One policy file. - **MCP proxy**: Wrap any existing MCP server with Harbor in one line — no code changes needed. ## Three pillars 1. **Normalize** — Every API response becomes a consistent shape (`data[]` + `meta{}` + `errors[]`). 2. **Curate** — Harbor learns what fields matter via `harbor_learn_schema`. Four density layers: raw, normalized, compact, summary. 3. **Govern** — Field-level access control. Controls what each agent sees. Agents that can't see a field can't leak it. ## Quick start Install: ``` curl -fsSL https://harbor.oseaitic.com/install | bash ``` Or paste this into any MCP-compatible agent: ``` Set up Harbor for this project — instructions at github.com/oSEAItic/harbor/blob/main/AGENTS.md ``` ## Architecture ``` Agent (Claude Code / Gemini CLI / Cursor / any MCP client) ↓ MCP protocol Harbor CLI (local) or Harbor Cloud (synced) ↓ connector binary External API (CoinGecko, GitHub, Slack, any REST API) ``` Harbor never calls an LLM internally. The connected agent IS the LLM. The agent teaches Harbor what matters, and Harbor remembers permanently. ## Comparison | Feature | Harbor | Plain MCP server | Composio | Mem0 | |---------|--------|-----------------|----------|------| | Cross-agent memory | Yes | No | No | Yes | | Schema learning | Yes | No | No | No | | Field-level govern | Yes | No | No | No | | Credential isolation | Yes | Varies | Yes | No | | Agent-agnostic | Yes | Yes | Partial | Partial | | Open source | Apache 2.0 | Varies | Partial | Partial | ## FAQ ### What is Harbor? Harbor is open-source agent middleware that provides shared memory, credential isolation, and schema learning for AI agents. It connects via MCP and works with Claude Code, Gemini CLI, Cursor, Codex, and any MCP-compatible client. ### How does Harbor handle API credentials? Harbor holds API keys in its credential store. Agents connect to Harbor via MCP and never see raw API keys. This prevents credential leakage through prompts or plaintext config files. For cloud sync, credentials are encrypted client-side with AES-256-GCM. ### How does cross-agent memory work? When an agent calls `harbor_remember`, the note is stored and attached as `meta.context` to every future call to that connector. Any agent — regardless of model or session — receives this context automatically. What Claude learns, Gemini knows. ### How does schema learning work? When an agent calls `harbor_learn_schema`, it tells Harbor which fields matter for a given connector. Harbor remembers permanently. Every future call — by any agent — is automatically curated to only include relevant fields. 47 fields in, 3 fields out. ### Does Harbor work with OpenClaw? Harbor connects via MCP natively, but any agent that can make function calls can use Harbor. MCP-compatible agents connect instantly. Other agents can call Harbor's CLI or use its standard JSON tool-call interface. ### Does Harbor call any LLM internally? No. Harbor never calls an LLM. The connected agent IS the LLM. The agent teaches Harbor what matters via `harbor_learn_schema`, and Harbor remembers permanently. ### What is the license? Apache 2.0. Fully open source. ### Who builds Harbor? Harbor is built by oSEAItic (https://github.com/oseaitic). ## Links - Website: https://harbor.oseaitic.com - GitHub: https://github.com/oSEAItic/harbor - Agent documentation: https://github.com/oSEAItic/harbor/blob/main/AGENTS.md - Connector spec: https://github.com/oSEAItic/harbor/blob/main/docs/CONNECTOR_SPEC.md - llms-full.txt: https://harbor.oseaitic.com/llms-full.txt