# Tilde > Tilde is a governed hub for AI agents. You build agents in the framework you already use, register them in the Tilde Agent Registry, and route every chat message, tool call, LLM request, prompt, skill, and trace through one gateway. Tilde comes in three editions that share one gateway, one SDK, and one agent model: - Tilde OSS: the open-source gateway and SDKs, Apache 2.0, at https://github.com/trytilde/tilde. You host it yourself, at your own risk. - Tilde Cloud: Tilde hosted by Tilde. You run only your agents. - Tilde Enterprise: Tilde on-prem, with 24/7 support and onsite deployment assistance. Operator roles (RBAC), management API keys, and OIDC configuration are Cloud and Enterprise only. Signing in to tools with Tilde's own OAuth apps is Cloud only. Security middleware is Enterprise only today, and coming soon to OSS and Cloud. Key facts for agents: - Agents expose no endpoints. The Tilde SDK dials out to the gateway over HTTP/2 with a deployment token, and each invocation gets a short-lived, capability-scoped token. - Agents hold no provider keys. Build model clients from `inference(name)`; the gateway injects credentials and records usage and cost. - Core SDKs: `@trytilde/sdk` (TypeScript) and `trytilde` (Python). Framework adapters exist for the Vercel AI SDK, Mastra, LangChain and LangGraph, the OpenAI Agents SDK, Pydantic AI, Agno, and CrewAI. - `tilde deploy` registers a deployment and the prompts, bundled tools, and skills declared in the agent's code. Define agents at module scope so it can find them. - Replies go out only through channel tools such as `sendMessage`. Model text is private. - Tilde stores traces and logs itself, in ClickHouse, and can forward OTLP to your collector. --- # Tilde Source: https://trytilde.ai/docs/ Register agents built in any framework, and govern every agent, user request, credential, tool call, and LLM request from one place. You build agents in the framework you already use and register them in the [Agent Registry](/agent-registry). From then on, the Tilde gateway sits between each agent and everything it touches. Chat messages, tool calls, LLM requests, logs, and traces all flow through one governed hub. Tilde comes in three editions: open-source **Tilde OSS**, hosted **Tilde Cloud**, and on-prem **Tilde Enterprise**. They share one gateway, one SDK, and one agent model. Learn how agents connect to Tilde and what flows through the gateway. Compare the editions, and choose one. ## What Tilde gives you Store encrypted credentials for chat, tool, and inference providers. Give agents managed tools, MCP servers, and your own tool servers. Version the prompts in your code, and see how each version performs. Give agents reusable skills from code, Git, the catalog, or the editor. Run Vercel AI SDK, Mastra, LangChain, OpenAI Agents, and more on Tilde. Route messages from Slack, WhatsApp, email, and your own apps to agents. Proxy LLM requests, keep provider keys out of agents, and enforce budgets. Control what operators, agents, and end users can do. Encryption, short-lived tokens, middleware, audit data, and network exposure. Review every conversation, run, tool call, and model call. Deploy the gateway and your agents on Kubernetes, ECS, or Lambda. Sign operators in with your identity provider, and control access with roles. ## How the pieces fit ![Tilde gateway deployed inside your on-prem environment, with infrastructure and agents on the left and ingress on the right](/images/gateway.drawio.svg) The gateway is a single Docker container. With Tilde OSS and Tilde Enterprise, you run it next to your databases. With Tilde Cloud, Tilde runs it. In every edition, agents run as separate containers or Lambda functions and dial out to it. Users and chat providers reach agents only through the gateway's ingress. ## Where to start Sign up for Tilde Cloud, or follow [Deploy the gateway](/deployment/gateway) to run Tilde OSS or Tilde Enterprise yourself. Add [connections](/connections) for your [inference providers](/inference-providers) and [chat channels](/chat-channels). Wrap your agent with the [adapter for your framework](/frameworks/overview), and [deploy it](/deployment/direct-agents). Register each release from your [CI pipeline](/deployment/ci-cd). --- # OSS, Cloud, and Enterprise Source: https://trytilde.ai/docs/editions Compare Tilde OSS, Tilde Cloud, and Tilde Enterprise: who runs the gateway, which features each edition includes, and how to choose. Tilde comes in three editions. They share one gateway, one SDK, and one agent model, so an agent you build for one edition runs on the others unchanged. - **Tilde OSS** is the open-source gateway and SDKs, under the Apache 2.0 license. You run it yourself. The source is in [trytilde/tilde](https://github.com/trytilde/tilde). - **Tilde Cloud** is Tilde, hosted by us. You run only your agents. - **Tilde Enterprise** is Tilde on-prem. You run the gateway in your own infrastructure, with the controls a larger organisation needs. ## Who runs what | | Tilde OSS | Tilde Cloud | Tilde Enterprise | | --- | --- | --- | --- | | Gateway, UI, and APIs | You | Tilde | You, on-prem | | PostgreSQL, ClickHouse, and object storage | You | Tilde | You, on-prem | | Envelope encryption key | You | Tilde | You, in your KMS | | Your agents | You | You | You | | Where conversations and traces live | Your infrastructure | Tilde Cloud | Your infrastructure | In every edition, agents dial out to the gateway and expose no endpoints. See [Agent Registry](/agent-registry). ## Self-hosting Tilde OSS Tilde is open source and freely available for anyone to host themselves. We include a Docker Compose file in the [tilde repository](https://github.com/trytilde/tilde), under an Apache 2.0 license, as guidance for self-hosting. Essentially, self-hosting Tilde means you run or purchase your own infrastructure, manage deployments, choose your own URLs to expose it on, and deal with any scaling issues yourself. The self-hosted version is the same product we run on Tilde Cloud, though our infrastructure is very different to support production volume. All changes go through our standard CI/CD pipeline before they ship to Tilde Cloud and become available for self-hosted instances. Because we don't manage self-hosted instances or provide paid support plans for them, we don't offer any sort of guarantees around Tilde working in certain ways on your infrastructure, and you assume all responsibility and risk for your use of the product and the stack. Tilde is a complex product to run. The gateway depends on PostgreSQL, ClickHouse, S3-compatible storage, an OpenTelemetry collector, and a GitHub token, and each needs to be secured, backed up, monitored, and upgraded. For production, we recommend Tilde Cloud or Tilde Enterprise. - Choose **Tilde Cloud** if you want Tilde to run the platform for you. - Choose **Tilde Enterprise** if you must run Tilde on-prem. We support Enterprise deployments in your infrastructure. ## Feature comparison Almost every feature is in all three editions. The differences are in how operators sign in and what they may do. | Feature | Tilde OSS | Tilde Cloud | Tilde Enterprise | | --- | --- | --- | --- | | Hosted by Tilde | No | Yes | No | | On-prem deployment | Self-hosted, at your own risk | No | Yes | | 24/7 support | No | Yes | Yes | | [Agent Registry](/agent-registry), deployments, and [routing](/routing) | Yes | Yes | Yes | | [Framework integrations](/frameworks/overview) | Yes | Yes | Yes | | [Connections](/connections) and [secret encryption](/security/secret-encryption) | Yes | Yes | Yes | | [Tools](/tools/overview) | Yes | Yes | Yes | | [Prompts](/prompts/overview) | Yes | Yes | Yes | | [Skills](/skills/overview) | Yes | Yes | Yes | | [Chat channels](/chat-channels) | Yes | Yes | Yes | | [Inference providers](/inference-providers) and budgets | Yes | Yes | Yes | | [Agent capabilities](/iam#agent-capabilities) and [end-user access](/iam#end-user-access) | Yes | Yes | Yes | | [Security middleware](/security/middleware) | Soon | Soon | Yes | | [Sessions](/sessions), [traces](/traces), and [logs](/integrations/opentelemetry) | Yes | Yes | Yes | | [Direct](/deployment/direct-agents) and [sidecar](/deployment/sidecar-agents) agents | Yes | Yes | Yes | | [Operator roles (RBAC)](/operator-access#operator-roles) | No | Yes | Yes | | [Management API keys](/operator-access#management-api-keys) | No | Yes | Yes | | [OIDC sign-in configuration](/operator-access#sign-in-with-your-identity-provider) | No | Yes | Yes | | [Sign in to tools with Tilde's OAuth apps](/tools/management) | No | Yes | No | Pages and sections that apply only to some editions carry a [CLOUD] or [ENTERPRISE] tag. Everything without a tag is in every edition. ## How Tilde OSS differs Tilde OSS has no operator roles, no management API keys, and no OIDC sign-in configuration. In practice: - The UI and management API have no sign-in, and anyone who reaches them has full access to the installation. You must protect them with a reverse proxy or another authentication method. See [Protect the UI and management API](/deployment/gateway#protect-the-ui-and-management-api). - Your CI pipeline registers deployments with the agent's own deployment registration key, from the agent's **Capabilities** and **Deployment** tabs. See [Release agents from CI](/deployment/ci-cd). - Agent capabilities still apply in full. Agents act only within what you grant them. ## Choose an edition | Choose | When | | --- | --- | | **Tilde OSS** | You want to evaluate Tilde, or contribute to it, and you are comfortable running and supporting it yourself. | | **Tilde Cloud** | You want Tilde without running the gateway and its databases, and your data may live in Tilde's cloud. | | **Tilde Enterprise** | Conversations, credentials, and traces must stay in your infrastructure, or you need role-based access for many teams. | --- # Agent Registry Source: https://trytilde.ai/docs/agent-registry Register agents built in any framework, and route every request, tool call, and LLM request through the gateway. Centralise agent governance through predictable policy management. ## Supported frameworks You build agents in the framework you already use. Tilde provides a core SDK in TypeScript and Python, plus an adapter package for all major frameworks. See [Framework integrations](/frameworks/overview) for how each one works, and which features it supports. | Framework | Adapter package | | --- | --- | | Vercel AI SDK | `@trytilde/sdk-vercel-ai-node` | | OpenAI Agents SDK | `@trytilde/sdk-openai-agents-node` | | Mastra | `@trytilde/sdk-mastra-node` | | LangChain and LangGraph | `@trytilde/sdk-langchain-node` | | Framework | Adapter package | | --- | --- | | LangChain and LangGraph | `trytilde-langchain` | | Agno | `trytilde-agno` | | OpenAI Agents SDK | `trytilde-openai-agents` | | Pydantic AI | `trytilde-pydantic-ai` | | CrewAI | `trytilde-crewai` | Tilde is framework agnostic. If your framework is not on this list, you can still use the core SDK today, and we can add an adapter for it. Each adapter converts Tilde message history, tools, and skills into the framework's own types, and registers the framework's prompts at deploy time. The core SDK has one contract, `run(context)`, and depends on no agent framework. ## What the SDK does The Tilde SDK wraps your agent and turns it into a deployable unit. You can ship it in two ways: - **A standalone container** that runs on any platform that supports Docker containers, such as Kubernetes or Amazon ECS. - **An AWS Lambda function** that the gateway invokes on demand. Once you register the agent, Tilde acts as a secure proxy and central hub. Three kinds of data start flowing through it: - Every request to the agent, from any [chat channel](/chat-channels). - Every sensitive side effect, such as [tool calls](/tools/overview) and requests to [LLM providers](/inference-providers). - The [prompts](/prompts/overview) and [skills](/skills/overview) the agent uses, versioned with each deployment. - All logs, traces, and other instrumentation that describe the agent's health. See [Sessions](/sessions) and [Traces](/traces). ## Agent lifecycle ![Sequence of an agent connecting to the Tilde gateway, registering, receiving an invocation with a short-lived token, and proxying tool calls, LLM requests, and telemetry back through the gateway](/images/agent-lifecycle.drawio.svg) On deployment, your agent exposes no endpoints. It opens a secure HTTP/2 stream to the Tilde gateway, or to its [sidecar](/deployment/sidecar-agents). When the stream is established, Tilde marks the deployment as connected. After the agent reports healthy, [routing](/routing) sends new conversations to it. Every request to your agent reaches the gateway first. The gateway issues a short-lived, signed token and forwards the token and the request to the agent over the HTTP/2 stream. The agent uses the token to proxy all tool calls and LLM inference requests, and to send OpenTelemetry logs and traces. The token lasts minutes, and the SDK renews it while the invocation is active. All responses stream back through the gateway to the end user. ## Why Tilde works this way The agent container never exposes an HTTP endpoint, so there is nothing on it to attack. The agent also holds no provider credentials. That leaves one place to govern [IAM](/iam), [security middleware](/security/middleware), [secrets](/security/secret-encryption), and [budgets](/inference-providers#budgets): the gateway. A policy change applies to every agent at once, whatever framework it uses. ## Next steps Connect your first agent to the gateway. Register deployments from your pipeline. --- # Anatomy of an agent Source: https://trytilde.ai/docs/anatomy-of-an-agent What a Tilde agent is made of: your framework code, the Tilde SDK, and a container. A Tilde agent has three parts: - **Your agent code**, written in the framework you already use. - **The Tilde SDK**, which connects your code to the gateway and gives it an invocation context. - **A container or Lambda function** that packages the two. Your code contains no chat provider integration, no provider API keys, and no HTTP server. The gateway supplies all three at runtime. ## Example agent This agent uses the Vercel AI SDK. It is two small files: one connects to Tilde, and one defines the agent and handles a single invocation. ```typescript src/index.ts import { connectAgent } from "@trytilde/sdk"; import { respond } from "./agent.js"; // `tilde deploy` loads this module to find the agent's prompts, // tools, and skills. Export what it should register. export { agent } from "./agent.js"; // Dial out to Tilde. `connectAgent` reads TILDE_GATEWAY_URL and // TILDE_DEPLOYMENT_TOKEN, opens an outbound HTTP/2 stream, and // sends ready heartbeats. This process listens on no port. // Under `tilde deploy`, it starts nothing. const connection = connectAgent({ // Tilde calls `run` once for each invocation, with a fresh // context. run: respond, onRegistered: (registration) => console.log("Agent is ready", registration.deploymentId), }); // On shutdown, stop taking work and let active invocations // finish and report. Your orchestrator sends SIGTERM during a // rollout. for (const signal of ["SIGINT", "SIGTERM"] as const) process.once(signal, () => void connection.close()); ``` ```typescript src/agent.ts import { inference, type AgentContext } from "@trytilde/sdk"; import { convertToAiSdkMessages, tildeAiSdk, tildeCallOptions, } from "@trytilde/sdk-vercel-ai-node"; import { createOpenAI } from "@ai-sdk/openai"; import { APICallError, ToolLoopAgent, convertToModelMessages, stepCountIs, } from "ai"; // `inference` returns a base URL for Tilde's inference gateway // and a placeholder API key. The gateway swaps in the real // provider credential, so this process holds no key. Each // request resolves to the invocation that makes it. const openai = createOpenAI(inference("openai/production")); // A plain AI SDK agent, defined once. `tilde deploy` registers // its instructions as a versioned prompt. export const agent = new ToolLoopAgent({ id: "support-agent", instructions: [ "You are a support assistant.", "Use the current channel tools to respond to the latest message.", "Model text is private and is not delivered to the user.", ].join(" "), model: openai.responses("gpt-4o-mini"), // Let the model call tools, read results, and call again. stopWhen: stepCountIs(8), maxOutputTokens: 600, // Record model calls in the Tracing tab. experimental_telemetry: { isEnabled: true, functionId: "support-agent" }, // Lets each call carry Tilde's tools, skills, and new input. ...tildeCallOptions, }); // Handle one invocation. export async function respond(ctx: AgentContext) { try { // 1. Load the conversation from Tilde, and convert it into // AI SDK messages. Attachments are downloaded for you. const history = await ctx.message.history(); const messages = await convertToAiSdkMessages({ messages: history.items, context: ctx, }); // 2. Call the model. `tildeAiSdk` adds the channel's tools, // such as sendMessage, the agent's Tilde tools, and its // skills. Each tool call runs through the gateway, which // checks the agent's capabilities and records it. It also // stops the call when a user interrupts or an operator // stops the run. await agent.generate({ messages: await convertToModelMessages(messages), ...tildeAiSdk(ctx), }); } catch (error) { // Provider error bodies can contain sensitive details. // Log only the status. const status = APICallError.isInstance(error) ? error.statusCode : undefined; if (ctx.signal.aborted) console.warn("Invocation cancelled"); else console.error("Invocation failed", { status }); const suffix = status ? ` (${status})` : ""; throw new Error(`Agent run failed${suffix}`); } } ``` ```dockerfile Dockerfile FROM node:22-slim AS build WORKDIR /app COPY package.json pnpm-lock.yaml ./ RUN corepack enable && pnpm install --frozen-lockfile COPY . . RUN pnpm build FROM node:22-slim WORKDIR /app ENV NODE_ENV=production COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/dist ./dist USER node # No EXPOSE: the agent only dials out. CMD ["node", "dist/index.js"] ``` The container needs two environment variables, `TILDE_GATEWAY_URL` and `TILDE_DEPLOYMENT_TOKEN`. See [Deploy direct agents](/deployment/direct-agents). ### The invocation context Everything your agent does during an invocation goes through `ctx`. It is bound to one invocation, and carries that invocation's short-lived token. | Member | Purpose | | --- | --- | | `ctx.message.history()` | The conversation so far, paginated, with attachments. | | `ctx.channel.current` | The tools of the channel the message arrived on, such as `sendMessage`. | | `ctx.inference(name)` | Client settings for an assigned [inference connection](/inference-providers). The module-level `inference(name)` resolves to the running invocation. | | `ctx.tools` | The agent's [tools](/tools/overview), with their schemas. | | `ctx.skills` | The agent's [skills](/skills/overview), as a folder on disk or as tools. | | `ctx.prompt(definition)` | Renders a [prompt](/prompts/overview) you declared, and links it to the invocation's model calls. | | `ctx.goals`, `ctx.tasks` | The agent's own plan, shown in the [session](/sessions). | | `ctx.reason(text)` | Records a working note. It is never sent to the user. | | `ctx.signal` | Aborts when a user interrupts, or an operator stops the run. Pass it to model and tool calls. | | `ctx.stop()` | Ends the invocation. | The adapter package connects Tilde to the framework's own objects. `convertToAiSdkMessages` turns Tilde history into AI SDK messages, and `tildeAiSdk` adds Tilde's tools and skills to a call. You still call `generate`, `stream`, `generateText`, or `streamText` yourself. To use a framework with no adapter, read `ctx` directly inside `run`. See [Framework integrations](/frameworks/overview). ## Lifecycle of a request ![Sequence of one request: a message reaches the gateway, passes access checks and request guards, wakes the agent with a short-lived token, the agent calls the LLM through the gateway, replies through a channel tool, and the gateway applies response guards before delivery](/images/request-lifecycle.drawio.svg) A chat provider's webhook, or your own app through native chat, delivers the message to the gateway. The gateway checks that the sender can message this agent, runs [request guards](/security/middleware) in Tilde Enterprise, and picks a ready deployment. See [Routing](/routing). The gateway sends the invocation down the agent's open HTTP/2 stream, with a short-lived token. The SDK calls your `run` function. The agent reads the conversation history and the channel's tools through the gateway. The LLM request goes to the gateway with a placeholder key. The gateway injects the real credential, forwards the request, streams the response back, and records the usage. The agent calls the channel's send tool. The gateway checks the agent's [capabilities](/iam#agent-capabilities), runs response guards in Tilde Enterprise, and records the tool call. The gateway sends the reply through the provider's API, with the connection's credential. The SDK uploads logs and traces, and reports that the invocation ended. For a sidecar agent, the sidecar takes the gateway's place in steps 3 to 7, on loopback. ## Lifecycle of an agent An agent has many deployments over its life. Each deployment is one release of your container, registered in Tilde and tied to a commit. ![Two rows of steps. First deployment: build, register the deployment, roll out, connect, and serve. Deploying an update: build version two, register it, roll it out beside version one, route new conversations to it, drain version one, and retire it](/images/agent-deployment-lifecycle.drawio.svg) ### First deployment 1. **Build** the agent image from your Dockerfile. 2. **Register a deployment** with `tilde deploy`. Tilde registers the agent's prompts, tools, and skills with it, and returns a deployment token once. The deployment is registered but offline. 3. **Roll out** your replicas with the token. 4. **Connect.** Each replica dials the gateway and sends ready heartbeats. 5. **Serve.** Once a replica is ready, new conversations route to the release. ### Deploying an update An update is a new deployment of the same agent. You never replace a deployment in place. 1. **Build** the new image. 2. **Register** a second deployment. It has its own token. 3. **Roll out** the new release beside the old one. Both stay connected. 4. **Route.** In latest mode, new conversations go to the new release as soon as it is ready. In weighted mode, you send it a percentage first. 5. **Drain.** Conversations that started on the old release stay pinned to it, so keep it running until they end. 6. **Retire** the old deployment. Its token stops working. To roll back, promote the old deployment. It becomes the serving deployment again, and conversations pinned to the new release stay there. Automate these steps in your pipeline. See [Release agents from CI](/deployment/ci-cd). --- # Connections Source: https://trytilde.ai/docs/connections Connections store the encrypted credentials Tilde uses to reach chat, tool, and inference providers, and your own internal systems. A connection is a Tilde primitive used by chat, tool, and inference providers. It stores encrypted credentials and related metadata, so Tilde can integrate with third-party providers and with internal systems in your organisation. Agents never see a connection's credentials. They invoke tools, LLM providers and reverse proxies through the gateway and the gateway injects them before sending the requests upstream to the provider. ## Supported credential types Tilde supports every common secure credential type. | Credential type | Typical use | | --- | --- | | Static API keys and tokens | Provider API keys, bearer tokens, and custom header schemes such as `x-api-key`. | | HTTP Basic auth | A client ID and secret sent as a Basic authorization header. | | OAuth 2.0 authorization code | A user grants access in the browser, for confidential clients. | | OAuth 2.0 authorization code with PKCE | The same browser flow, with a proof key for public clients. | | OAuth 2.0 client credentials | Machine-to-machine access with no user present. | | OAuth 2.0 JWT bearer assertion | Tilde signs an assertion with your private key and exchanges it for a token. Used for service accounts. | | OAuth 2.0 refresh token | Tilde exchanges a stored refresh token for a new access token. | | AWS Signature Version 4 | An IAM access key, secret, and optional session token. Tilde signs each request, for example to Amazon Bedrock. | | Webhook signing secrets | Secrets and public keys that verify inbound provider webhooks. | ## Automatic token rotation Tilde rotates OAuth tokens for you. It refreshes each access token shortly before it expires, safely across gateway replicas, and encrypts the new tokens before it stores them. If a provider rejects a refresh, Tilde marks the connection as needing re-authorization, and shows that status in the UI until a user reconnects. ## Set up a connection Users create connections in the Tilde UI. Tilde runs each provider's setup in a hosted broker frame, and only that frame holds the setup token. In **Connections**, choose a provider and name the connection. Tilde returns a short-lived setup link. Enter static credentials, or start the provider's OAuth flow. Tilde encrypts the credentials and marks the connection ready. ## Assign connections to agents A connection does nothing until you assign it to an agent. - Assign **inference** connections in the agent's **Inference** tab. See [Inference providers](/inference-providers). - Assign **channel** connections in the agent's **Chat providers** tab. See [Chat channels](/chat-channels). - Add **tool** connections in the agent's **Tools** tab. See [Manage tools](/tools/management). - Link **skills** to a connection, so every agent that uses it receives them. See [Manage skills](/skills/management#give-skills-through-a-connection). ## How credentials are protected Tilde encrypts every private connection value before it reaches PostgreSQL. See [Secret encryption](/security/secret-encryption) for the key hierarchy, the algorithms, and how decrypted values are handled in memory. --- # Tools Source: https://trytilde.ai/docs/tools/overview Give agents managed provider tools, MCP servers, your own tool servers, and tools bundled in their code, all authorized and audited by the gateway. Tools let an agent act: read a repository, send an email, query a CRM. In Tilde, the gateway executes most tool calls on the agent's behalf. It injects the credential from a [connection](/connections), checks the agent's [capabilities](/iam), and records the call. The agent never holds a provider credential. It receives tool definitions, and it calls them with its short-lived invocation token. ## Types of tools Tilde supports five kinds of tools. You can mix them on one agent. | Type | Where the code runs | Who holds credentials | Choose it when | | --- | --- | --- | --- | | **Managed tools** | Tilde | Tilde, encrypted in a connection | The provider is in the Tilde catalog, such as GitHub, Google Workspace, Slack, or Stripe. | | **MCP servers** | The upstream MCP server | Tilde, encrypted in a connection | You want to use an existing third-party or internal MCP server. | | **Tilde tool servers** | Your own process or AWS Lambda function | Tilde, if the server needs credentials | The tool should run apart from the agent, and be reusable across agents. | | **Bundled tools** | The agent process | You | The tool needs in-process state, or belongs to the agent's own code. | | **Built-in tools** | Tilde | Tilde | The agent needs to message other agents, search its thread, or find tools on demand. | ### Managed tools Managed tools are integrations that ship with Tilde. The catalog includes Google Workspace, GitHub, Slack, Sentry, PostHog, Firecrawl, Stripe, Tavily, E2B, Modal, AWS, and more. You connect an account once, and Tilde keeps the credential encrypted. It injects the credential only when it runs the selected tool. Some chat providers, such as GitHub, Slack, and WhatsApp, serve chat and tools from one connection. ### MCP servers An MCP server connection reaches an existing Streamable HTTP MCP server. The upstream server runs the tools. Tilde holds the OAuth, API key, or bearer credential, and stands between the agent and the server. The catalog includes curated servers such as Notion, Linear, HubSpot, Vercel, Neon, and Salesforce. An administrator can also add any other server by URL. Use this for internal MCP servers too. Your agents then reach them through one audited path, rather than each holding a credential. Tilde discovers a server's tools when a connection first lists them, and again when you refresh them. Agents only receive the tools that Tilde discovered for their connection. ### Tilde tool servers A Tilde tool server is your own tool backend, written with the Tilde SDK. It runs in one of two ways: - **Self-hosted.** Your process dials out to the gateway with a tool server token, publishes its tools, and answers calls. Like an agent, it exposes no endpoint. - **AWS Lambda.** The gateway invokes your function by its ARN, with Tilde's AWS credentials. A tool server that needs credentials declares its own sign-in, such as an API key or OAuth with your own client. Each account a person connects is an **instance** of the server. Tilde verifies the credentials with your server, stores them encrypted, and sends them with every call on that instance. ```typescript Tool server import * as z from "zod"; import { createToolHost, defineAuth } from "@trytilde/sdk/tool-host"; const auth = defineAuth({ provider: { id: "example-crm", name: "Example CRM" }, methods: { api_key: { name: "API key", schema: z.object({ api_key: z.string().min(1) }), }, }, async verify({ api_key }) { return { accountLabel: await lookUpWorkspace(api_key) }; }, }); // Dials out with TILDE_TOOL_HOST_TOKEN. Nothing calls this process. createToolHost({ auth, tools: { search_customers: auth.tool({ description: "Find customers whose name or email contains the query.", summary: "Searched customers", inputSchema: z.object({ query: z.string() }), annotations: { readOnly: true }, // `ctx.auth` holds the credentials of the instance the agent called. run: ({ query }, ctx) => searchCustomers(ctx.auth.api_key, query), }), }, }); ``` The Python SDK provides the same API in `tilde.tool_hosts`. ### Bundled tools Bundled tools are tools you write in the agent's own code, with your framework's native tool type. They run in the agent process, and Tilde never executes them. Tilde still knows about them. You declare them with `defineTools`, and `tilde deploy` registers them with each deployment. The agent's **Tools** tab then lists them before the agent first runs, and Tilde records every call. ```typescript bundled-tools.ts import { defineTools } from "@trytilde/sdk"; import { tool } from "ai"; import { z } from "zod"; export const bundledTools = defineTools({ roll_dice: tool({ description: "Roll dice and add them up.", inputSchema: z.object({ count: z.number().int().optional() }), // Shown in the session instead of the raw call. metadata: { tilde: { summary: "Rolled dice" } }, execute: async ({ count = 1 }) => rollDice(count), }), }); ``` Export the value from your entry module, and pass it to your framework adapter on each invocation. See [Framework integrations](/frameworks/overview) for each framework's helper. Bundled tools execute in the agent process. Tilde does not proxy them, so their credentials and other sensitive inputs remain your responsibility. Prefer managed tools, MCP servers, or tool servers for anything that touches a secret. If you remove every bundled tool from your code, the removed tools stop running from the next invocation. ### Built-in tools Tilde offers a small set of built-in tools, each only when the agent's capabilities allow it: - `agents.list`, `agents.message`, and `agents.wait` let an agent find other agents and talk to them. - `thread.participants` and `thread.search` let an agent read its conversation. - `tools.search`, `tools.schemas`, and `tools.execute` let an agent find and call tools on demand. See [Tool discovery](#tool-discovery). - `tools.result` returns the result of a background tool call. ## Use tools in an agent Your framework adapter merges every tool the agent can use into the framework's own tool list. That includes the channel's tools, such as `sendMessage`, the tools you chose for the agent, and its bundled tools. Each call to a remote tool runs through the gateway. To use tools without an adapter, read `ctx.tools` inside `run`. It holds the agent's tools with their schemas. ### Tool names A tool from a connection or tool server has a catalog name: the source's slug, a dot, and the tool name, such as `github.create_issue`. The slug is fixed when you add the source to the agent. Models accept tool names of up to 64 characters, from a limited character set. The SDK gives each longer or unusual name a stable alias for the model, and maps calls back to the catalog tool. ### Tool discovery Each agent uses one of two discovery modes: - **Listed directly.** The agent receives every tool's schema up front. This suits agents with a few dozen tools. - **Found by search.** The agent receives `tools.search`, `tools.schemas`, and `tools.execute`. It searches for tools and loads their schemas on demand, which keeps its context small. We recommend search for agents with many tools. Set the mode on the agent's **Tools** tab. It applies from the next run. ### Background tools Mark a tool as **Background** when it takes a long time. The agent receives a ticket straight away, and keeps working. The result arrives as new input, or through `tools.result`. Tilde aborts a background call that nobody collects after one hour. ## Use another agent as a tool Any registered agent can talk to another. The built-in `agents.message` tool sends a message, and `agents.wait` waits for the response. Grant the calling agent the `agents.invoke` capability for the target agent. ## Control tool access Tool access is deny by default. - **Tool selection.** An agent gets only the tools switched on for it on its **Tools** tab. See [Manage tools](/tools/management). - **Capabilities.** An agent can invoke only the tools named in its `tools.invoke` capability. Set it to none, all, or a selected list in the agent's **Capabilities** tab. See [IAM](/iam). - **Personal tools.** A chat user can connect their own account, for example their own Google account. The agent can use those tools only while it serves that user, and only with the `tools.personal` capability. - **Security middleware.** In Tilde Enterprise, text an agent sends through a channel tool passes through [response guards](/security/middleware) first. Tilde builds an agent's tool list once per invocation, and caches it for at most 15 minutes. Changes apply from the next invocation. Tilde checks credentials and tool server health on every call. Sidecar agents currently receive channel tools only. Other tools need a direct or Lambda agent. ## Audit tool calls Tilde records every tool call against the invocation that made it, including calls to bundled tools. Review calls in the agent's [Sessions](/sessions) tab, and their timing in [Tracing](/traces). The audit trail records tool input after security middleware has screened it. --- # Manage tools Source: https://trytilde.ai/docs/tools/management Connect tool accounts, add MCP servers and Tilde tool servers, and choose which tools each agent can use. You manage tools in two places. The **Tools** section holds the accounts and servers your installation can use. Each agent's **Tools** tab then picks which of them that agent uses. ## Connect a managed tool In **Tools**, select **Connections**, then **Tilde Catalog**. Filter by category, or search for a tool. Select a provider. Tilde shows the authentication methods it supports and the tools it offers. Select **Add account**, and choose an authentication method if there are several. Enter the credential, or complete the provider's OAuth flow. Tilde encrypts the credential, and OAuth tokens [rotate automatically](/connections#automatic-token-rotation). ### Sign in with Tilde's OAuth app [CLOUD] For Google, GitHub, and Sentry, Tilde Cloud can sign you in with Tilde's own OAuth app, so you do not need to register one. In Tilde OSS and Tilde Enterprise, you register your own OAuth app with the provider, and enter its client ID and secret during setup. ## Add an MCP server In **Tools**, select **Connections**, then **Add MCP server**. - **Choose existing** connects another account to a server that is already registered. - **Create new** registers a new server by URL. Only administrators can do this, because it adds a provider to the installation. When you create a server, choose how Tilde authenticates to it: | Method | How Tilde sends the credential | | --- | --- | | **No authentication** | No credential. | | **Sign in with OAuth** | An OAuth access token. Tilde discovers the server's authorization server, and registers a client for itself. | | **Bearer token** | An `Authorization: Bearer` header. | | **API key header** | A header you name, with an optional value prefix. | | **API key query parameter** | A query parameter you name. | Tilde dials every URL an MCP server supplies over HTTPS, to public addresses only. MCP servers you add appear under **Tools** > **Remote servers**, with 12 hours of health history. Tilde does not rediscover a server's tools in the background. Select **Refresh tools** on the connection after the server changes. ## Add a Tilde tool server In **Tools**, select **Connections**, then **Add Tilde tool server**, and choose how it runs. Name the server, and select **Add server**. Tilde shows a token once. Set it as `TILDE_TOOL_HOST_TOKEN` on your tool server, then start it. The server dials out, and publishes its tools. Rotate the token from the server's page. A server that stays silent for 30 seconds stops being offered to agents. Name the server, enter its **Function ARN**, and select **Add server**. The gateway invokes the function with its own AWS credentials, and asks it for its tools. Select **Refresh tools** after you deploy a new version. If the tool server declares its own sign-in, select **Add instance** on its page for each account. Tool servers sign in with your own OAuth client, over HTTPS. ## Choose an agent's tools Open the agent in the Agent Registry, and select **Tools**. Select **Add tool**. **Choose existing** adds a connection or tool server that you can view. **Connect a new tool** opens the catalog. A new source's tools start switched off. Switch on each tool the agent should use in the **Use** column. In **Displayed**, choose **Full**, **Summary**, or **Hidden**. This controls how the call appears in the session. Switch on **Background** for long-running tools. Select **Listed directly** or **Found by search**. See [Tool discovery](/tools/overview#tool-discovery). You can edit a tool's summary and description for one agent. Tilde marks the tool as edited, and leaves other agents unchanged. Bundled tools appear in a read-only **From code** group. The list comes from the serving deployment. The agent's **Deployment** tab lists the tools each deployment declared. Each connection's page lists the agents that use it under **Used by**. ## Who can manage tools [CLOUD][ENTERPRISE] Tilde Cloud and Tilde Enterprise control tool management with [operator roles](/operator-access). | Action | Needs | | --- | --- | | Add a tool source to an agent | `edit_tools` on the agent, and `view` on the connection or tool server. | | Remove a tool source, pick tools, or set the mode | `edit_tools` on the agent. | | Change, share, or delete a connection or tool server | `edit` or `share` on it. Rotating a tool server token counts as an edit. | | Register an MCP server by URL | Administrator. | The person who creates a connection or tool server becomes its editor. --- # Prompts Source: https://trytilde.ai/docs/prompts/overview Version the prompts in your agent's code, see which prompt version produced each model call, and compare cost and latency across versions. A prompt is a named piece of text that your agent sends to a model, such as its instructions or a task template. Tilde versions every prompt your agent ships, and links each model call to the prompt versions that produced it. Your code owns its prompts. You write them in your framework, as you do today. When you deploy, Tilde reads them from your code and registers any new versions. To change a prompt, you change the code and deploy again. ## What Tilde records Each distinct prompt text becomes an immutable version, identified by a hash. An unchanged prompt never creates a new version. | Field | What it holds | | --- | --- | | Name | A stable name, such as `support-agent/instructions`. | | Version | A number, such as v3, and a content hash. | | Template | The prompt text, with its sections. | | Config | Model settings you version with the text, such as the model and temperature. | | Variables | The names the template expects. | | Format | How the template marks variables. See [Formats](#formats). | | Origin | Where your code declares the prompt, such as `src/agent.ts#support.instructions`. | | First shipped by | The first deployment that shipped the version, and its commit. | ## How prompts are registered `tilde deploy` registers a deployment and its prompts in one step. `tilde deploy` loads your agent's entry module in discovery mode. The SDK starts nothing in this mode, so your agent does not connect or run. It collects each prompt you declared with `definePrompt`, and each prompt your framework adapter recognises, such as an agent's instructions. It registers the deployment with those prompts, and prints the deployment token. New text becomes a new version. Define your agents at module scope, and export them from the entry module, so discovery can find them. See [Release agents from CI](/deployment/ci-cd). ```bash npx tilde deploy dist/index.js --dry-run # print what would be registered python -m tilde deploy main.py --dry-run ``` ## Declare a prompt Framework adapters register your framework's prompts for you. Use `definePrompt` for prompts the adapter cannot find, or when you want variables and sections. ```typescript TypeScript import { definePrompt } from "@trytilde/sdk"; export const triage = definePrompt("triage", { template: "You triage requests for {{product}}.\n{{> tone}}", sections: { tone: "Be direct and warm." }, config: { model: "gpt-5", temperature: 0.2 }, }); // Inside run(ctx): const instructions = ctx.prompt(triage).render({ product: "Acme" }); ``` ```python Python import tilde TRIAGE = tilde.define_prompt( "triage", template="You triage requests for {{product}}.\n{{> tone}}", sections={"tone": "Be direct and warm."}, config={"model": "gpt-5", "temperature": 0.2}, ) # Inside run(ctx): instructions = TRIAGE.render(product="Acme") ``` `{{name}}` is a variable, and `{{> name}}` includes a section. Rendering fails if a variable is missing, or a section is not declared. ## Link model calls to prompts A successful `render()` marks that prompt version as active for the invocation. From then on, the SDK tags each LLM request with the active prompt versions. The gateway reads the tag, removes it, and records it with the request. Tilde also matches prompts it can see in the request itself. After each model call, the gateway compares the request's system, developer, and user messages with the text of the deployment's prompt versions. It does this off the request path, so matching adds no latency. For [sidecar agents](/deployment/sidecar-agents), the sidecar matches prompts locally. Request bodies never leave the sidecar. It sends the gateway only the matched prompt names and versions. Tilde matches OpenAI, Anthropic, Google Gemini, Amazon Bedrock, and Cohere request formats. A dynamic prompt can only be linked through its tag, because its text exists only at runtime. In [traces](/traces), spans from a stamped model call carry the prompt name and hash. ## Formats | Format | Variables | Typical source | | --- | --- | --- | | **Plain** | None | A fixed instruction string. | | **Mustache** | `{{name}}`, and `{{> section}}` includes | `definePrompt`, and Mustache templates in frameworks. | | **Braces** | `{name}` | Python format strings, LangChain f-string templates, and CrewAI YAML. | | **Dynamic** | Decided at runtime | Instructions written as a function. Tilde stores the function's source as the template. | Tilde reports some prompts as warnings, without versioning them. These include OpenAI hosted prompts, LangSmith Hub prompts, and Jinja2 templates. Their text lives outside your code. ## Limits | Limit | Value | | --- | --- | | Name | 1 to 128 characters: letters, digits, `.`, `_`, `/`, and `-`. | | Template | 256 KiB. | | Config | 64 KiB. | | Sections | 64 per prompt. | ## Next steps Review versions, compare them, and see their usage. See which prompts each framework adapter registers. --- # Manage prompts Source: https://trytilde.ai/docs/prompts/management Review each agent's prompt versions, compare them, see their cost and latency, and forget a prompt's history. Prompt management in Tilde is read-only. Your agent's code owns its prompts, and `tilde deploy` registers them. The Tilde UI shows what each deployment shipped, and how each version performed. ## Review an agent's prompts Open the agent in the Agent Registry, and select **Prompts**. Tilde lists every prompt the agent registered, with its latest version, format, variables, number of versions, and when it last changed. Select a prompt to open it. - **Versions** lists each version, with the commit that first shipped it. - The template shows the version's text and sections, its format, and its variables. A dynamic prompt shows the function source that renders it. - **Origin** shows where your code declares the prompt. - **First shipped by** links to the deployment that introduced the version. ### Compare versions Select **Compare with** a previous version to see a line-by-line diff of the two templates. ### See usage by version The usage table shows, for each version: | Column | What it shows | | --- | --- | | Requests | The model calls linked to the version. | | Input tokens and output tokens | Their token usage. | | Cost | Their cost, from Tilde's price list. | | Avg latency | Their average latency. | | Last used | When the version last produced a model call. | Use this to compare a new prompt with the one it replaced, after a [weighted rollout](/routing). ## See what a deployment shipped Open the agent's **Deployment** tab, and select a deployment. Tilde shows the prompts, skills, and tools that deployment registered from its code. ## Change a prompt Change the prompt in your code, and deploy. `tilde deploy` registers the new text as the next version, and the agent uses it once the new deployment serves traffic. To roll a prompt back, promote the previous deployment. See [Routing](/routing). ## Forget a prompt's history Select **Delete history** on a prompt to remove its versions and usage from Tilde. The code still owns the prompt, so the next `tilde deploy` registers it again, as a new first version. An agent can do the same at runtime with `ctx.prompts.delete()` in the TypeScript SDK, if you grant it the **Edit prompts** capability. ## Who can manage prompts [CLOUD][ENTERPRISE] Prompts have no roles of their own. They follow their agent's [operator roles](/operator-access). | Action | Needs | | --- | --- | | View an agent's prompts | `view` on the agent. | | Delete a prompt's history | `edit_prompts` on the agent. The agent editor role includes it. | ## Agent capabilities for prompts Grant these on an agent's **Capabilities** tab. See [IAM](/iam#capability-reference). | Capability | Lets the agent | | --- | --- | | `agents.read` | List other agents' prompts. An agent can always list its own. | | `agents.edit_prompts` | Delete the prompt histories of the selected agents, itself included. | --- # Skills Source: https://trytilde.ai/docs/skills/overview Give agents reusable instructions and files as Agent Skills, from your own code, from Git, from the Tilde catalog, or written in the Tilde editor. A skill is a folder of instructions and files that teaches an agent how to do one job, such as handling refunds or writing a release note. Each skill has a `SKILL.md` file, and any scripts, templates, or reference files it uses. Tilde uses the [Agent Skills](https://agentskills.io) format. An agent sees each skill's name and description up front, and reads the rest only when it needs it. You can give an agent many skills without filling its context. ```markdown SKILL.md --- name: refunds description: Issue a refund for a customer order. Use when a customer asks for their money back. --- 1. Find the payment for the order. 2. Check the refund policy in `policy.md`. 3. ... ``` ## Where skills come from Tilde groups skills into **sources**. The UI calls them groups. | Source | What it holds | Who edits it | | --- | --- | --- | | **Bundled** | Skills in the agent's own code. `tilde deploy` registers them with each deployment. | Your code. They are read-only in Tilde. | | **Catalog** | Built-in Tilde skills, and curated skills from trusted providers such as Anthropic, Microsoft, Cloudflare, AWS, Stripe, and Vercel. | Tilde syncs them. They are read-only. | | **Git** | Every `SKILL.md` in a GitHub repository, at a branch and optional path. | Your repository. They are read-only in Tilde. | | **Editor** | Skills written in the Tilde skill editor, or by an agent. | Operators and permitted agents. | Bundled skills belong to one agent, and are pinned to each deployment. A new deployment ships its own copy. All other sources are live: when a source changes, every agent that uses it receives the new version on its next invocation, with no redeploy. A bundled skill replaces an assigned skill with the same name. ## Bundle skills in your code Put each skill in its own folder, with a `SKILL.md`. Then declare the folder, so `tilde deploy` ships it. ```typescript TypeScript import { defineSkill, defineSkills } from "@trytilde/sdk"; // Every folder under ../skills that holds a SKILL.md. export const skills = defineSkills({ dir: new URL("../skills", import.meta.url), }); // Or one skill written in code. export const tone = defineSkill({ name: "reply-tone", description: "How to word replies to customers.", instructions: "Be direct and warm. Keep replies under 80 words.", }); ``` ```python Python import tilde # Relative to this file. SKILLS = tilde.define_skills("skills") ``` Frameworks with their own skills, such as Mastra, Agno, CrewAI, and OpenAI Agents with a shell tool, declare skills in the framework's own way. Their adapters register those skills for you. See [Framework integrations](/frameworks/overview). ## How agents receive skills Every invocation tells the agent which skills it has, and at which version. The SDK keeps the skills on local disk, in one folder for each agent. On each invocation it downloads only new or changed skills, and deletes removed ones. A skill is swapped in whole, so the agent never reads half of one. The SDK then gives the skills to your framework in one of two ways: - **Natively**, for frameworks that load skills from a directory. `ctx.skills.directory()` returns the folder. - **As tools**, for frameworks with no skills concept. The agent receives `list_skills` and `read_skill` tools, and a summary of its skills in its instructions. ```typescript Read skills directly const root = await ctx.skills.directory(); // skills on disk const all = await ctx.skills.list(); // names, descriptions, and files const body = await ctx.skills.read("refunds"); // SKILL.md text ``` ## Skills an agent manages itself With the right [capabilities](/skills/management#agent-capabilities-for-skills), an agent can manage skills at runtime through `ctx.skills`: - `assign` and `unassign` give skills to itself or other agents. - `write` saves a skill into an editor source, as its next version. - `sync` pulls the latest version of a Git or catalog source. These methods are available in the TypeScript SDK. ## Storage and limits Tilde stores small text files in PostgreSQL. It stores every other file, content addressed, in the skills bucket. See [Deploy the gateway](/deployment/gateway). | Limit | Value | | --- | --- | | Skill name | Lowercase letters, digits, `-`, and `_`. Unique within a source. | | `SKILL.md` | 1 MiB. | | Any other file | 10 MiB. | | Whole skill | 64 MiB, and 2,048 files. | | Paths | Relative paths only. No symlinks. | Each distinct set of files is an immutable version. Its hash covers each file's path, content, and executable bit. ## Next steps Add sources, edit skills, and give them to agents. See how each framework loads skills. --- # Manage skills Source: https://trytilde.ai/docs/skills/management Add skills from the Tilde catalog, Git, or the skill editor, and choose which skills each agent can use. You manage skills in two places. The **Skills** page holds every skill source in your installation. Each agent's **Skills** tab then picks which of them that agent uses. ## Add skills Open **Skills**. Tilde lists skills grouped by source, with each skill's description, version, and the number of agents that use it. Filter by **Catalog**, **Git**, or **Editor**. ### From the Tilde catalog Select **Tilde Catalog**. The catalog has two kinds of entry: - **Built into Tilde.** Skills that ship with Tilde, such as how to use channels, goals and tasks, and attachments. Tilde updates them when you upgrade. - **Managed provider.** Curated skills from a provider's GitHub repository, such as Anthropic, Microsoft, Cloudflare, AWS, Stripe, or Vercel. Preview a provider's skills, then select **Enable**. Tilde syncs a managed provider when you enable it, every hour, and when you select **Sync now**. ### From Git Select **Add from Git**, and enter: | Field | Value | | --- | --- | | **Name** | A name for the group. | | **GitHub repository URL** | `https://github.com//` | | **Branch** | Defaults to `main`. | | **Path** | Optional. Only skills under this folder are included. | Every folder with a `SKILL.md` becomes a skill, and owns the files beneath it. Tilde syncs the repository when you add it, every hour, and when you select **Sync now**. If a sync fails, Tilde shows the error on the group, and keeps the last good skills. A sync never replaces a newer commit with an older one. Tilde reads repositories with the gateway's GitHub token, so it can reach private repositories and avoid GitHub rate limits. Git sources support GitHub only. ### In the skill editor Select **Create in editor**. The editor shows the skill's files in a tree. Markdown opens in a rich text editor, and code in a code editor. You can add files and folders, upload files, rename, and delete. Edit the name and description at the top of the page. Tilde saves them to the `SKILL.md` front matter. A new name renames the skill. Changes save automatically about a second after you stop typing. Each save is the skill's next version. If someone else saved a newer version first, Tilde refuses your save and reloads the skill. Catalog, Git, and bundled skills are read-only in the editor. ## Give skills to an agent Open the agent in the Agent Registry, and select **Skills**. Select **Add skills**, then **Choose existing**, and pick a group. A new group starts switched off. Switch on the group in the **Use** column. The agent gets every skill in the group, including skills that a later sync adds. To leave out a skill, switch it off on its own row. Switching the group off and on again clears these choices. The tab also shows: - **Bundled** skills from the agent's serving deployment. They are always on. - Skills the agent receives through a connection, marked **via** that connection. Changes apply from the agent's next invocation. No redeploy is needed. ## Give skills through a connection You can link a group, or single skills, to a [connection](/connections). Every agent that holds the connection's skills capability then receives them, while the connection is ready. Use this to ship instructions with an integration. For example, link a skill that explains your ticket conventions to your Linear connection. On the **Skills** page, open a group's actions, select **Connections**, then **Link connection**. ## Share, sync, and delete groups Each group's row on the **Skills** page has these actions: - **Share** grants other people access to the group, in Tilde Cloud and Tilde Enterprise. - **Sync now** pulls the latest skills of a catalog or Git group. - **Connections** links the group to connections. - **Delete group** removes the group and its skills from every agent. ## Who can manage skills [CLOUD][ENTERPRISE] Tilde Cloud and Tilde Enterprise control skill management with [operator roles](/operator-access). Each group has its own reader and editor roles, and whoever adds a group becomes its editor. | Action | Needs | | --- | --- | | Add a group | Any signed-in user. A management API key needs `edit` on every group. | | Edit, sync, or delete a group or its skills | `edit` on the group. | | Give an agent skills | `edit_skills` on the agent, and `view` on the group. | | Remove skills from an agent | `edit_skills` on the agent. | | Link a group to a connection | `view` on the group. | ## Agent capabilities for skills Grant these on an agent's **Capabilities** tab. See [IAM](/iam#capability-reference). | Capability | Targets | Lets the agent | | --- | --- | --- | | `agents.edit_skills` | Agents | Assign and unassign skills on the selected agents, itself included. | | `skills.read` | Skill groups | See the selected groups, and assign their skills. | | `skills.edit` | Skill groups | Write skills into the selected editor groups, and sync Git and catalog groups. Includes `skills.read`. | An agent can always read its own skills. To read another agent's skills, it needs `agents.read`. In Tilde Cloud and Tilde Enterprise, you can grant `skills.read` or `skills.edit` only on groups you can view. An agent never reaches a group its granter cannot see. --- # Chat channels Source: https://trytilde.ai/docs/chat-channels Route messages and phone calls from Slack, WhatsApp, MS Teams, email, SMS, Telnyx Voice, GitHub, and your own apps to agents through the Tilde gateway. A chat channel connects a place where people talk to an agent. Every message arrives at the gateway first. The gateway checks who sent it, screens it, and only then delivers it to the agent. Replies travel back the same way. Agents do not integrate with chat providers themselves. They call one channel tool, and Tilde handles the provider's API, credentials, and webhooks. ## Supported channels | Channel | What it connects | Inbound delivery | | --- | --- | --- | | Slack | Channels, threads, and direct messages | Signed webhooks | | MS Teams | Teams channels and chats | Signed webhooks | | WhatsApp | WhatsApp Business conversations | Signed webhooks | | Telnyx WhatsApp | WhatsApp conversations through Telnyx | Signed webhooks | | Telnyx Voice | Realtime audio: inbound phone calls to an agent | Signed webhooks and a realtime WebSocket | | AgentMail | Email inboxes for agents | Signed webhooks | | Linq | iMessage, RCS, and SMS | Signed webhooks | | GitHub | Issues, pull requests, and comments | Signed webhooks | | Native Tilde chat | Your own web and mobile apps | An API with scoped tokens | ## Connect a channel In **Connections**, add the provider and complete its setup. See [Connections](/connections). Open the agent's **Chat providers** tab and assign the connection. Set the access mode to private, public, or disabled. See [End-user access](/iam#end-user-access). Copy the webhook URL that Tilde gives you into the provider's settings. Public chat providers deliver webhooks from the internet, so this one route needs a public HTTPS address. Nothing else does. See [Network exposure](/security/overview#network-exposure). Tilde verifies every webhook's signature, rejects anything that fails, and ignores duplicate deliveries. ## Build chat into your own app Native Tilde chat lets your own applications talk to agents without a third-party provider. | Package | Purpose | | --- | --- | | `@trytilde/chat-ui` | React components for conversations: history, live updates, attachments, replies, search, and read state. | | `@trytilde/chat-next` | Next.js integration. | | `@trytilde/chat-proxy` | A server-side proxy that authenticates your user, then replaces credentials and identity headers before it calls Tilde. | Your server authenticates the user and asks Tilde for an ingress token, optionally restricted to one thread. The browser never holds a management credential, and Tilde never trusts an identity that a browser supplies. ## Realtime voice Agents can take phone calls and speak in realtime. The **Telnyx Voice** channel connects a Telnyx phone number to an agent. Each call becomes a normal [session](/sessions), with the same access checks, audit trail, and review tools as a text conversation. We recommend a [sidecar deployment](/deployment/sidecar-agents) for voice agents. A caller hears every millisecond of delay. With a sidecar, runtime calls and LLM requests stay on loopback beside the agent, which gives the lowest latency between a caller finishing a sentence and the agent starting its reply. ### Voice profiles Voice settings belong to the agent. In the agent editor, select a voice profile, its models and voice, and a maximum call duration. | Profile | How it works | Use it when | | --- | --- | --- | | **Telnyx Conversation Relay** | Telnyx handles speech recognition and speech synthesis for the call. Tilde receives the caller's words as text, invokes your agent, and streams the agent's text reply back to Telnyx to be spoken. | You want phone calls with your existing text agent, tools, and model. This profile is phone-only. | | **Text agent with speech** | Tilde transcribes incoming audio, invokes your agent, and speaks its streamed text reply. | You want voice in your own app, with your existing text agent. | | **OpenAI Realtime** | A realtime model generates spoken responses directly. Tilde records the final transcripts. | You want the lowest latency and the most natural speech. | With the first two profiles, your agent code does not change. It receives each spoken turn as text, and replies through the same channel tool. The OpenAI Realtime profile uses its own configured instructions, and does not inherit your agent's tools. ### Connect Telnyx Voice You connect your existing Telnyx account, Voice API application, and phone number as a **Telnyx Voice** connection, and choose a default agent. Tilde can configure the Telnyx webhook for you, or give you the URL to set yourself. You then pick the agent's voice profile, transcription model, voice, and language in the agent editor. A live call is bidirectional, so Telnyx must reach your public ingress over HTTPS and a secure WebSocket. See [Network exposure](/security/overview#network-exposure). Conversation Relay needs no separate speech provider key. Your agent keeps using its own text model through an [inference provider](/inference-providers). ### How calls behave - **Interruptions.** Callers can interrupt the agent. Tilde records what the agent generated and what the caller actually heard, so the agent's next turn stays coherent. - **Duration.** Tilde ends a call at the agent's configured maximum duration. - **Recordings.** Tilde stores call transcripts in the session. It does not retain audio recordings. - **Caller identity.** A caller ID identifies the participant for [access control](/iam#end-user-access). It never authorizes access to a person's own tools. ## How messages are scheduled Each agent chooses what happens when a message arrives while it is still responding. Set this in the agent's **Capabilities** tab. | Mode | Behaviour | | --- | --- | | **Queue** | Finish the active response, then process each message separately. This is the default. | | **Interrupt** | Cancel the active response and start fresh work. | | **Queue and batch** | Combine pending messages into the next response. | Tilde owns this policy. Your agent code handles one invocation at a time and honours its cancellation signal. ## How agents reply An agent replies by calling the channel's send tool, such as `sendMessage`. Each provider owns its tool's schema and formats, so an agent on Slack can use Slack formatting, and an agent on email can set a subject. Model output is never sent automatically. A reply goes out only when the agent calls a channel tool. In Tilde Enterprise, it then passes through [response guards](/security/middleware) before it reaches the provider. ## Review conversations Every conversation is a session. Review its messages, reasoning, and tool calls in the agent's [Sessions](/sessions) tab. --- # Inference providers Source: https://trytilde.ai/docs/inference-providers Proxy every LLM request through Tilde, keep provider keys out of agents, track usage and cost, and enforce budgets. Tilde includes an inference gateway. Agents send LLM requests to Tilde in the provider's own wire format. Tilde swaps in the real credential, relays the request, and records the usage and cost. Your agent keeps its existing OpenAI, Anthropic, or Vercel AI SDK client. Only the base URL changes. ## Supported providers | Provider | Identifier | | --- | --- | | OpenAI | `openai` | | Anthropic | `anthropic` | | Azure OpenAI | `azure_openai` | | Azure AI Foundry | `azure_ai` | | Google AI Studio | `google_ai` | | Amazon Bedrock | `bedrock` | | Baseten | `baseten` | | Cerebras | `cerebras` | | Vercel AI Gateway | `vercel_ai_gateway` | | Cohere | `cohere` | | Voyage AI | `voyage` | Need a provider that is not listed? We add inference providers for individual enterprise deployments, including providers you reach through your own partner or commercial agreements. Amazon Bedrock accepts either a Bedrock API key or IAM credentials. With IAM credentials, Tilde signs each request with AWS Signature Version 4. ## How a request flows The agent sends the request to Tilde's inference route, with its invocation token. For a sidecar agent, this is the sidecar on loopback. Tilde verifies the token, and checks that you have assigned this connection to the agent. Tilde strips the agent's placeholder API key and adds the real credential from the [connection](/connections). The response streams straight back. The proxy is built to add minimal latency. Tilde records the model, token usage, and cost, off the request path. Direct and Lambda agents send requests to the gateway. Sidecar agents send them to their sidecar, which holds replicated credentials and calls the provider directly. See [Deploy sidecar agents](/deployment/sidecar-agents). ## Connect a provider In **Connections**, add the inference provider and enter its credential. The account name becomes part of the route. Open the agent's **Inference** tab and assign the connection. An agent can use only the connections you assign. Ask the invocation context for the connection's settings, and pass them to your model client. ```typescript Agent code const { baseURL, apiKey, fetch } = ctx.inference("openai/production"); const openai = createOpenAI({ baseURL, apiKey, fetch }); ``` The `apiKey` is a placeholder. Tilde replaces it on the server, so no real provider key ever reaches the agent. Tilde proxies chat, embeddings, reranking, token counting, image generation, transcription, and speech requests, including streaming responses. ## Usage and cost Tilde records every request with its agent, connection, model, token counts, and cost. Open the agent's **Inference** tab to see daily spend for each connection, and move between months. Tilde prices each request when it records it. Prices are in US dollars for each million tokens. Tilde ships with a model price list, keeps it current, and lets you override any model's price. The same usage data is available through the management API. ## Budgets A budget caps inference spend. Tilde tracks spend against it, and can cut off access when the budget runs out. | Setting | Options | | --- | --- | | **Scope** | An agent, optionally limited to one connection. Or an end-user identity, which caps what one person's conversations can spend. | | **Period** | Day, month, or total. | | **Action** | **Block** stops further requests. **Flag** records the spend and lets requests continue. | ### Set a budget In the agent's **Inference** tab, enter a monthly limit in the **Budget** column next to a connection. This creates a blocking monthly budget for that agent and connection. Use the management API for daily, total, flag-only, and identity budgets. ### What happens when a budget runs out When a blocking budget is exhausted, Tilde stops the agent's LLM requests through that connection, and they return `403`. A flag-only budget records the spend and lets requests continue. Access returns automatically when the budget's period rolls over. --- # Routing Source: https://trytilde.ai/docs/routing Control which deployment of an agent receives new conversations, with latest or weighted routing, conversation pinning, and sidecar failure policies. An agent can have several deployments at once, such as the current release and the one you are rolling out. Routing decides which deployment receives each conversation. Configure routing in the agent's **Deployment** tab, or through the management API. ## Routing modes | Mode | New conversations go to | Use it for | | --- | --- | --- | | **Latest** | The serving deployment. By default, that is the newest release. | Ordinary releases. | | **Weighted** | A deployment chosen at random, in proportion to the traffic weights you set. | Canary releases and A/B comparisons. | In weighted mode, you set a percentage for each deployment. A deployment with a weight of 0 receives no new conversations. You can mix deployment types freely. Weighted routing can split conversations between a sidecar release and a Lambda release of the same agent. ## Conversations stay pinned Tilde pins each conversation to the deployment that first handled it. Later messages in that conversation go to the same deployment, even after you change the routing mode or the weights. This keeps a conversation's behaviour consistent while you roll out a new release. It also means an old release keeps receiving traffic until its conversations end, so keep it running until they drain. ## Which deployments can receive traffic A deployment is routable only while it is healthy: - A gateway or sidecar deployment needs at least one connected instance that reports ready. Instances send heartbeats, so Tilde stops routing to a failed instance within seconds. - A Lambda deployment is routable as soon as you register it. The **Deployment** tab shows each deployment as **serving** when it is both selected by your routing mode and routable. A new release therefore takes no traffic until its replicas connect and report ready. Your agent can report its own readiness. Pass a readiness check to the SDK, and Tilde routes work only to instances where it passes. ## Promote and retire deployments - **Promote** makes a deployment the serving deployment in latest mode. Use it to roll back to an earlier release. - **Retire** takes a deployment out of service for good. Its token stops authenticating at once. Tilde refuses a retire that would leave an agent with no serving deployment. In latest mode, register another deployment first. In weighted mode, set the deployment's weight to 0 first. ## Sidecar failure policy Sidecar agents hold warm conversation state in memory, so you choose what happens when a replica fails mid-conversation. | Policy | Behaviour | | --- | --- | | **Reassign** | Tilde moves the conversation to another live replica of the same deployment. The interrupted run continues there. | | **Stop** | Tilde fails the interrupted run in place. Use this when a run must not execute twice. | With either policy, make your agent's external effects idempotent. --- # Framework integrations Source: https://trytilde.ai/docs/frameworks/overview How Tilde works with each agent framework, and which Tilde features each framework supports. You build agents in the framework you already use. Tilde provides a core SDK in TypeScript and Python, plus an adapter package for each supported framework. The adapter connects the framework's own objects to Tilde, so your agent code stays plain framework code. | Framework | TypeScript | Python | | --- | --- | --- | | [Vercel AI SDK](/frameworks/vercel-ai-sdk) | `@trytilde/sdk-vercel-ai-node` | | | [Mastra](/frameworks/mastra) | `@trytilde/sdk-mastra-node` | | | [LangChain and LangGraph](/frameworks/langchain) | `@trytilde/sdk-langchain-node` | `trytilde-langchain` | | [OpenAI Agents SDK](/frameworks/openai-agents) | `@trytilde/sdk-openai-agents-node` | `trytilde-openai-agents` | | [Pydantic AI](/frameworks/pydantic-ai) | | `trytilde-pydantic-ai` | | [Agno](/frameworks/agno) | | `trytilde-agno` | | [CrewAI](/frameworks/crewai) | | `trytilde-crewai` | Every framework has an example agent in the [Tilde open-source repository](https://github.com/trytilde/tilde). If your framework is not on this list, use the core SDK directly. Read the conversation, tools, and skills from `ctx` inside `run`. See [Anatomy of an agent](/anatomy-of-an-agent). ## What every adapter does Each adapter does the same five jobs, in the framework's own terms: 1. **Converts history.** It turns the Tilde conversation, with attachments, into the framework's message type. 2. **Adds tools.** It merges the channel's tools, the agent's Tilde tools, and your [bundled tools](/tools/overview#bundled-tools) into the framework's tool list. It records every call. 3. **Delivers skills.** It hands [skills](/skills/overview) to the framework's native skill loader, or adds them as tools when the framework has none. 4. **Passes new input.** When a user sends another message during a run, or the run is stopped, the adapter feeds it into the framework's loop. 5. **Registers prompts and tools at deploy.** `tilde deploy` asks the adapter for the framework's prompts, tools, and skills, and registers them with the deployment. Model calls go through Tilde's [inference gateway](/inference-providers). You build the framework's usual model client from `inference(name)`, which returns a gateway URL and a placeholder key. The gateway injects the real credential. ## Feature compatibility | Feature | Vercel AI SDK | Mastra | LangChain | OpenAI Agents | Pydantic AI | Agno | CrewAI | | --- | --- | --- | --- | --- | --- | --- | --- | | Inference gateway | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Framework trace spans | Yes | Partial | Partial | Partial | Partial | Partial | Partial | | Tilde and channel tools | Yes | Yes | Yes | Yes | Yes | Yes | Partial | | Bundled tools | Yes | Yes | Yes | Yes | Partial | Yes | Partial | | Prompt versioning | Partial | Yes | Yes | Yes | Yes | Yes | Partial | | Native skills | No, as tools | Yes | No, as tools | Partial | No, as tools | Yes | Yes | | New input during a run | Yes | Yes | Yes | Yes | Yes | Partial | Yes | Each framework's page explains its partial entries. ## Behaviour common to every framework - **Replies go through channel tools.** The model's text output is private. An agent replies by calling a channel tool, such as `sendMessage`. Adapters do not stream model text to users. - **Tilde owns the conversation history.** Load it with `ctx.message.history()` on each invocation. Turn off the framework's own memory or history features, or the model sees messages twice. - **Tilde's tracing replaces the framework's.** The SDK records each invocation, runtime call, and tool call as spans. Framework spans join the same trace only when the framework emits OpenTelemetry itself. The example agents turn off framework tracing that sends data to a third party, and we recommend you do the same. - **Define agents at module scope.** `tilde deploy` finds prompts, tools, and skills by loading your entry module. Agents built inside `run` are invisible to it. - **Gateway controls apply to every framework.** Capabilities, channel access, budgets, and, in Tilde Enterprise, security middleware run in the gateway, whatever framework the agent uses. Some adapters read framework settings that are not part of the framework's public API. Each adapter pins the framework versions it has been tested with. --- # Vercel AI SDK Source: https://trytilde.ai/docs/frameworks/vercel-ai-sdk Run a Vercel AI SDK agent on Tilde with the @trytilde/sdk-vercel-ai-node adapter. The Vercel AI SDK adapter runs an AI SDK `ToolLoopAgent`, or plain `generateText` and `streamText` calls, on Tilde. It works with AI SDK 6. A complete Vercel AI SDK agent with bundled tools, in the Tilde open-source repository. ## Install ```bash npm i @trytilde/sdk @trytilde/sdk-vercel-ai-node ai @ai-sdk/openai ``` ## How it works AI SDK 6 agents take no per-call tools. The adapter uses the agent's call options instead. Spread `tildeCallOptions` into the agent once, then pass `tildeAiSdk(ctx)` on each call. The adapter then adds the channel's tools, the agent's Tilde and bundled tools, skills, and new user input to that call. ```typescript src/agent.ts import { inference, type AgentContext } from "@trytilde/sdk"; import { convertToAiSdkMessages, tildeAiSdk, tildeCallOptions, } from "@trytilde/sdk-vercel-ai-node"; import { createOpenAI } from "@ai-sdk/openai"; import { ToolLoopAgent, convertToModelMessages, stepCountIs } from "ai"; import { bundledTools } from "./bundled-tools.js"; // Model calls go through Tilde's inference gateway. const openai = createOpenAI(inference("default")); // At module scope, so `tilde deploy` registers its instructions. export const agent = new ToolLoopAgent({ id: "support-agent", instructions: "You are a support assistant. Reply with the channel tools.", model: openai.responses("gpt-4o-mini"), stopWhen: stepCountIs(8), experimental_telemetry: { isEnabled: true, functionId: "support-agent" }, ...tildeCallOptions, }); export async function respond(ctx: AgentContext) { const history = await ctx.message.history(); const messages = await convertToAiSdkMessages({ messages: history.items, context: ctx, }); await agent.generate({ messages: await convertToModelMessages(messages), ...tildeAiSdk(ctx, { bundled: bundledTools }), }); } ``` For plain `generateText` or `streamText` calls, use `prepareTildeCall`, or convert tools yourself with `convertToAiSdkTools`. ## Feature compatibility | Feature | Support | Notes | | --- | --- | --- | | Inference gateway | Yes | Build the provider with `createOpenAI(inference(name))`, or the equivalent for your provider. | | Framework trace spans | Yes | Set `experimental_telemetry` to record model calls, with token usage, in the trace. | | Tilde and channel tools | Yes | | | Bundled tools | Yes | Write AI SDK `tool()` values, with a summary in `metadata.tilde`. | | Prompt versioning | Partial | Registers a `ToolLoopAgent`'s `instructions` as `/instructions`. | | Native skills | No | Skills arrive as `list_skills` and `read_skill` tools, with a summary in the instructions. | | New input during a run | Yes | | ## Limitations - **Static instructions only.** The AI SDK accepts only a string for `instructions`, so there is no dynamic prompt to version. Use [`definePrompt`](/prompts/overview#declare-a-prompt) for templates. - **Custom `prepareCall`.** If your agent defines its own `prepareCall`, discovery warns, because the adapter relies on it. - **Provider-defined tools.** Provider-defined tools, and tools without an `execute` function, are not published to Tilde. - **Tool names.** Bundled tool names must match `^[a-zA-Z0-9_-]{1,64}$`, and must not clash with other tools. - **No native skills.** The AI SDK has no skills concept. Deploy-time skills come from `defineSkills`. - **Private settings.** The adapter reads the agent's instructions from settings outside the AI SDK's public API. It is tested against AI SDK 6.0.280. --- # Mastra Source: https://trytilde.ai/docs/frameworks/mastra Run a Mastra agent on Tilde with the @trytilde/sdk-mastra-node adapter. The Mastra adapter runs a Mastra `Agent` on Tilde. It works with Mastra 1. A complete Mastra agent with bundled tools and skills, in the Tilde open-source repository. ## Install ```bash npm i @trytilde/sdk @trytilde/sdk-mastra-node @mastra/core ai @ai-sdk/openai ``` ## How it works Pass `tildeMastra(ctx)` to each `generate` or `stream` call. It adds a `tilde` toolset with the channel's tools and the agent's Tilde and bundled tools, the abort signal, and an input processor for new user input. Mastra has no per-call skills option, so wrap the agent's skills with `tildeMastraSkills`. Mastra then loads your own skills and the agent's Tilde skills together. ```typescript src/agent.ts import { fileURLToPath } from "node:url"; import { inference, type AgentContext } from "@trytilde/sdk"; import { convertToMastraMessages, tildeMastra, tildeMastraSkills, } from "@trytilde/sdk-mastra-node"; import { Agent } from "@mastra/core/agent"; import { createOpenAI } from "@ai-sdk/openai"; import { bundledTools } from "./bundled-tools.js"; const openai = createOpenAI(inference("default")); export const agent = new Agent({ id: "support-agent", name: "Support agent", instructions: "You are a support assistant. Reply with the channel tools.", model: openai.responses("gpt-4o-mini"), skills: tildeMastraSkills([ fileURLToPath(new URL("../skills", import.meta.url)), ]), }); export async function respond(ctx: AgentContext) { const history = await ctx.message.history(); const messages = await convertToMastraMessages({ messages: history.items, context: ctx, }); await agent.generate(messages, { ...(await tildeMastra(ctx, { bundled: bundledTools })), maxSteps: 8, }); } ``` ## Feature compatibility | Feature | Support | Notes | | --- | --- | --- | | Inference gateway | Yes | | | Framework trace spans | Partial | Tilde records its own spans. Mastra's observability is not connected. | | Tilde and channel tools | Yes | | | Bundled tools | Yes | Write Mastra `createTool()` tools. | | Prompt versioning | Yes | Registers `/instructions`. Instructions written as a function become a dynamic prompt. | | Native skills | Yes | Skill folders and `createSkill()` skills ship at deploy. Tilde skills load through `tildeMastraSkills`. | | New input during a run | Yes | | If you export a `Mastra` instance, `tilde deploy` registers the prompts of every agent in it. ## Limitations - **Input processors.** Mastra replaces an agent's configured input processors with any you pass per call. `tildeMastra` passes one, so add your own processors to the same call. - **Suspend and resume.** In [search mode](/tools/overview#tool-discovery), a bundled tool called through `tools.execute` runs outside Mastra's agent loop. It cannot suspend and resume. - **Private settings.** The adapter reads the agent's instructions through a method outside Mastra's public API. It is tested against Mastra 1.67. --- # LangChain and LangGraph Source: https://trytilde.ai/docs/frameworks/langchain Run a LangChain or LangGraph agent on Tilde with the TypeScript or Python LangChain adapter. The LangChain adapter runs agents built with LangChain's `createAgent` (`create_agent` in Python), which runs on LangGraph. It is a LangChain middleware. It works with LangChain 1 and LangGraph 1. A complete LangChain agent in TypeScript. A complete LangChain agent in Python. ## Install ```bash TypeScript npm i @trytilde/sdk @trytilde/sdk-langchain-node langchain @langchain/core @langchain/openai ``` ```bash Python pip install trytilde trytilde-langchain langchain-openai ``` ## How it works Add the Tilde middleware to the agent. On each model call, it adds the channel's tools, the agent's Tilde and bundled tools, and skills. It runs Tilde tool calls, and adds new user input to the agent's state. ```typescript TypeScript import { inference, type AgentContext } from "@trytilde/sdk"; import { convertToLangChainMessages, tildeLangChain, tildeMiddleware, } from "@trytilde/sdk-langchain-node"; import { ChatOpenAI } from "@langchain/openai"; import { createAgent } from "langchain"; import { bundledTools } from "./bundled-tools.js"; const { baseURL, apiKey, fetch } = inference("default"); export const agent = createAgent({ name: "support-agent", model: new ChatOpenAI({ apiKey, configuration: { baseURL, fetch }, model: "gpt-4o-mini", }), systemPrompt: "You are a support assistant. Reply with the channel tools.", middleware: [tildeMiddleware({ bundled: bundledTools })], }); export async function respond(ctx: AgentContext) { const history = await ctx.message.history(); const messages = await convertToLangChainMessages({ messages: history.items, context: ctx, }); // tildeLangChain(ctx) is required. The middleware refuses to run without it. await agent.invoke({ messages }, { ...tildeLangChain(ctx), recursionLimit: 16 }); } ``` ```python Python import tilde from langchain.agents import create_agent from langchain_openai import ChatOpenAI from tilde_langchain import convert_to_langchain_messages, tilde_middleware from bundled_tools import TOOLS INFERENCE = tilde.inference("default") agent = create_agent( ChatOpenAI( model="gpt-4o-mini", base_url=INFERENCE.base_url, api_key=INFERENCE.api_key, http_async_client=INFERENCE.async_client(), http_client=INFERENCE.client(), ), system_prompt="You are a support assistant. Reply with the channel tools.", middleware=[tilde_middleware(bundled=TOOLS)], name="support-agent", ) async def respond(ctx: tilde.AgentContext) -> None: history = await ctx.message.history() messages = await convert_to_langchain_messages(history.items, context=ctx) await agent.ainvoke({"messages": messages}, {"recursion_limit": 16}) ``` The adapter also works with `createReactAgent` and `bindTools`, through `withTildeTools`. ## Feature compatibility | Feature | Support | Notes | | --- | --- | --- | | Inference gateway | Yes | | | Framework trace spans | Partial | LangChain emits no OpenTelemetry spans. Tilde records its own spans. | | Tilde and channel tools | Yes | | | Bundled tools | Yes | Write LangChain `tool` (TypeScript) or `@tool` (Python) tools. Tools in the graph's `ToolNode` are also registered. | | Prompt versioning | Yes | Registers `/system_prompt`, `PromptTemplate`, and `ChatPromptTemplate`. Python also versions `@dynamic_prompt`. | | Native skills | No | Skills arrive as `list_skills` and `read_skill` tools, with a summary in the instructions. | | New input during a run | Yes | | ## Limitations - **Python is async only.** Call the agent with `ainvoke` or `astream`. - **Dynamic prompts in TypeScript.** A `dynamicSystemPromptMiddleware` prompt is not versioned, because its text is hidden in a closure. Discovery warns. Use [`definePrompt`](/prompts/overview#declare-a-prompt) for it. - **External prompts.** LangSmith Hub prompts and Jinja2 templates are reported as warnings, not versioned. - **Injected state.** In [search mode](/tools/overview#tool-discovery), a tool that needs LangGraph-injected state, such as `ToolRuntime` or `InjectedState`, runs without that state. - **Tracing.** LangSmith tracing is separate from Tilde, and sends data to LangSmith. --- # OpenAI Agents SDK Source: https://trytilde.ai/docs/frameworks/openai-agents Run an OpenAI Agents SDK agent on Tilde with the TypeScript or Python adapter. The OpenAI Agents SDK adapter runs an OpenAI `Agent`, and its handoffs, on Tilde. It works with `@openai/agents` 0.18 in TypeScript, and `openai-agents` 0.22 in Python. A complete OpenAI Agents SDK agent in TypeScript. A complete OpenAI Agents SDK agent in Python. ## Install ```bash TypeScript npm i @trytilde/sdk @trytilde/sdk-openai-agents-node @openai/agents openai ``` ```bash Python pip install trytilde trytilde-openai-agents openai-agents ``` ## How it works On each invocation, the adapter returns a copy of your agent with the channel's tools, the agent's Tilde and bundled tools, and skills. It also returns run options that pass new user input to the model, and the abort signal. Your module-level agent is never changed. ```typescript TypeScript import { inference, type AgentContext } from "@trytilde/sdk"; import { convertToOpenAIAgentsMessages, tildeOpenAIAgents, } from "@trytilde/sdk-openai-agents-node"; import { Agent, OpenAIResponsesModel, run, setTracingDisabled } from "@openai/agents"; import OpenAI from "openai"; import { bundledTools } from "./bundled-tools.js"; // The SDK's own tracing sends prompts and tool data to OpenAI. setTracingDisabled(true); const openai = new OpenAI({ ...inference("default") }); export const agent = new Agent({ name: "support-agent", instructions: "You are a support assistant. Reply with the channel tools.", model: new OpenAIResponsesModel(openai, "gpt-4o-mini"), }); export async function respond(ctx: AgentContext) { const history = await ctx.message.history(); const items = await convertToOpenAIAgentsMessages({ messages: history.items, context: ctx, }); const tilde = await tildeOpenAIAgents(ctx, agent, { bundled: bundledTools }); await run(tilde.agent, items, { ...tilde.options, maxTurns: 8 }); } ``` ```python Python import tilde from agents import Agent, OpenAIResponsesModel, Runner, set_tracing_disabled from openai import AsyncOpenAI from tilde_openai_agents import convert_to_openai_agents_messages, tilde_openai_agents from bundled_tools import TOOLS # The SDK's own tracing sends prompts and tool data to OpenAI. set_tracing_disabled(True) INFERENCE = tilde.inference("default") client = AsyncOpenAI( base_url=INFERENCE.base_url, api_key=INFERENCE.api_key, http_client=INFERENCE.async_client(), ) agent = Agent( name="support-agent", instructions="You are a support assistant. Reply with the channel tools.", model=OpenAIResponsesModel(model="gpt-4o-mini", openai_client=client), ) async def respond(ctx: tilde.AgentContext) -> None: history = await ctx.message.history() items = await convert_to_openai_agents_messages(history.items, context=ctx) run_agent, run_config = await tilde_openai_agents(ctx, agent, bundled=TOOLS) await Runner.run(run_agent, items, run_config=run_config, max_turns=8) ``` ## Feature compatibility | Feature | Support | Notes | | --- | --- | --- | | Inference gateway | Yes | | | Framework trace spans | Partial | Turn off the SDK's own tracing. It exports prompts and tool data to OpenAI. Tilde records its own spans. | | Tilde and channel tools | Yes | Tool names that contain `-` are rewritten with `_`. | | Bundled tools | Yes | Function tools carry no metadata, so pass summaries to `defineTools` as options. | | Prompt versioning | Yes | Registers `/instructions` and `/handoff_description`. Instructions written as a function become a dynamic prompt. | | Native skills | Partial | An agent with a local shell tool loads skills natively. Otherwise, skills arrive as tools. | | New input during a run | Yes | | ### Handoffs and agents as tools | | TypeScript | Python | | --- | --- | --- | | Handoff targets | Receive Tilde tools and skills, like the root agent. | Run as you defined them. Only the root agent receives Tilde tools. | | Agents used through `asTool()` or `as_tool()` | Run without Tilde's run options. | Run without Tilde's run options. | ## Limitations - **Hosted prompts.** A prompt referenced by an OpenAI prompt ID is versioned by OpenAI, not Tilde. Discovery warns. - **Hosted tools.** OpenAI hosted tools, such as web search, are not published to Tilde, and their calls are not recorded. - **Failed tool calls.** The SDK turns a tool error into a result for the model. Tilde records the call as completed. - **Server-managed conversations in Python.** If you use `previous_response_id`, new user input during a run can reach the model twice. - **CrewAI in the same environment.** The Python adapter needs a different major version of the `openai` package from CrewAI. Keep them in separate environments. - **Item IDs.** Converted history items carry no IDs, because the Responses API rejects IDs it did not create. --- # Pydantic AI Source: https://trytilde.ai/docs/frameworks/pydantic-ai Run a Pydantic AI agent on Tilde with the trytilde-pydantic-ai adapter. The Pydantic AI adapter runs a Pydantic AI `Agent` on Tilde. It works with Pydantic AI 2. A complete Pydantic AI agent with bundled tools, in the Tilde open-source repository. ## Install ```bash pip install trytilde trytilde-pydantic-ai "pydantic-ai-slim[openai]" ``` ## How it works Pass `tilde_pydantic_ai(ctx)` to each run. It adds a Tilde capability that brings the channel's tools, the agent's Tilde and bundled tools, skill tools, and new user input into the run. It also passes a cancellation token, so stopping the run stops the agent. ```python agent.py import tilde from pydantic_ai import Agent from pydantic_ai.models.openai import OpenAIResponsesModel from pydantic_ai.providers.openai import OpenAIProvider from pydantic_ai.usage import UsageLimits from tilde_pydantic_ai import convert_to_pydantic_ai_messages, tilde_pydantic_ai from bundled_tools import TOOLS INFERENCE = tilde.inference("default") model = OpenAIResponsesModel( "gpt-4o-mini", provider=OpenAIProvider( base_url=INFERENCE.base_url, api_key=INFERENCE.api_key, http_client=INFERENCE.async_client(), ), ) responder = Agent( model, instructions="You are a support assistant. Reply with the channel tools.", ) async def respond(ctx: tilde.AgentContext) -> None: history = await ctx.message.history() messages = await convert_to_pydantic_ai_messages(history.items, context=ctx) await responder.run( message_history=messages, usage_limits=UsageLimits(request_limit=8), **await tilde_pydantic_ai(ctx, bundled=TOOLS), ) ``` ## Feature compatibility | Feature | Support | Notes | | --- | --- | --- | | Inference gateway | Yes | | | Framework trace spans | Partial | Tilde records its own spans. The adapter does not turn on Pydantic AI's instrumentation. | | Tilde and channel tools | Yes | | | Bundled tools | Partial | Pass `Tool` objects to `define_tools`. Tools registered with `@agent.tool` are not published or recorded. | | Prompt versioning | Yes | Registers `instructions`, `system_prompt`, and `TemplateStr` templates. Instructions written as a function become a dynamic prompt. | | Native skills | No | Skills arrive as tools. Pass `skills=False` to `tilde_pydantic_ai` to leave them out. | | New input during a run | Yes | | ## Limitations - **Decorated tools.** Pydantic AI keeps `@agent.tool` tools outside the toolset the adapter wraps. `tilde deploy` still lists them, but Tilde cannot record their calls. Use `Tool` objects with `define_tools` instead. - **Retries.** A tool that raises `ModelRetry` is recorded as a failed call. - **Private settings.** The adapter reads prompts from fields outside Pydantic AI's public API. It is tested against Pydantic AI 2.43. --- # Agno Source: https://trytilde.ai/docs/frameworks/agno Run an Agno agent on Tilde with the trytilde-agno adapter. The Agno adapter runs an Agno `Agent` on Tilde. It works with Agno 3. A complete Agno agent with bundled tools and skills, in the Tilde open-source repository. ## Install ```bash pip install trytilde trytilde-agno agno openai ``` ## How it works Pass `tilde_agno(ctx, agent)` to each run. It adds the channel's tools and the agent's Tilde and bundled tools, and binds the run to the Tilde session so stopping it cancels the run. Wrap the agent's skills with `TildeSkills`. Agno then loads your own skills and the agent's Tilde skills together. ```python agent.py from pathlib import Path import tilde from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.skills import LocalSkills from tilde_agno import TildeSkills, convert_to_agno_messages, tilde_agno from bundled_tools import TOOLS INFERENCE = tilde.inference("default") responder = Agent( model=OpenAIChat( id="gpt-4o-mini", base_url=INFERENCE.base_url, api_key=INFERENCE.api_key, http_client=INFERENCE.async_client(), ), instructions="You are a support assistant. Reply with the channel tools.", skills=TildeSkills([LocalSkills(str(Path(__file__).parent / "skills"))]), tool_call_limit=8, telemetry=False, ) async def respond(ctx: tilde.AgentContext) -> None: history = await ctx.message.history() messages = await convert_to_agno_messages(history.items, context=ctx) await responder.arun(input=messages, **await tilde_agno(ctx, responder, bundled=TOOLS)) ``` ## Feature compatibility | Feature | Support | Notes | | --- | --- | --- | | Inference gateway | Yes | | | Framework trace spans | Partial | Tilde records its own spans. Set `telemetry=False` to stop Agno sending its own telemetry. | | Tilde and channel tools | Yes | | | Bundled tools | Yes | Pass functions or toolkits to `define_tools`. Agno tools carry no metadata, so pass summaries as options. | | Prompt versioning | Yes | Registers an agent's `instructions`, `description`, and `system_message`, and the prompts of a `Team`. | | Native skills | Yes | `LocalSkills` folders ship at deploy. Tilde skills load through `TildeSkills`. | | New input during a run | Partial | See below. | ## Limitations - **New input during a run.** Agno has no hook between model steps. Tilde adds new user input to the next Tilde tool result instead, so the model sees it only after it calls a tool. An agent-level `tool_hooks` setting replaces this behaviour. - **History.** Leave `add_history_to_context` off. Tilde supplies the history. - **Tool hooks.** Tilde records calls through tool hooks. Errors inside those hooks are not surfaced. - **Toolkit instructions.** The instructions attached to an Agno toolkit are not carried over to Tilde. --- # CrewAI Source: https://trytilde.ai/docs/frameworks/crewai Run a CrewAI agent on Tilde with the trytilde-crewai adapter. The CrewAI adapter runs a CrewAI `Agent`, configured with `@CrewBase` YAML, on Tilde. It works with CrewAI 1.15 and later. A complete CrewAI agent with YAML configuration, bundled tools, and skills, in the Tilde open-source repository. ## Install ```bash pip install trytilde trytilde-crewai crewai ``` CrewAI needs a different major version of the `openai` package from the OpenAI Agents SDK. Install it in its own environment. ## How it works CrewAI's `LLM` does not take an HTTP client, so the adapter provides an interceptor that routes each request through Tilde's inference gateway. Importing the adapter also registers a hook that passes new user input to the model before each call. Build the crew for each invocation, with the Tilde tools and skills directory for that invocation. ```python agent.py from pathlib import Path import tilde from crewai import LLM, Agent from crewai.project import CrewBase, agent from tilde_crewai import convert_to_crewai_messages, inference_interceptor, with_tilde_tools from bundled_tools import TOOLS INFERENCE = tilde.inference("default") llm = LLM( model="openai/gpt-4o-mini", base_url=INFERENCE.base_url, api_key=INFERENCE.api_key, interceptor=inference_interceptor(INFERENCE), ) SKILLS = tilde.define_skills("skills") @CrewBase class SupportCrew: agents_config = "config/agents.yaml" def __init__(self, tools, registry_skills: Path) -> None: self.tools = tools self.registry_skills = registry_skills @agent def responder(self) -> Agent: return Agent( config=self.agents_config["responder"], llm=llm, tools=self.tools, skills=[SKILLS.path, self.registry_skills], ) async def respond(ctx: tilde.AgentContext) -> None: history = await ctx.message.history() messages = await convert_to_crewai_messages(history.items, context=ctx) tools = await with_tilde_tools(ctx, TOOLS.tools, options=TOOLS.options) skills = Path(await ctx.skills.directory()) await SupportCrew(tools, skills).responder().kickoff_async(messages) ``` ## Feature compatibility | Feature | Support | Notes | | --- | --- | --- | | Inference gateway | Yes | Through `inference_interceptor`. | | Framework trace spans | Partial | Tilde records its own spans. Set `CREWAI_DISABLE_TELEMETRY=true` to stop CrewAI sending its own telemetry. | | Tilde and channel tools | Partial | See below. | | Bundled tools | Partial | Write CrewAI `BaseTool` tools. See below. | | Prompt versioning | Partial | Registers the `role`, `goal`, and `backstory` of each agent, and the `description` and `expected_output` of each task, from `@CrewBase` YAML. | | Native skills | Yes | YAML `skills:` paths ship at deploy. Skills you pass in code need `define_skills`. | | New input during a run | Yes | | ## Limitations - **Strict tool schemas.** CrewAI makes every tool field required, including optional ones. - **Tool names.** CrewAI converts tool names to lowercase snake case. - **Tool call IDs.** CrewAI does not expose the model's tool call ID. Tilde records each call with a generated ID instead. - **Agents built in code.** Prompts of agents built in Python, rather than YAML, are not versioned. Discovery warns. - **Attachments.** Attachments on the latest user message are dropped. - **Memory.** Leave CrewAI `memory` off. Tilde supplies the history. --- # Security overview Source: https://trytilde.ai/docs/security/overview How Tilde protects agents, credentials, and conversations: no agent endpoints, short-lived tokens, encryption, middleware, audit data, and network exposure. Tilde puts one governed gateway between each agent and everything it touches. Agents hold no credentials and expose no endpoints. Every message, tool call, and LLM request passes through a point where you can authenticate it, screen it, and record it. This page covers each layer. It links to the detailed pages where they exist. ## Agents expose no API endpoints An agent never listens for requests. On startup, the Tilde SDK opens one outbound HTTP/2 stream to the gateway, or to its sidecar, and authenticates with a deployment token. Tilde delivers every invocation as a frame on that stream. This removes a whole class of attack: - There is no agent URL to scan, fuzz, or flood. - The agent needs no Kubernetes Service, Ingress, or load balancer, and no inbound firewall rule. - A compromised network peer cannot call the agent directly, because nothing on the agent accepts a connection. - Tilde stores only a hash of each deployment token. You can rotate a token at any time, and a retired deployment's token stops working at once. See [Agent Registry](/agent-registry#agent-lifecycle) for the full connection lifecycle. ## Short-lived tokens for every invocation An agent's deployment token only lets it connect and wait. It grants no access to tools, models, or conversations. For each invocation, the gateway issues a separate signed token scoped to that one piece of work. | Property | Value | | --- | --- | | Format | A signed token, verified on every call. | | Lifetime | Minutes. | | Bound to | One invocation, agent, conversation, and participant. | | Carries | The agent's capabilities and its assigned inference connections. | | Renewal | Automatic while the invocation is active. Renewal can narrow authority, and can never widen it. | | Revocation | Cancelling, pausing, or losing access blocks renewal. | The agent uses this token for every tool call, LLM request, and telemetry upload. The token never appears in thread history. The signing key is itself encrypted at rest. A stolen invocation token is therefore worth very little. It expires in minutes, it works for one conversation, and it cannot do anything the agent was not already granted. See [IAM](/iam) for the capability model. ## Secrets are encrypted with a key you control Tilde uses envelope encryption with AES-256-GCM. An envelope encryption key, held in AWS KMS or supplied by you, protects a data encryption key. That key encrypts every connection credential, OAuth token, and signing key before it reaches PostgreSQL. - Each ciphertext is bound to its record and field, so it cannot be moved elsewhere. - Decrypted credentials stay in memory only briefly, in buffers that are wiped when released. - Secrets are carried in types that cannot be logged or serialized. - Agents never receive provider credentials. They invoke tools, LLM providers, and reverse proxies through the gateway, and the gateway injects the credentials before it sends each request upstream. Key providers, algorithms, in-memory handling, and standards alignment. ## Security middleware screens input and output [ENTERPRISE] Security middleware inspects text on its way into and out of each agent. It runs in the gateway and in sidecars, before the agent sees a message and before a reply reaches a user. Six guards are available: PII, secrets, jailbreak and prompt injection, NSFW, toxicity, and a custom guard that runs your own JavaScript in a restricted sandbox. Each guard can flag, redact, or block. Every guard fails closed. Guards, actions, custom scripts, and what each decision records. ## Audit data for every session Tilde records what each agent did, so you can review any conversation after the fact. You find this data in three tabs on each agent in the Agent Registry. | Tab | What it records | Where it is stored | | --- | --- | --- | | **Sessions** | Each conversation thread: messages, agent reasoning, tool calls, and security middleware decisions. | PostgreSQL holds the canonical messages, immutable audit snapshots, and thread activity. | | **Tracing** | Each invocation as a trace: model calls, tool calls, latency, token usage, cost, and errors. | ClickHouse, with large payloads and media in object storage. | | **Logs** | Structured agent logs, tagged with agent, deployment, invocation, run, and thread. | ClickHouse. | Tilde also records every LLM request with its model, token usage, and cost. See [Inference providers](/inference-providers#usage-and-cost). Audit records are designed to be safe to keep: - The server sets identifying attributes such as agent, invocation, and thread. An agent cannot forge them. - Security middleware decisions name the guard, label, and score, and never the matched text. - A message blocked on the way in is never stored. - Prompts and tool inputs appear in traces only if your framework's instrumentation opts in. - Attachment bytes are encrypted, and never appear in audit snapshots. Treat all three stores as sensitive conversation data. Restrict access to them, and encrypt their disks and backups. See [Sessions](/sessions), [Traces](/traces), and [OpenTelemetry](/integrations/opentelemetry). ## Network exposure This section applies when you run the gateway yourself, with Tilde OSS or Tilde Enterprise. In Tilde Cloud, Tilde runs the gateway and its network. The gateway listens on one port, `8080`, behind your HTTPS ingress. Most deployments need no public exposure at all. You decide what is public by choosing which routes your public ingress forwards. ### Gateway route groups The gateway serves four route groups on the same listener. Each has its own authentication. | Route group | Serves | Authentication | Exposure | | --- | --- | --- | --- | | Management | The UI, the management API, and operator login | Your identity provider, or a management API key, in Cloud and Enterprise. None in Tilde OSS: your reverse proxy or other authentication method | Private. | | Runtime | Agent runtime calls, inference, and telemetry | Signed invocation tokens | Private. Only your agents call it. | | Ingress | Provider webhooks and native chat | Provider signatures, or scoped tokens | Public only if you use public chat providers or clients. | | Sidecar | The sidecar protocol | Agent deployment tokens | Private. Only your sidecars call it. | ### What you can choose to make public | Make it public when | What is exposed | | --- | --- | | A public chat provider, such as Slack, WhatsApp, Telnyx, MS Teams, or AgentMail, must deliver webhooks. | The webhook route only. Tilde verifies each provider's signature. Telnyx Voice also uses a secure WebSocket for each call. | | External clients use native Tilde chat, for example a customer-facing chat widget. | The native chat route only, authenticated with scoped tokens. | | Operators or users sign in or set up connections from outside your network. | The login and connection setup callbacks. | The runtime and sidecar routes, and the health endpoints, never need public exposure. In Tilde OSS, the management routes have no authentication of their own. Put a reverse proxy or another authentication method in front of them before anyone else can reach them. See [Protect the UI and management API](/deployment/gateway#protect-the-ui-and-management-api). ### Ports | Service and port | Who reaches it | Public exposure | | --- | --- | --- | | HTTPS ingress `443` | Private clients by default | Optional, for the routes above only. | | Gateway `8080` | Your ingress and authorized private workloads | Never directly. | | Sidecar runtime `8081` | Loopback inside the pod or task | Never. The sidecar enforces loopback binding. | | Sidecar ingress `8082` | Private ingress and peer replicas | Optional, through HTTPS `443`, when clients bypass the gateway. | | Databases and object storage | Tilde services only | Never. | | Your OpenTelemetry collector | The gateway | Never. | ### Isolate route groups You can run the public ingress routes and the private management routes as separate gateway processes. A compromise of the public processes then reaches no management route. ### Outbound access | From | To | Why | | --- | --- | --- | | Gateway | Your identity provider | OIDC login, in Cloud and Enterprise. | | Gateway | LLM providers | Inference for direct and Lambda agents. | | Sidecars | LLM providers | Inference for sidecar agents. | | Gateway | Chat and tool providers | Sending messages and calling provider APIs. | | Gateway | AWS APIs | KMS and Lambda, when configured. | | Gateway | Object storage | The telemetry queue, trace media, skill files, and attachments. | | Gateway | GitHub | Syncing Git and catalog skill sources. | Agent containers need no internet egress for inference. They reach only the gateway or their sidecar. ## Deployment checklist - Terminate TLS at every network boundary. - Restrict traffic with security groups or network policies. - Use AWS KMS for the envelope key in every cloud environment. - Keep management API keys out of agent containers. See [IAM](/iam). - In Tilde Enterprise, enable security middleware on every agent that handles customer input. - After you deploy, verify private reachability, public route restrictions, agent reconnection, and telemetry delivery. --- # IAM Source: https://trytilde.ai/docs/iam Control what operators, agents, and end users can do in Tilde: identities, fine-grained agent capabilities, channel access, and token lifetimes. Tilde has three kinds of principal, and each is governed differently: - **Operators** manage the registry through the UI or the management API. See [Operator access](/operator-access). - **Agents** act during invocations, within the capabilities you grant them. - **End users** talk to agents through chat channels, within each channel's access policy. ## Identities | Identity | Authenticates with | Used for | | --- | --- | --- | | Operator | An OIDC login from your identity provider, in Cloud and Enterprise. | The Tilde UI and management API. | | Management API key | A bearer key, shown once and stored only as a hash. Cloud and Enterprise only. | CI pipelines and automation. | | Agent deployment | A deployment token, shown once and stored as a hash. | Connecting to the gateway and waiting for work. Nothing else. | | Agent invocation | A signed token that lasts five minutes. | Every tool call, LLM request, and telemetry upload in one invocation. | | Ingress client | A scoped ingress token, optionally restricted to one thread. | Your own apps that post to native Tilde chat. | | End user | A channel identity, such as an email address, phone number, or username. | Talking to agents through chat channels. | ### Operators and API keys [CLOUD][ENTERPRISE] Operators sign in through your identity provider, and hold roles that decide what they can see and change. Automation uses management API keys, which hold roles in the same way. Agent runtimes never receive operator tokens. See [Operator access](/operator-access). ## Agent capabilities Capabilities are the fine-grained permissions of an agent. They decide what the agent can do during an invocation. The gateway enforces them on every call, so they hold even if the agent's code or prompt is compromised. Three rules apply throughout: - **Deny by default.** A new agent has no capabilities. A capability you do not grant is denied. - **Signed into the token.** The gateway writes the agent's capabilities into each invocation token, and verifies them on every runtime call. - **Narrow only.** Renewing a token can keep or reduce its authority, and can never add to it. In Cloud and Enterprise, an operator cannot grant more than they hold. ### Capability reference | Capability | Type | Lets the agent | | --- | --- | --- | | `tools.invoke` | Targeted, by tool name | Call the named tools. | | `tools.personal` | Targeted, by provider | Use the personal tools of the user it is serving. | | `agents.invoke` | Targeted, by agent | Invoke other agents in the current thread. | | `agents.read` | Targeted, by agent | Read other agents' registry entries. | | `agents.update` | Targeted, by agent | Update other agents. | | `agents.delete` | Targeted, by agent | Delete other agents. | | `agents.grant_capabilities` | Targeted, by agent | Grant capabilities to other agents, up to its own. | | `agents.edit_prompts` | Targeted, by agent | Delete the prompt histories of agents, itself included. | | `agents.edit_skills` | Targeted, by agent | Assign and unassign skills on agents, itself included. | | `skills.read` | Targeted, by skill group | See the groups, and assign their skills. | | `skills.edit` | Targeted, by skill group | Write skills into editor groups, and sync Git and catalog groups. | | `agents.create` | Yes or no | Register new agents. | | `thread.read` | Yes or no | Read the conversation thread it is working in. | | `work.read` | Yes or no | Read goals and tasks. | | `work.write` | Yes or no | Create and update goals and tasks. | | `run.update` | Yes or no | Change the status of its run. | ### Targeted capabilities A targeted capability takes one of three modes: - **None** denies the action. - **All** allows it for every target. - **Selected** allows it for a list of targets that you choose. Prefer **Selected**. An agent that only replies to users needs `tools.invoke` for `sendMessage`, and nothing more. ### Set capabilities Open the agent in the Agent Registry and select **Capabilities**. Changes save immediately. Set the same capabilities through the management API when you create or update an agent, for example from your infrastructure-as-code pipeline. ### When a change takes effect A capability change applies to new invocations at once, and reaches running invocations within minutes, when their tokens renew. Stop controls abort an agent's work immediately. ### Permissions beyond capabilities Some agent permissions are assignments rather than capabilities. The gateway enforces these too. | Permission | Where you set it | Effect | | --- | --- | --- | | Inference connections | The agent's **Inference** tab | The agent can send LLM requests only through its assigned connections. The list is signed into each token. | | Inference budgets | The agent's **Inference** tab | A blocked budget removes the connection from the agent's next token. See [Inference providers](/inference-providers#budgets). | | Channel connections | The agent's **Chat providers** tab | The agent receives messages only from its assigned channels. | | Security policy | The agent's **Security** tab | Guards screen the agent's input and output. Tilde Enterprise only, for now. See [Security middleware](/security/middleware). | ## End-user access You control who can talk to an agent on each channel connection. | Access mode | Who can message the agent | | --- | --- | | **Private** | Only identities you have allowed. | | **Public** | Anyone who can reach the channel. | | **Disabled** | No one. | In private mode, allow individual identities, such as an email address or phone number. Tilde can also ask a user to verify an identity before it links that identity to them. An operator can attest an identity instead, and Tilde records who made the attestation. Tilde enforces channel access in the database, on every message. It checks the sender before [security middleware](/security/middleware) runs, and before the agent sees anything. ## Token lifetimes Every credential in Tilde is either short-lived or revocable. | Token | Lifetime | Revocation | | --- | --- | --- | | Operator session | Eight hours | Logout revokes it. Cloud and Enterprise. | | Management API key | Until revoked | Takes effect within seconds. Cloud and Enterprise. | | Deployment token | Until rotated or retired | Immediate. | | Invocation token | Minutes, renewed while work is active | Renewal is blocked when the invocation ends or access is lost. | --- # Operator access Source: https://trytilde.ai/docs/operator-access Sign operators in with your identity provider, control what each person can do with roles, and automate with management API keys. Operator access controls the people and automation that manage Tilde: who can sign in, and what each of them can see and change. It is part of Tilde Cloud and Tilde Enterprise. For what agents and end users can do, see [IAM](/iam). Tilde OSS has no operator roles, management API keys, or OIDC configuration. See [Editions](/editions#how-tilde-oss-differs). ## Sign in with your identity provider Tilde delegates operator sign-in to your OIDC identity provider, so your existing sign-in policies, such as multi-factor authentication, apply. Tilde has no local password accounts. We provide SAML support for individual clients on request. Browser sign-in uses the authorization code flow with PKCE. An operator session lasts eight hours, and signing out revokes it. Tilde stores only a hash of each session. ## Groups A group is an audience for roles. Tilde has four kinds: | Group | Membership | | --- | --- | | **Administrators** | Hold every action on every resource. They manage users, groups, and installation-wide roles. | | **All users** | Every signed-in operator, implicitly. | | **Identity provider groups** | Mirror your identity provider's group claim. Tilde updates membership at each sign-in. | | **Local groups** | Managed by administrators in Tilde. Membership survives sign-in. | ## Operator roles A role is a named set of actions on a resource, or on every resource of a kind. A person, group, or API key can hold any number of roles, and their actions add up. Actions never imply each other, so a role states everything it gives. ### Agent roles Every agent has three roles: | Role | Actions | | --- | --- | | **Reader** | `view` | | **Editor** | `view`, every `edit` action, and `share` | | **Deployer** | `view`, `deploy`, and `share` | The person who creates an agent becomes its editor and deployer. An agent you cannot view is reported as not found. The editor role holds a set of fine-grained actions. A custom role can grant one part of an agent without the rest. | Action | Lets the holder | | --- | --- | | `view` | Find and read the agent, its sessions, traces, logs, and deployments. | | `edit` | Change settings, capabilities, and avatar, pause and resume, delete, and issue ingress tokens. | | `edit_chat_providers` | Add and remove chat connections. | | `edit_tools` | Add and remove tool sources, pick tools, and set the tool mode. See [Manage tools](/tools/management). | | `edit_identities` | Change channel access, identity grants, and verification. | | `edit_inference` | Change inference connections, aliases, and budgets. | | `edit_prompts` | Delete prompt histories. See [Manage prompts](/prompts/management). | | `edit_skills` | Assign and unassign skills. See [Manage skills](/skills/management). | | `deploy` | Register, promote, and retire deployments, and issue their tokens. | | `share` | Assign and revoke roles. | ### Connection, tool server, and skill group roles Connections, Tilde tool servers, and skill groups each have their own roles: | Role | Actions | | --- | --- | | **Reader** | `view` | | **Editor** | `view`, `edit`, and `share` | The person who creates one becomes its editor. To give one to an agent, you need the matching action on the agent and `view` on the connection, tool server, or group. ### Installation-wide roles Administrators can grant a role on every resource of a kind, such as every agent or every connection. It covers resources that exist now and those created later. ## Share a resource Select **Share** on an agent, connection, tool server, or skill group. You can grant only roles within your reach: - Editors can hand out reader and editor. - Deployers can hand out reader and deployer. - Administrators can hand out any role. To open an agent to every operator, select **Anyone can view**. This grants the reader role to the all-users group. ## Management API keys Management API keys authenticate CI pipelines and other automation to the management API. A key holds roles exactly as a person does. Create and revoke keys under **API keys**. Tilde shows each key once, and stores only its hash and a display prefix. Revocation takes effect across the platform within seconds. A key has these limits: - It joins no groups, and is never an administrator. - It cannot manage access, users, groups, or other keys. - Its creator can give it only roles within their own reach. - It owns nothing it creates. To create an agent, connection, or tool server, it needs `edit` on every resource of that kind. - It cannot open browser sessions. Agent runtimes never receive management keys. Non-administrators can list and revoke only their own keys. --- # Secret encryption Source: https://trytilde.ai/docs/security/secret-encryption Tilde protects connection secrets, API keys, and tokens with envelope encryption, AES-256-GCM, and a key that you control. Tilde uses envelope encryption. Two kinds of key are involved: - The **envelope encryption key** (EEK) is the top-level key. You control it, and Tilde never stores it. - A **data encryption key** (DEK) encrypts your secrets. Tilde generates it, encrypts it with the EEK, and stores only that encrypted copy in PostgreSQL. Tilde uses the DEK to encrypt connection secrets, OAuth tokens, webhook signing keys, and every other secret it stores. Tilde issues a DEK for each registry. ![Envelope encryption in Tilde: the envelope encryption key from your key provider unwraps the data encryption key, which encrypts each secret with AES-256-GCM before it is stored in PostgreSQL](/images/envelope-encryption.drawio.svg) A database dump alone is useless to an attacker. Without your EEK, the DEK cannot be unwrapped, and without the DEK, no secret can be read. ## Choose an envelope key provider Tilde generates and manages DEKs for you. You configure the EEK when the gateway starts. Create a KMS key and give the gateway's role permission to use it. Tilde asks KMS to generate the DEK and to unwrap it at startup, so the EEK never leaves the KMS hardware security modules. The gateway needs only two permissions on the key: `kms:GenerateDataKey` and `kms:Decrypt`. Tilde binds every KMS call to an encryption context, and verifies that KMS used the key you configured. Generate a 256-bit key with the Tilde CLI, and supply it to the container as a secret from your secret manager. The value is raw key material, not a password. We can add other key providers to meet your requirements, such as HashiCorp Vault. Use a user-provided key for local development and automated tests. Use AWS KMS, or another managed provider, for every cloud environment, including development and production. Tilde supports envelope key rotation, and we advise rotating your EEK regularly. ## How secrets are encrypted | Property | Value | | --- | --- | | Cipher | AES-256-GCM, an authenticated cipher. Tampered ciphertext fails to decrypt. | | Keys | 256-bit, from a cryptographically secure random number generator. | | Nonce | Unique for every encryption. | | Context binding | Each ciphertext is bound to the record and field it belongs to. | Context binding stops an attacker who can write to the database from moving a ciphertext to another record or field. A secret copied into the wrong row fails authentication and is rejected. ### What is encrypted and what is hashed Tilde encrypts values it must read back, and hashes values it only needs to verify. | Encrypted, because Tilde must read them back | Hashed, because Tilde only verifies them | | --- | --- | | Connection credentials and OAuth tokens | Management API keys | | Webhook and token signing keys | Agent deployment tokens | | Connection setup data | Identity verification tokens | Tilde shows a hashed credential once, when you create it. It cannot show it again. ## How secrets are handled in memory Encryption at rest protects the database. Tilde also limits how long a decrypted secret exists in the gateway's memory, and what can read it there. - **Short-lived.** Tilde holds a decrypted credential in memory only briefly, and never longer than the credential itself is valid. - **Wiped, not only freed.** Tilde overwrites keys and decrypted values the moment it releases them. Secrets do not linger in freed memory, where a memory disclosure bug, core dump, or swap file could expose them. - **Never logged.** Secrets are carried in types that redact themselves in debug output and refuse serialization. A stray log line or error report cannot contain a secret. - **Never traced.** Credential headers are marked sensitive, and Tilde's instrumentation does not capture request bodies or authorization headers. - **Constant-time checks.** Tilde verifies signatures without leaking timing information. - **Memory safe.** The gateway is written in Rust, which rules out the buffer overflows and use-after-free bugs behind most memory disclosure attacks. Agents have no access to any of this data. They run in separate containers, across a network boundary, and they receive only short-lived invocation tokens. See [IAM](/iam). ## Standards alignment Tilde's encryption follows published guidance for cryptographic storage. | Guidance | How Tilde follows it | | --- | --- | | [OWASP Cryptographic Storage Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html) | Authenticated encryption with AES-256. Separate data and key encryption keys. Keys stored apart from the data they protect. Keys generated by a cryptographically secure random number generator. A managed key service for production. | | [OWASP Secrets Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | Centralised secret storage. Automated rotation of OAuth tokens. Secrets kept out of logs. Least-privilege access to secrets, enforced per agent. | | [NIST SP 800-38D](https://csrc.nist.gov/pubs/sp/800/38/d/final) | Galois/Counter Mode with a unique 96-bit nonce for every encryption under a key. | | [NIST SP 800-57 Part 1](https://csrc.nist.gov/pubs/sp/800/57/pt1/r5/final) | A key hierarchy that separates key-wrapping keys from data keys, and 256-bit symmetric keys. | | [FIPS 140-3](https://csrc.nist.gov/pubs/fips/140-3/final) | With the AWS KMS provider, the envelope key stays inside AWS KMS hardware security modules, which AWS validates under FIPS 140-3. | | OWASP Top 10, [A02 Cryptographic Failures](https://owasp.org/Top10/A02_2021-Cryptographic_Failures/) | No secrets in plaintext at rest. No deprecated ciphers or modes. No hard-coded keys. | --- # Security middleware Source: https://trytilde.ai/docs/security/middleware Screen every message into and out of an agent for PII, secrets, prompt injection, and unsafe content, or run your own guard script. Security middleware is available in Tilde Enterprise today. It will be available soon in Tilde OSS and Tilde Cloud. Security middleware screens the text that flows into and out of an agent. You configure it for each agent. It runs inside the gateway and inside sidecars, so it applies whichever way traffic reaches the agent. ![Security middleware pipeline: inbound messages pass through request guards before the agent, and agent replies pass through response guards before delivery, with each decision recorded as thread activity](/images/security-middleware.drawio.svg) ## Where middleware runs Middleware screens two directions. | Direction | What it screens | When | | --- | --- | --- | | **Request** | Human input: native chat posts and inbound provider messages, including email subjects. | After Tilde checks the sender's membership, and before the agent sees the message or anything is stored. | | **Response** | Agent output: the text, HTML, subject, and caption of every message an agent sends. | Before the provider handler runs, so a blocked reply never leaves Tilde. | ## Guards Six guards are available. You enable each guard separately for each direction. | Guard | Detects | Actions | | --- | --- | --- | | `pii` | Email addresses, credit card numbers, US social security numbers, IBANs, phone numbers, and IP addresses. With a model, also names, addresses, and dates. | Flag, redact, block | | `secrets` | Private keys, AWS access keys, GitHub, Slack, Stripe, Google, OpenAI, and Anthropic keys, JWTs, bearer tokens, and generic `password=` style secrets. | Flag, redact, block | | `jailbreak` | Prompt injection and jailbreak attempts. | Flag, block | | `nsfw` | Sexual content. | Flag, block | | `toxicity` | Hate, harassment, and abuse. | Flag, block | | `custom` | Anything your script checks. | Flag, redact, block | Pattern-based detection validates what it finds, such as card number and IBAN checksums, which keeps false positives low. ### Actions - **Flag** records the finding and lets the text through. - **Redact** replaces each matched span with its label, such as `[EMAIL_ADDRESS]`, and delivers the rest. - **Block** stops the message. A blocked native post returns permission denied. A blocked provider message is never stored. A blocked reply fails the agent's tool call. Each rule has an action and a confidence threshold. When several rules match, the strictest action wins. Guards run concurrently, so adding guards adds little latency. ## Configure middleware You set an agent's guards in its **Security** tab, one rule for each guard and direction. Changes apply at once to the gateway and to the agent's sidecars, with no restart. The same policies are available through the management API. ## Write a custom guard [ALPHA] A custom guard is one JavaScript function for each agent. Tilde calls it with the text and the direction, and it returns a list of findings. ```javascript Custom guard function guard(text, direction) { const findings = tilde.detectSecrets(text); const start = text.indexOf("PROJECT_ORCHID"); if (start >= 0) { findings.push({ label: "INTERNAL_PROJECT", score: 1, start, end: start + 14 }); } return findings; } ``` Your function can call Tilde's built-in PII and secret detectors, so you extend them rather than replace them. Custom guards run in a restricted sandbox with no file, network, or system access, and with strict time and memory limits. ## Guards fail closed If a guard cannot reach a verdict, Tilde blocks the message. A guard failure never lets unscreened text through. ## What each decision records Tilde records every decision, and you can review it in the agent's [Sessions](/sessions) tab. Each record names the guard, what it found, and its confidence. For custom guards it also identifies the exact script version that ran. It never contains the matched text, so your audit trail does not become a second copy of the sensitive data. --- # Sessions Source: https://trytilde.ai/docs/sessions Review every conversation an agent has had: messages, reasoning, tool calls, security decisions, logs, and traces. A session is one conversation thread between an agent and the people, or other agents, it talks to. Tilde records each session, so you can review what an agent was asked, what it did, and why. Tilde uses three related terms: - A **session** is the whole conversation thread. - A **run** is one objective the agent works on within a session. A run can pause and resume. - An **invocation** is one active reasoning loop inside a run. ## Review a session In the Agent Registry, open the agent and select **Sessions**. Tilde lists the agent's sessions with their channel, message count, and last activity. Select a session to read it as a conversation. Tilde shows the recorded messages, the agent's reasoning, and its tool calls in order. Open any step to see its trace. The waterfall shows each model call and tool call, with input, output, metadata, and latency. ## What a session records | Record | What it contains | | --- | --- | | Messages | Every message in the thread, from every participant and channel. | | Reasoning | The agent's working notes. They are recorded as activity, and are never sent to the user. | | Tool calls | Each tool the agent called, with its input after [security middleware](/security/middleware) screened it. | | Goals and tasks | The objectives the agent set for itself, and their status. | | Security decisions | Each flagged, redacted, or blocked message, with the guard, label, and score. Tilde Enterprise only, for now. | | Attachments | Files exchanged in the conversation. Tilde encrypts attachment bytes. | | Channel metadata | The provider, the connection, and the participants' identities. | Tilde stores messages and immutable audit snapshots in your PostgreSQL database, so later edits do not rewrite history. ## Follow a session across tabs The session ID ties the agent's tabs together. - In **Logs**, filter by session, run, or invocation to read the agent's structured logs for that conversation. See [OpenTelemetry](/integrations/opentelemetry). - In **Tracing**, filter observations by session. See [Traces](/traces). - In **Inference**, see what the agent's LLM requests cost. See [Inference providers](/inference-providers#usage-and-cost). ## Protect session data Sessions contain your users' conversations. Restrict operator access through your identity provider, and encrypt the PostgreSQL disks and backups. See [Security overview](/security/overview#audit-data-for-every-session). --- # Traces Source: https://trytilde.ai/docs/traces See every invocation as a trace, with model calls, tool calls, latency, token usage, cost, and errors, stored and viewed in Tilde. Tilde records each agent invocation as an OpenTelemetry trace. A trace shows the model calls and tool calls the agent made, how long each took, what it cost, and where it failed. Tilde is its own trace store. You need no separate tracing product. The Tilde SDK sets up tracing for you. Traces appear in the agent's **Tracing** tab without any agent configuration. ## How traces reach Tilde ![Trace flow from the agent SDK through the Tilde gateway's embedded receiver and object storage queue into ClickHouse, and back to the Tilde UI](/images/telemetry-flow.drawio.svg) The SDK uploads OTLP batches to the gateway, authenticated with the invocation token. Only a live invocation can upload traces, so an agent cannot write traces for work it was not given. The gateway's embedded OpenTelemetry receiver validates each batch, and stamps it with the verified agent, run, invocation, and thread. It writes the batch to object storage before it acknowledges the upload. Any gateway replica delivers the queued batch to ClickHouse. Delivery retries until it succeeds, and a retried span is stored once. ## Read traces in Tilde Open the agent's **Tracing** tab. - The **observations** grid lists model and tool calls, with filters for session, invocation, model, latency, tokens, cost, time, and any span attribute. - The **waterfall** shows one trace's spans, nested by parent, and coloured by latency. - The **inspector** shows a span's input, output, and metadata. Images and other media in a span open from object storage. Tilde shows a trace only after it proves that one of its spans belongs to the agent. A trace can include spans from the gateway and from other agents the agent called. Tilde prices each model call from its own price list, so a trace shows cost as well as tokens. ## Retention and forwarding Tilde keeps trace history for the retention period you configure, or indefinitely if you set none. The same setting applies to logs. To send traces to another backend as well, point Tilde at your collector's OTLP/HTTP endpoint. Forwarding runs on its own queue, so a collector outage never delays the **Tracing** tab. See [OpenTelemetry](/integrations/opentelemetry). ## What a trace contains | Captured by default | Captured only if you opt in | | --- | --- | | The invocation and its runtime calls | Prompts and completions | | Trace context, propagated from the gateway | Tool inputs and outputs | | Model, token usage, latency, and errors, from your framework's instrumentation | | | Tilde SDK, sidecar, and gateway versions | | Spans that your framework's OpenTelemetry instrumentation creates inside `run` join the same trace. Whether they include prompts and tool inputs is that instrumentation's setting. Tilde's own instrumentation never captures request bodies or authorization headers. ## Use your own OpenTelemetry provider If your agent already configures an OpenTelemetry provider, add Tilde's span processor to it, rather than letting the SDK create a second provider. ```typescript Agent setup import { agentSpanProcessor, createAgentServer } from "@trytilde/sdk"; const provider = new NodeTracerProvider({ spanProcessors: [agentSpanProcessor, yourExistingProcessor], }); provider.register(); createAgentServer({ tracing: "existing", run }); ``` Register the provider's async context manager before you start the agent. Your spans then flow to both Tilde and your existing backend. --- # OpenTelemetry Source: https://trytilde.ai/docs/integrations/opentelemetry Tilde receives agent logs, traces, and metrics over OTLP, stores logs and traces in ClickHouse, and can forward a copy to your own OpenTelemetry collector. The Tilde gateway has an OpenTelemetry receiver built in. Agents send logs and traces to the gateway over OTLP/HTTP, so you do not need to run a collector for Tilde to work. If you already run an observability stack, Tilde can forward a copy of agent logs, traces, and metrics to your own collector. ![Telemetry flow: agents send OTLP logs and traces to the gateway, which queues them in object storage, stores them in ClickHouse, and can forward a copy to your OpenTelemetry collector](/images/telemetry-flow.drawio.svg) ## Signals | Signal | Protocol | Stored in | Forwarded to your collector | | --- | --- | --- | --- | | Logs | OTLP/HTTP | ClickHouse | Yes | | Traces | OTLP/HTTP | ClickHouse | Yes | | Metrics | OTLP/HTTP | ClickHouse | Yes | Tilde has a viewer for logs and traces. It stores metrics, and has no metrics viewer. ## Agent logs The Tilde SDK exports your agent's logs for you. It authenticates each upload, and the gateway then sets the identifying attributes itself, so an agent cannot forge them. | Log scope | Authenticated by | Attributes the gateway sets | | --- | --- | --- | | Invocation | The invocation token | Agent, invocation, run, and thread | | Deployment | The deployment token | Agent and deployment | Deployment-scoped logs cover startup and background work, when no invocation is active. Read logs in the agent's **Logs** tab. Filter by session, run, invocation, trace, scope, and severity. A log line's trace link opens that trace in the native viewer. ## Forward telemetry to your collector Point Tilde at your collector's OTLP/HTTP endpoint for each signal, with any headers it needs for authentication. Tilde then sends it a copy of every agent log, trace, or metric batch. Forwarding runs independently of Tilde's own history. If your collector is unavailable, the **Logs** and **Tracing** tabs are unaffected. ## Reliable delivery The gateway writes each accepted batch to object storage before it acknowledges the upload. Any gateway replica then delivers it, and retries until it succeeds. An outage in ClickHouse or your collector does not drop telemetry, and never slows your agents. Give each telemetry queue bucket an expiry rule of at least one day. Tilde never deletes a queued batch itself. ## Retention Tilde keeps log, trace, and metric history for the retention period you configure, or indefinitely if you set none. ## Use your own OpenTelemetry provider in an agent If your agent already configures OpenTelemetry, add Tilde's processors to your provider. | Signal | Processor | SDK option | | --- | --- | --- | | Traces | `agentSpanProcessor` | `tracing: "existing"` | | Logs | `agentLogProcessor` | `logging: "existing"` | See [Traces](/traces#use-your-own-opentelemetry-provider) for an example. --- # Deploy the gateway Source: https://trytilde.ai/docs/deployment/gateway Run the Tilde gateway as a Docker container in your own network, with PostgreSQL, ClickHouse, S3-compatible storage, an OpenTelemetry collector, and a GitHub token. The gateway is the Tilde platform. It serves the UI, the management and ingress APIs, the agent runtime protocol, the inference gateway, and telemetry ingestion. With Tilde OSS and Tilde Enterprise, you run it as a Docker container inside your own network, next to your databases and agents. Tilde does not host any part of it. With Tilde Cloud, Tilde runs the gateway for you. Skip this page, and [deploy your agents](/deployment/direct-agents). See [Editions](/editions). ## Self-hosting Tilde OSS Tilde is open source and freely available for anyone to host themselves. We include a Docker Compose file in the [tilde repository](https://github.com/trytilde/tilde), under an Apache 2.0 license, as guidance for self-hosting. Essentially, self-hosting Tilde means you run or purchase your own infrastructure, manage deployments, choose your own URLs to expose it on, and deal with any scaling issues yourself. The self-hosted version is the same product we run on Tilde Cloud, though our infrastructure is very different to support production volume. All changes go through our standard CI/CD pipeline before they ship to Tilde Cloud and become available for self-hosted instances. Because we don't manage self-hosted instances or provide paid support plans for them, we don't offer any sort of guarantees around Tilde working in certain ways on your infrastructure, and you assume all responsibility and risk for your use of the product and the stack. Tilde is a complex product to run, so for production we recommend [Tilde Cloud or Tilde Enterprise](/editions). Tilde Enterprise is the supported way to run Tilde on-prem. ### Run Tilde OSS locally The quickest way to try Tilde OSS is the quickstart Docker Compose file, `quickstart/compose.yaml` in the [tilde repository](https://github.com/trytilde/tilde). It runs the latest gateway image, `ghcr.io/trytilde/tilde`, with PostgreSQL, ClickHouse, and MinIO for S3-compatible storage. You need Docker with Docker Compose and OpenSSL. ```bash git clone https://github.com/trytilde/tilde.git cd tilde/quickstart ``` The gateway encrypts every credential it stores with this key. Keep the `.env` file: without the key, Tilde can't read its stored credentials. ```bash echo "TILDE_ENCRYPTION_KEY=$(openssl rand -base64 32)" > .env ``` ```bash docker compose up -d ``` Open `http://127.0.0.1:8080` and register your first agent. See [Anatomy of an agent](/anatomy-of-an-agent). Every port binds to `127.0.0.1`, so only your machine can reach Tilde. To pin a release instead of `latest`, add `TILDE_VERSION=` to `.env`. To stop Tilde, run `docker compose down`; add `-v` to delete its data too. ### Protect the UI and management API Tilde OSS has no operator sign-in. The UI and the management API accept every request that reaches them, and every caller has full control of the installation: agents, connections and their credentials, deployments, and telemetry. Before anyone else can reach a Tilde OSS gateway, you must put a reverse proxy or another authentication method in front of the UI and the management API. For example, use an authenticating proxy such as OAuth2 Proxy or your cloud's identity-aware proxy, a VPN, or mutual TLS. Never expose them to the internet without it. The runtime, sidecar, and ingress routes authenticate every call with their own tokens and signatures, so agents, sidecars, and chat providers do not go through your proxy's sign-in. To keep them apart, run the management routes in their own gateway process. See [Isolate route groups](/security/overview#isolate-route-groups). ## Deploy the gateway Deploy the gateway first. Every agent deployment mode depends on it. ![Tilde gateway deployed inside your on-prem environment, with infrastructure and agents on the left and ingress on the right](/images/gateway.drawio.svg) Everything inside the boundary stays private. Add the public ingress only when public chat providers such as Telnyx, WhatsApp, Slack, MS Teams, or AgentMail must deliver webhooks, or when external clients must reach chat routes. Expose only those paths. ## What the gateway depends on The gateway needs all of these dependencies. | Dependency | Purpose | | --- | --- | | PostgreSQL | Operational state. | | ClickHouse | Log, trace, and metric history. | | S3-compatible storage | The telemetry queue, trace media, skill files, attachments, and avatars. | | OpenTelemetry collector | Receives a copy of agent telemetry for your own observability backend. | | GitHub token | Syncs private Git skill sources, and raises GitHub rate limits. | ## Supported deployment methods The gateway is a single Docker container, so it runs anywhere you run containers. On every platform, run the gateway in a private network behind an HTTPS ingress or load balancer. ### Docker Compose The [tilde repository](https://github.com/trytilde/tilde) includes `quickstart/compose.yaml`, which runs the gateway and its dependencies on one machine. See [Run Tilde OSS locally](#run-tilde-oss-locally). Use it as a starting point when you self-host Tilde OSS on a virtual machine or bare-metal server: set your public URLs, use managed or backed-up databases, and put the gateway behind your HTTPS ingress and authenticating proxy. ### Kubernetes [ENTERPRISE] Run the gateway on Amazon EKS, Google GKE, Azure AKS, OpenShift, or your own cluster. We recommend Kubernetes. It gives you rolling updates, health-based restarts, and secret management out of the box, and it runs the gateway and your agents side by side. We provide onsite assistance for Tilde Enterprise deployments, and for monitoring them once they run. ### Managed container services [ENTERPRISE] Run the gateway on Amazon ECS and Fargate, Google Cloud Run, or Azure Container Apps. We provide onsite assistance for Tilde Enterprise deployments, and for monitoring them once they run. ## Next steps The simplest way to connect an agent to the gateway. Ports, routes, and what to expose publicly. --- # Deploy direct agents Source: https://trytilde.ai/docs/deployment/direct-agents Connect an agent container straight to the Tilde gateway over an outbound HTTP/2 stream, with no inbound port and no provider keys. A direct agent connects straight to the gateway. Start here unless you have a measured latency requirement that calls for [sidecars](/deployment/sidecar-agents). Direct agents require a [gateway](/deployment/gateway): your own with Tilde OSS or Tilde Enterprise, or Tilde's with Tilde Cloud. ![A direct agent workload dialing out to the Tilde gateway, which forwards LLM requests to providers](/images/direct-agent.drawio.svg) Your agent container holds your code and the Tilde SDK, in TypeScript or Python. The SDK dials out to the gateway over HTTP/2. Wakes, tool calls, and telemetry uploads all travel on that one connection. LLM requests also go to the gateway, which swaps in the real provider credentials and forwards them. The agent needs no inbound port, Kubernetes Service, or load balancer. It holds no provider API keys and needs no internet egress of its own. ## Where direct agents run A direct agent is an ordinary container, so it runs wherever you run containers: - **Kubernetes**, as a plain Deployment. It needs no Service or Ingress. - **Managed container services**, such as Amazon ECS and Fargate. - **Any Docker host.** We recommend Kubernetes. ## What a direct agent needs | Requirement | Detail | | --- | --- | | The Tilde SDK | TypeScript or Python. See [Anatomy of an agent](/anatomy-of-an-agent). | | A gateway address and a deployment token | Supplied as `TILDE_GATEWAY_URL` and `TILDE_DEPLOYMENT_TOKEN`. Keep the token in your secret manager. | | Private network access to the gateway | Outbound only. The agent accepts no inbound connections. | Every replica of a release uses the same deployment token, so you scale by adding replicas. Replicas finish their active invocations on shutdown, so rolling updates do not interrupt conversations. Register each release from your pipeline. See [Release agents from CI](/deployment/ci-cd). --- # Deploy sidecar agents Source: https://trytilde.ai/docs/deployment/sidecar-agents Run tilde-sidecar beside your agent so runtime calls and LLM requests stay on loopback for the lowest conversation latency. Choose sidecars when conversation latency matters. Runtime calls and warm conversation state stay on loopback inside the pod or task. Sidecar agents require a deployed [gateway](/deployment/gateway). ![An agent and tilde-sidecar sharing loopback in one pod, with the sidecar calling LLM providers directly](/images/sidecar-agent.drawio.svg) LLM requests go to the sidecar too. It holds provider credentials replicated from the gateway and calls the provider directly, so inference never detours through the gateway. Durable events, telemetry, and LLM usage flow to the gateway asynchronously. ## Where sidecar agents run The sidecar runs beside your agent and shares its loopback network. It ships in the Tilde image, so there is nothing extra to build. - **Kubernetes**, as a second container in the agent's pod. - **Amazon ECS and Fargate**, as a second container in the agent's task. We recommend Kubernetes. ## How traffic reaches a sidecar agent Your agent code does not change. It connects to the sidecar on loopback instead of to the gateway, and the sidecar connects out to the gateway. By default, client traffic reaches the agent through the gateway. For the shortest path, you can expose the sidecar's ingress port behind a private or public HTTPS ingress, so clients and webhooks reach the sidecar directly. ## Operational notes - The sidecar needs no database or observability credentials. It needs outbound HTTPS to your LLM providers. - Replicas hand conversations to each other directly, or through the gateway, so you can scale them freely. - You choose what happens when a replica fails mid-conversation. See [Routing](/routing#sidecar-failure-policy). --- # Deploy Lambda agents Source: https://trytilde.ai/docs/deployment/lambda-agents Run an agent as an AWS Lambda function that the Tilde gateway invokes through the AWS API. A Lambda agent runs as an AWS Lambda function. The gateway invokes the function through the AWS API, so you need no Function URL or API Gateway. The function then calls back to the gateway for runtime operations and telemetry. Lambda agents require a deployed [gateway](/deployment/gateway) with AWS credentials. ## Where Lambda agents run A Lambda agent runs in your own AWS account. You wrap your agent with the SDK's Lambda handler and deploy it as a standard Lambda function. ## What a Lambda agent needs | Requirement | Detail | | --- | --- | | Invoke permission | The gateway's AWS role can invoke the function. | | A registered deployment | You register the function's ARN as a deployment. A Lambda release can take traffic as soon as it is registered. | | A private network path | The function reaches the gateway privately, through your VPC, or through VPN or Direct Connect for a gateway outside AWS. | The gateway can reach the Lambda API through a [Lambda interface VPC endpoint](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc-endpoints.html), so invocations stay off the public internet. Lambda suits bursty and low-volume agents, where you would rather not run idle containers. Account for cold starts when you size the function. --- # Release agents from CI Source: https://trytilde.ai/docs/deployment/ci-cd Build your agent container, register a deployment in Tilde from your CI pipeline, roll it out, and start accepting traffic. Your CI pipeline builds the agent container from a regular Dockerfile and publishes it to your container registry. Before you roll out a new version, you register a deployment in Tilde with `tilde deploy`. The flow is the same for direct and sidecar agents. Only the target differs. ![Release pipeline from a push in CI, through deployment registration and rollout, to the router sending new conversations to the release](/images/agent-release-pipeline.drawio.svg) ## What your pipeline needs - A **registration credential**, stored as a CI secret. Expose it only to trusted deploy jobs. See [Registration credentials](#registration-credentials). - **Network access** to the gateway. For a self-hosted gateway, use a runner inside your network. - The **agent ID** of the agent you are releasing. Tilde works with any CI system. We provide a GitHub Action that registers a deployment, and every other system can run the same command. ## Register a deployment `tilde deploy` loads your agent's entry module without starting it, finds the prompts, tools, and skills your code declares, and registers them with the new deployment. It prints the deployment token. ```bash TypeScript npx tilde deploy dist/index.js ``` ```bash Python python -m tilde deploy main.py ``` Set `TILDE_URL`, `TILDE_API_KEY`, and `TILDE_AGENT_ID`, or pass them as options. Useful options: | Option | Effect | | --- | --- | | `--target` | `gateway`, `sidecar`, or `lambda`. | | `--external-id` | A unique ID for the release, such as the commit SHA. Registering the same ID again returns the same deployment, so the step is safe to retry. | | `--json` | Prints the deployment ID and token as JSON. | | `--dry-run` | Prints what would be registered, and contacts nothing. | Run it after you build, in the same environment as your agent's dependencies, so framework adapters can read your agent. See [Prompts](/prompts/overview#how-prompts-are-registered). ## Registration credentials Use a [management API key](/operator-access#management-api-keys) that holds the `deploy` action on the agent. A deployer role is enough. Use the agent's deployment registration key, from the agent's **Capabilities** or **Deployment** tab. It can register deployments for that agent only. ## How a release works 1. **Push or merge** to your release branch. 2. **Build and test** the agent image: your code, your framework, the core SDK, and its adapter. Node and Python images follow the same steps. 3. **Push the image** to your private registry. 4. **Register the deployment.** Your pipeline runs `tilde deploy`. It registers the release with its prompts, tools, and skills. Tilde returns a deployment ID and a one-time token. The release is registered but offline. 5. **Deploy.** Your pipeline stores the token in your secret manager and rolls out the new release with your usual tooling. 6. **Agent replicas start.** They dial the gateway with the token and send ready heartbeats. The deployment becomes serving. 7. **Routing moves traffic.** New conversations go to the new release according to your [routing](/routing) mode. Existing conversations stay pinned to their original deployment, so keep the old release running until they drain. ## Deployment tokens Tilde shows a deployment token once and stores only its hash. Your pipeline passes it straight to your secret manager, and every replica of the release uses it. Registration is safe to retry, and you can rotate a token at any time. ## Verify the release Open the agent's **Deployment** tab. The release shows as serving, with the commit linked. Select it to see the prompts, skills, and tools it shipped. Run a test conversation, then check its [session](/sessions) and [traces](/traces).