Skip to main content
Generated Kylon Apps can call connection-backed APIs from server-side App code. Use this when an App needs to read or update data through the same connections the source agent can use, such as Gmail, Google Calendar, Google Drive, Slack, Notion, or another linked integration.

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:
Generated Apps receive these environment variables after deployment: 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.
Keep KYLON_API_TOKEN server-side only. It can be useful when server-side App code needs the agent-level /proxy/tools/* API, but it should never be sent to the browser.

List source-agent connections

The response contains the connections linked to the App’s source agent:

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 using search_connection_tools or the /proxy/tools toolkit search endpoints.
Request body:

Native connection proxy

For supported native toolkits, server-side App code can proxy an HTTP request through the linked connection:
Request body:
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 connections linked to its source agent.
  • The App visitor must pass the App’s auth and visibility checks.
  • 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.
If an App becomes visible to more users, connection-backed App routes can also be reached by that broader audience. Review server-side routes before changing App visibility.