Setgreet for AI agents
A drop-in instructions block that teaches Cursor, Claude Code, and Copilot to install the Setgreet SDK and use the MCP server correctly.
Setgreet for AI agents
Coding agents work best with a short instructions file in your repo. This page gives you a copy-paste block that teaches your agent two things: how to install the Setgreet SDK into your app, and how to author flows through the MCP server instead of hand-writing flow JSON.
Where to put it
Paste the block below into whichever file your agent already reads. One file covers most tools:
AGENTS.mdat your repo root -- the open standard read by Cursor, Claude Code, Copilot, and others.CLAUDE.mdfor Claude Code, or.cursor/rules/setgreet.mdcfor Cursor, if you prefer tool-specific files.
You do not need all three. AGENTS.md is the simplest choice.
The block
## Setgreet
This app uses Setgreet for in-app flows (onboarding, paywalls, surveys), rendered
natively and published over the air without an app release.
### Authoring flows
- Author, edit, and publish flows through the Setgreet MCP server, not by hand.
Do not write flow JSON directly.
- Connect the MCP server at https://mcp.setgreet.com/mcp (see
https://www.setgreet.com/docs/mcp for per-client setup).
- Publishing a flow affects the live app. Always show the drafted screens and ask
for confirmation before calling publish_flow. Destructive tools require an
explicit confirm; never pass it without asking.
- To generate a flow, use compose_flow. To edit one, use get_screen +
update_component / reorder_screens / add_screen_from_pattern.
### Installing the SDK
Install the SDK for this app's platform and initialize it early in the app
lifecycle with the App Key from the Setgreet dashboard (Settings, App). Use the
latest published version, not a placeholder.
- iOS (Swift): add the Swift package https://github.com/setgreet/setgreet-ios-sdk,
then `Setgreet.shared.initialize(appKey: "YOUR_APP_KEY", config: SetgreetConfig())`
in AppDelegate.
- Android (Kotlin): add `com.setgreet:setgreet` from Maven Central, then
`Setgreet.initialize(context, "YOUR_APP_KEY", SetgreetConfig())` in Application.onCreate.
- React Native: `npm install @setgreet/react-native-sdk`, then `initialize("YOUR_APP_KEY", {})`
in your root component.
- Flutter: add `setgreet` from pub.dev, then
`Setgreet.initialize("YOUR_APP_KEY", config: SetgreetConfig())` at startup.
Confirm the exact init signature against the SDK README for your platform, then
flows appear automatically based on their targeting rules.
Full SDK docs: https://www.setgreet.com/docs/sdkReplace YOUR_APP_KEY with the App Key from your dashboard, and pin the latest published SDK version rather than a
placeholder. Your agent should look up the current version from the SDK's package registry or GitHub releases.
Why this exists
The MCP server runs against your Setgreet workspace, so it can author and publish flows for you. It cannot reach into your app's codebase to install the SDK. This instructions file closes that gap: the agent uses the MCP server for everything flow-related, and follows the SDK steps here for the one job the MCP server cannot do.
Next steps
- Use Setgreet with AI agents -- connect the MCP server.
- Recipes -- end-to-end agent workflows.
- Platform SDKs -- full per-platform install guides.