An Agent Channel is a governed entry point that lets software outside Treasure AI Studio run chats inside it. Your application, or an MCP client your team already uses, gets the same agent your team talks to in Studio — grounded in the same work folders, running with permissions someone in Studio already holds — without you building an agent or hosting a model. Set one up when a product you own needs a conversation with your data in it — a support widget, an internal tool, a customer-facing assistant — or when people want to run Actions from the AI tool they already work in.
This page explains what an Agent Channel is, the parts every channel is made of, how the kinds compare, and how a request travels to an answer. The pages under it cover creating each kind, the credentials involved, and the client side.
An Agent Channel is a named, account-level object that decides two things for every chat that arrives through it: whose permissions the chat runs with, and which work folders it can reach. A channel answers them in one of three ways.
- As a designated executor, in one shared work folder. An SDK App or a static-token MCP Endpoint binds together one shared work folder the chats read, one executor whose permissions and credits the chats run with, and one or more connection secrets the caller authenticates with. Every chat gets exactly that combination — there is no request parameter that changes it. Whoever calls it needs no Treasure AI Studio account.
- As the person who connected. An OAuth MCP Endpoint binds no folder and no executor. Each person signs in to Studio from their MCP client and allows it access, and the client's chats run as that person, in the work folders they can already use. Only members of the account can connect.
- As the person who linked their Slack account, in one shared work folder. A Slack bot binds one shared work folder, which its chats read and cannot change, and no fixed executor. Each Slack user links their Treasure AI Studio account once, and every request runs as that person, checked against that person's current access to the folder.
For the executor kind, anchoring the folder and the executor to the channel, rather than to the secret, is what makes the channel governable. A secret carries no permissions of its own, so issuing another one grants nothing new, and rotating one cannot widen what the channel reaches without anyone noticing. For the OAuth kind, nothing is lent: a client can do only what the person who connected it can do in Studio.
Every Agent Channel has the same parts. A caller connects in one of the supported ways and presents a credential. The Agent Gateway receives the call, and Treasure AI Studio checks the credential against the channel and starts or continues a chat. The kinds of channel differ in the caller, the credential, who the chat runs as, and what the caller can ask for; the gateway is shared by all of them.
In the diagram, blue arrows are the path of the channels that run as an executor — SDK Apps and static-token MCP Endpoints. Orange arrows are the path of the OAuth MCP Endpoint, which runs as the person who connected. Magenta arrows are the path of a Slack bot, which runs as the person who linked their Slack account. Its requests check that person's login and access through a separate arrow. A Slack bot's chat reads its one shared work folder, not the person's other work folders.
| Part | What It Is |
|---|---|
| Caller | The software that connects. It never reaches Treasure AI Studio's internal APIs, only the fixed surface the gateway publishes for its kind of channel |
| Credential | What the caller presents. A Gateway Token or Chat Access Token carries no permissions of its own; the channel it belongs to decides what it reaches. An OAuth access token stands for the person who allowed the client access |
| Agent Gateway | The public entry point shared by every kind of channel. It translates the caller's protocol into Studio chat operations and passes back only what it names: a fixed set of stream events for an SDK App, and only the answer text, as a tool result, for an MCP Endpoint |
| Treasure AI Studio | Resolves the credential to its channel and refuses the call if the channel is disabled or deleted — and, for the executor kind, if it has no executor or the executor has lost access to the folder. The check runs on every request; for SDK App messaging, a change can take up to about a minute to apply. It then starts the chat, or continues one the channel created |
| Chat | An ordinary Studio chat. For the executor kind, it is owned by the executor and paid for with their credits, reads the shared work folder read-only, and writes only to a work area of its own — see What an Agent Channel Chat Can Reach. For the OAuth kind, it is the person's own chat, with everything their chats in Studio have — see OAuth MCP Endpoints |
The kinds of channel compare as follows:
| Aspect | SDK App | MCP Endpoint, Static Token | MCP Endpoint, OAuth |
|---|---|---|---|
| Caller | The server of an application you host, which serves its own end users | An MCP client or an agent you write | Each member's own MCP client |
| Protocol | Vercel AI SDK UI Message Stream over HTTP, plus a control API for creating and managing chats | MCP over Streamable HTTP | MCP over Streamable HTTP |
| Credential | A Gateway Token on your server creates chats; each chat gets its own short-lived Chat Access Token | The Gateway Token alone, sent as a fixed Authorization header on every request | An access token the client obtains when the person signs in and allows access, and renews on its own |
| Runs as | The channel's executor | The channel's executor | The person who connected |
| Scope | One shared work folder, chosen when the channel is created, read-only | One shared work folder, chosen when the channel is created, read-only | The person's own work folders, with their permissions to change them |
| What the caller can do | Send a prompt, stop a turn, read the conversation, and answer the agent's questions | Six tools: list the folder and its Actions, run an Action, start or continue a chat, read the latest result | The same six tools, across the person's work folders |
| How the answer comes back | Streamed as it is written | As the tool result, once the turn finishes, the agent asks a question (which the gateway declines on the client's behalf), or the gateway's wait runs out | As for a static-token endpoint |
| Who creates it | A folder manager the creation policy allows | A folder manager the creation policy allows | An account administrator |
| Calls from a browser | The messaging API accepts them only when the SDK App turns on browser access. The control API takes the Gateway Token and belongs on your server | Always refused | Always refused. The browser is used only for signing in |
Choose an SDK App when you are building a product with its own users and its own interface. Choose a static-token MCP Endpoint when the caller is one agent or service that should get one folder's Actions as tools. Choose an OAuth MCP Endpoint when members of the account want to use Studio from their own MCP clients, each as themselves.
The path through the parts above differs by kind, because each kind's protocol does.
The gateway speaks the Vercel AI SDK UI Message Stream protocol, so you can drive a chat with an unmodified open-source client.
Four things happen, in this order:
- Your server creates a chat by calling the Agent Gateway with its Gateway Token, the channel's long-lived connection secret.
- The gateway answers with a Chat Access Token and a set of endpoint URLs. That token is scoped to that one chat and nothing else.
- Turns run against those endpoints, streamed as server-sent events. Your server can proxy them, or your client can call the gateway directly.
- The agent works inside the channel's shared work folder, reading it as the executor, and its answer streams back the same way.
The two credentials exist because the second one can safely reach a browser and the first one cannot. Gateway Tokens and Chat Access Tokens explains what each one permits and how long it lives.
An MCP client calls the endpoint's URL with the channel's Gateway Token in a fixed Authorization header, on every request. There is no second credential, because the caller is a server-side client, not a browser.
- The client calls a tool, such as
run_actionwith the name of one of the folder's Actions. - The token is checked on that request, along with the endpoint's status and the executor's access to the folder.
- The tool starts a chat in the shared work folder, running as the executor, and the gateway waits for the answer.
- The answer comes back as the tool result. If the agent is still working when the wait runs out, the result carries the chat ID, and the client collects the answer later with
get_chat_result.
The client is given only the URL. The first time it connects, the endpoint refuses it and points it to Treasure AI Studio's sign-in. Signing in happens once; after that, every tool call carries the access token it produced.
- The person signs in and allows access. The client opens Studio in a browser, the person signs in as usual, chooses the account, and selects Allow access. The client receives an access token for that person and renews it on its own.
- The client calls a tool with that access token in the
Authorizationheader. - The token and the person's permissions are checked on that request, along with the endpoint's status.
- The tool starts a chat as the person, in the work folder it names, and the answer comes back as the tool result, as for a static-token endpoint.
Connecting an MCP Client covers the tools and their results in full, and OAuth MCP Endpoints covers sign-in.
A Slack bot receives events from Slack, not from a client that calls the gateway, so this path starts in Slack.
- A person sends a DM or mentions the bot in a channel. Slack sends the event to the Agent Gateway, which checks that the request really came from Slack and answers Slack before it handles the message.
- Treasure AI Studio checks the request. It confirms the sender's linked login, that the person belongs to the bot's account, that the bot is enabled and installed, and that the person can still read the shared work folder. It also records the request, so a repeated delivery from Slack does not start the same chat twice.
- Treasure AI Studio starts or continues the chat. A new thread starts a chat that belongs to the linked person and attaches the shared work folder read-only. In a channel, only the person who started the thread can continue its chat.
- The answer streams back into the thread. The gateway shows the agent's text in the thread as it is written. A long answer continues in more messages in the same thread.
For SDK Apps and static-token MCP Endpoints, the two choices that decide how much a channel exposes are made when it is created, by someone who already holds the permission to make them:
| What Is Fixed | Meaning |
|---|---|
| Shared work folder | The single folder the channel's chats can read. Chosen from folders the creator manages, and it cannot be changed afterward — a different folder means a different channel |
| Executor | The Treasure AI Studio user the chats run as. Always the creator at first, and it changes only when another manager of the same folder takes the role over. Permissions, connections, credits, and audit trail all follow the executor — never the end user who triggered the chat |
An SDK App also has two settings that are chosen at creation and can be changed later with Edit: Browser access, which decides whether the gateway accepts calls that carry an Origin header and is off by default, and the Chat Access Token lifetimes, 24 hours idle and 30 days at most by default. An MCP Endpoint has neither: the gateway always refuses browser calls to it, and its token is the only credential.
An OAuth MCP Endpoint fixes neither: the folders and the permissions are those of whoever connects, checked on every request.
A Slack bot fixes its shared work folder when it is created, like an SDK App or a static-token endpoint, but it has no executor. Each new request runs as the person who linked their Slack account, and that person's access to the folder is checked for each request.
Because the folder and executor are fixed on the channel, whoever calls an SDK App or a static-token endpoint has no way to reach a second folder, borrow someone else's permissions, or extend their own access. What they can do is narrow — through an SDK App, send a prompt and stop a running answer; through an MCP Endpoint, run the folder's Actions and send it tasks — and What an Agent Channel Chat Can Reach sets out the full boundary, including the parts that are not restricted.
Agent Channels have their own section in Treasure AI Studio's settings, on Web and Desktop. Open Settings → Agent Channels to see the account's channels, with SDK Apps and MCP Endpoints in separate sections.
Every member of the account can see that a channel exists, along with its name and status. For SDK Apps and static-token MCP Endpoints, the folder it reaches, its executor, its connection settings, and its tokens are shown only to the people who manage that folder, the executor, and account administrators — for everyone else those cells are masked. An OAuth MCP Endpoint has no folder, executor, or tokens to mask. Creating and Managing an SDK App and Static-Token MCP Endpoints cover the page in detail.
Setting up an SDK App or a static-token MCP Endpoint involves up to three roles, and one person often fills more than one:
| Role | Responsibility |
|---|---|
| Folder manager | Creates the channel, picks the folder, issues and revokes connection secrets, and deletes the channel. Opening a folder to an outside application is their decision, so the irreversible actions stay with them |
| Executor | Consents to chats running under their permissions and cost. Becomes executor by claiming the role, and can step down at any time, which stops the channel but leaves it and its tokens intact |
| Account administrator | Sees every channel in the account, can switch one off or back on, and sets who may create channels. Being an administrator alone does not let them create, edit, delete, or revoke — administrator actions on a channel are all reversible by design |
Whether a folder manager can create one at all depends on the account's creation policy: by default any folder manager can, and an account administrator can limit creation to administrators. One policy covers both kinds. See Choose Who Can Create Agent Channels.
An OAuth MCP Endpoint has a simpler split. Account administrators create and manage it, whatever the creation policy says, and each member who connects consents for themselves on the sign-in screen.
| Aspect | Detail |
|---|---|
| Kinds of channel | Four: the SDK App and the static-token MCP Endpoint, each with one shared work folder and a fixed executor; the OAuth MCP Endpoint, which runs as each connected person; and the Slack bot, which runs as each linked person in one shared work folder |
| Protocols | The Vercel AI SDK UI Message Stream for SDK Apps, and MCP over Streamable HTTP for MCP Endpoints |
| Per-channel tool and credential restrictions | None. A channel's chats run with the full set of tools, connections, and credentials of whoever they run as — the executor, or the connected person — see What an Agent Channel Chat Can Reach |
Do my application's users need Treasure AI Studio accounts? Not for an SDK App or a static-token MCP Endpoint. Those exist so that people without a Treasure AI Studio account can use an agent through your application or an MCP client, and identifying your own users, and deciding which of them may start a chat, is your application's job. An OAuth MCP Endpoint is the opposite: only members of the account can connect, and each connects as themselves.
Whose credits do these chats consume? For an SDK App or a static-token MCP Endpoint, the executor's. Every chat created through it is attributed to the executor for permissions, connections, quota, and cost, regardless of which end user triggered it. Budget for such a channel as you would for one heavy user. Through an OAuth MCP Endpoint, each person's chats use their own credits. A chat started from a Slack bot uses the credits of the person who sent the request.
Can two applications share one SDK App? They can share a Gateway Token, but it is usually not what you want. A channel is the unit you disable, delete, and audit, so two applications sharing one lose the ability to stop one without stopping the other. Create one SDK App per application and give each its own token.
Can an Agent Channel write to the shared work folder? Not through an SDK App or a static-token MCP Endpoint. Their chats can read the folder but never write to it, and the scratch space each chat writes to belongs to that chat alone and is deleted with it. Anything the agent produces has to leave through the conversation. A chat through an OAuth MCP Endpoint is the person's own chat, so it can change files in their work folders as far as their permissions allow.
Can I see these chats in Treasure AI Studio? Yes, in the chat list of whoever they ran as, marked with a conversation icon of two speech bubbles in place of the usual chat icon. For an SDK App or a static-token MCP Endpoint, they are in the executor's list, and a label above the title says which kind created the chat — SDK App or MCP. For an OAuth MCP Endpoint, they are in the connected person's list, with the name of the folder they ran in in place of a label. A chat started from a Slack bot is in the list of the person who sent the request, labeled Slack.
Creating and Managing an SDK App
Create a channel, issue its first token, and run it: statuses, executor handover, and shutdown.
Static-Token MCP Endpoints
Publish a shared work folder as an MCP server and manage its executor, status, and tokens.
OAuth MCP Endpoints
Let each member connect their own MCP client and work as themselves, and manage the common MCP URL.
Slack Bots
Create a Slack bot that lets a Slack workspace use a shared work folder, install it, and manage it.
Using a Slack Bot
Sign in from Slack, send requests by DM or mention, see who can read replies, and unlink your account.
Connecting an MCP Client
Configure the client, run Actions and chats with six tools, and read their results.
Gateway Tokens and Chat Access Tokens
The two credentials, what each one permits, how long they last, and how to rotate and revoke them.
Building a Chat App with the Vercel AI SDK
Create chats from your server, stream turns with useChat, and handle the one tool you must implement.
What an Agent Channel Chat Can Reach
The workspace, the credentials, and the limits that apply to a chat arriving through a channel.