# Connect Tileward Context and Governance in about a minute Recipes for connecting Tileward Context, which keeps a long conversation small, and Tileward Governance, which refuses an off-policy prompt before the model sees it, to 28 chat clients, editors, agent frameworks and gateways. Both use the same API key. The page also has the endpoint table: which address wants which credential. Page: https://tileward.com/docs/ ## The fast path: your agent's setup prompt The page offers a one-line setup prompt to paste into your agent. The agent fetches `tileward.com/agent-setup/prompt.md`, configures Tileward Context for whichever client you are in, and stops to ask you for an API key. Governance is added per client, from the step-by-step guides. ## Pick your client Each recipe lists what the client gets (Tileward Models, Context, Governance, Documents) and how it authenticates: a sign-in with Tileward, or an API key. Paste the recipe, then ask the model to remember something and recall it a turn later. Getting a key, signing in and watching the first call land all happen in the [console](https://app.tileward.com). ### Chat clients (8) - [Claude Code](https://tileward.com/docs/#connect-claude-code): Context and Documents. Sign-in or API key, added with `claude mcp add`. [Step-by-step guide](https://tileward.com/docs/claude-code/). - [Claude Desktop](https://tileward.com/docs/#connect-claude-desktop): Context and Documents. Sign-in or API key, in `claude_desktop_config.json` or `tileward.mcp.json` in your project root. - [Claude (web)](https://tileward.com/docs/#connect-claude-web): Context and Documents. Sign-in only, as a custom connector, plus an instruction for your Project instructions that keeps each chat on its own `conversation` id. - [ChatGPT](https://tileward.com/docs/#connect-chatgpt): Context and Documents. Sign-in only, as a custom connector, plus the same instruction in Personalisation → Custom instructions. [Step-by-step guide](https://tileward.com/docs/chatgpt/). - [Perplexity](https://tileward.com/docs/#connect-perplexity): Context and Documents. Sign-in only, as a custom connector, plus the same instruction in your Space instructions. - [LibreChat](https://tileward.com/docs/#connect-librechat): Context and Models. API key, under `mcpServers` in `librechat.yaml`. - [Open WebUI](https://tileward.com/docs/#connect-openwebui): Models. API key, as an OpenAI API connection with `OPENAI_API_BASE_URL=https://api.tileward.com/v1`. - [DeepSeek Harness](https://tileward.com/docs/#connect-deepseek-harness): Context and Documents. API key, one row in `cordis.patch.yml`; the tools arrive as `mcp__tileward__*`. ### Editors and IDEs (6) All connect with an API key. - [Cursor](https://tileward.com/docs/#connect-cursor): Context and Documents, in `.cursor/mcp.json`. - [VS Code · Copilot](https://tileward.com/docs/#connect-vscode): Context and Documents, in `.vscode/mcp.json`, whose wrapper key is `servers`, not `mcpServers`. - [Windsurf](https://tileward.com/docs/#connect-windsurf): Context and Documents, in `~/.codeium/windsurf/mcp_config.json`, with `serverUrl` in place of `url`. - [Zed](https://tileward.com/docs/#connect-zed): Context and Documents, under `context_servers` in `~/.config/zed/settings.json`. - [Cline · Roo Code](https://tileward.com/docs/#connect-cline): Context and Documents, in `cline_mcp_settings.json` with type `streamableHttp`. - [JetBrains AI](https://tileward.com/docs/#connect-jetbrains): Context and Documents, under Settings → Tools → AI Assistant → MCP. ### Agent frameworks (8) All use an API key against the OpenAI-compatible `https://api.tileward.com/v1`. - [OpenAI Agents SDK](https://tileward.com/docs/#connect-openai-agents): Models, Context and Governance. One `AsyncOpenAI` client per conversation, carrying an `X-Tileward-Conversation` header. - [LangGraph](https://tileward.com/docs/#connect-langgraph): Models and Context. `ChatOpenAI` with `X-Tileward-Conversation`, plus `X-Tileward-Actor`, which lands in your audit trail. - [LlamaIndex](https://tileward.com/docs/#connect-llamaindex): Models and Documents. `OpenAILike` with `X-Tileward-Conversation` in its extra headers. - [CrewAI](https://tileward.com/docs/#connect-crewai): Models and Governance. `LLM` with `model="openai/Tileward-Qwen3.6-35B-A3B"`. - [Pydantic AI](https://tileward.com/docs/#connect-pydantic-ai): Models and Governance. `OpenAIModel` with an `OpenAIProvider` at the Tileward base URL. - [Vercel AI SDK](https://tileward.com/docs/#connect-vercel-ai): Models and Context. `createOpenAI` with `baseURL` and an `X-Tileward-Conversation` header. - [Your own service](https://tileward.com/docs/#connect-custom-rest): Models, Governance and Context. Any HTTP client on `/v1/chat/completions`; `X-Request-Id` ties a retry to the attempt it retried, and sending `off` as the conversation keeps a turn out of the store. - [Guard endpoint](https://tileward.com/docs/#connect-guard-api): Governance. `https://api.tileward.com/v1/guard` answers allow or deny with no generation, decided by the key's own policy; refused requests cost no model tokens. ### Gateways and platforms (6) - [LiteLLM](https://tileward.com/docs/#connect-litellm): Models and Governance. API key, a `model_list` entry in `config.yaml` with `api_base: https://api.tileward.com/v1`. - [n8n](https://tileward.com/docs/#connect-n8n): Models and Context. API key, on an OpenAI credential with Base URL `https://api.tileward.com/v1`. Every workflow run on one credential shares one Context store; for per-run isolation, send `X-Tileward-Conversation` from a node that can set request headers. - [Kong AI Gateway](https://tileward.com/docs/#connect-kong): Models and Governance. API key, the `ai-proxy` plugin in `kong.yaml` with `upstream_url: https://api.tileward.com/v1/chat/completions`. - [Apigee](https://tileward.com/docs/#connect-apigee): Models. API key, a `TargetEndpoint` at `https://api.tileward.com/v1`, with the key stored in the encrypted KVM, not in the bundle. - [Machine-to-machine OIDC](https://tileward.com/docs/#connect-m2m): a client credentials grant at `https://context.tileward.com/mcp/connect`, for platform teams that cannot store a long-lived secret in config. Scope each call with `X-Tileward-Conversation`. - [Any other MCP client](https://tileward.com/docs/#connect-other): Context and Documents. API key, a generic MCP server descriptor with `url` set to `https://context.tileward.com` and an `X-Tileward-Conversation` header. ## Endpoints: which address, and what it wants Every recipe resolves to one of these. If a client asks for a "server URL", the Context address is the whole answer: one string, no path to append. | URL | Authentication | Use it from | |---|---|---| | `https://context.tileward.com` | API key, `Authorization: Bearer` | Tileward Context over MCP: every client you configure by file | | `https://context.tileward.com/mcp/connect` | Sign in with Tileward | Hosted connectors: ChatGPT, Claude, Perplexity | | `https://api.tileward.com/v1` | API key | OpenAI-compatible REST. Chat completions on `Tileward-Qwen3.6-35B-A3B`, and `/guard` for a decision with no generation | | `https://api.tileward.com/v1/guard/hook` | API key | Tileward Governance from a client hook, no local script | - Get an API key from the console under Settings → API keys. Governance also needs a policy bound to that key, because a key with no policy refuses nothing. - `api.tileward.com/mcp` is the same Context surface as the first row and stays served, so older configs keep working. ## Sign in with Tileward A hosted connector has no config file and no place for a bearer token, so it signs in instead: the client opens Tileward in your browser, you sign in, and it keeps a token of its own, with nothing to paste and no client ID to create. - A sign-in gives you Context and Documents on your own account, one grant per device. Disconnect a device from Context → Connected apps in the console. - A browser sign-in cannot carry a topic policy. Governance is bound to a key, so a governed client, and anything running in CI, in a container or on a headless box, uses a key. Software that runs server-side always uses a key. ## Where each piece runs, and what it sees - Governance decides before the model reads a word: the prompt is checked against the topics you have locked, and a locked one is refused before inference and recorded in the audit. It checks the prompt, not the commands an agent runs afterwards. - Governance works wherever the client offers a hook that runs before the model sees the text. Today that is the coding agents: Claude Code, OpenAI Codex, and any harness with a pre-prompt hook. Chat surfaces such as ChatGPT and Claude Desktop connect to Context. - Context scopes every remember and recall to the `conversation` argument each tool call carries, so one thread's material stays out of another's. In an MCP client the model supplies that argument; for a boundary that does not depend on the model, give each project its own key, and recall then cannot cross projects. - Only what you send leaves your machine. Context holds the turns you ask it to remember and the queries you recall with; Governance sees the prompt text under check. None of it is used for training, ever. ## Related - [Tileward in Claude Code](https://tileward.com/docs/claude-code/): Context plus the Governance hook, and managed settings - [Tileward in OpenAI Codex](https://tileward.com/docs/codex/): Context in `config.toml` plus the Governance hook - [Tileward in ChatGPT](https://tileward.com/docs/chatgpt/): Context as a custom connector - [pip install tileward](https://tileward.com/docs/cli/): the `twcli` command and the Python library behind it - [Voice calls](https://tileward.com/docs/voice/): the WebSocket address, the audio format and the close codes - [Console](https://app.tileward.com): keys, policies and connected apps