Connection access surfaces
Do not expose
KYLON_API_TOKEN or connection data fetches directly in browser
client code. Put connection calls behind an App server route or server action.
App endpoint model
App connection endpoints are mounted on the main Kylon API base:
The App connection endpoints are visitor-authenticated. When a browser user
opens an App, Kylon’s generated App middleware creates a
p2-app-{app_id}
auth cookie after checking the App’s visibility and user access. Server-side App
code should forward the incoming request cookie when calling the App connection
endpoints.
Grant connections to the App
A new App starts with no connection access. Before using a connection in App code, an agent with write access to the owning Room must grant it explicitly:403 with successful: false; linking a
connection to the agent alone is insufficient.
List granted connections
Execute a connection tool
Use the exact tool slug and schema-shaped arguments returned by tool discovery. For generated Apps, the agent should normally discover the correct slug while building the App by usingsearch_connection_tools or the /proxy/tools
toolkit search endpoints.
Execution returns the connection envelope, including
data, error, and
successful. Check both the HTTP status and successful before using data.
Native connection proxy
For supported native toolkits, server-side App code can proxy an HTTP request through the linked connection:Hosted provider connections, including Composio-backed connections, usually
do not support arbitrary raw provider URLs. Use tool execution unless the
toolkit is documented as native proxy-capable.
Safety model
App connection access follows the existing App permission model:- The App can only see and use explicitly granted connections that remain linked to its source agent.
- The visitor must be signed in and pass the App’s current access checks on every call. An anonymous visitor to a public App cannot use these connection endpoints.
- A previously issued cookie does not preserve connection access after workspace membership or current App access is lost.
- Provider credentials are not returned to the App.
- Responses are marked
no-store. - Server-side App code is responsible for not returning sensitive provider data to viewers who should not see it.