Connect three real services, delegate OAuth to your users, and ship a working agent in minutes. Clone the sample, swap in your tools, and it runs automatically every hour, no manual runs needed.
This repo uses per-connector *_USER env vars to simulate one user. In production, pass each user's real ID as the identifier on every Scalekit call, and send them an authorization link whenever their connector status is not ACTIVE.
sk = ScalekitClient(
client_id=SCALEKIT_CLIENT_ID,
client_secret=SCALEKIT_CLIENT_SECRET,
env_url=SCALEKIT_ENV_URL,
)
connect = sk.connect
def ensure_authorized(connect, connector, user_id):
resp = connect.get_or_create_connected_account(
connection_name=connector, identifier=user_id,
)
if resp.connected_account.status != "ACTIVE":
link = connect.get_authorization_link(
connection_name=connector, identifier=user_id,
).link
print(f"Not authorized for {connector}. Open:\n{link}")
return False
return True
for connector, user in [("gong", GONG_USER), ("attio", ATTIO_USER), ("slack", SLACK_USER)]:
if not ensure_authorized(connect, connector, user):
sys.exit(1)Three things you'd otherwise build: Gong OAuth, Attio credentials, Slack identity. All must be live when the report fires. Handled.
You have the Scalekit authstack plugin installed (AgentKit + SaaSKit skills and MCP auth). Before coding, auto-load the AgentKit skills relevant to connectors (Gong, Attio, Slack) and use the Scalekit MCP server to validate tool calls instead of hand-written API logic.
Fetch recent calls from Gong. For each, analyze sentiment and objections using an LLM or a rule-based fallback. Cross-reference with Attio deals via the connector tools. Compute a risk score (0.0 safe to 1.0 high risk). Format and post the prioritized risk report to the AE as a Slack DM. Run automatically every hour via scheduler.py so no manual runs are needed.
Read-only steps (Gong, Attio) run without asking; ask before using write tools (the Slack DM). Exit with code 0 on success, 1 on error, 2 if no calls are found.
Each one runs on delegated identity, scoped per user.