KYCIS SDK Docs
Android

Runtime Config

Dynamic configuration and remote config refresh

Config Precedence

SDK runtime config resolves in this order (highest priority last):

  1. SDK XML defaults (kycis_config.xml, debug/release variants)
  2. Remote config from backend GET /v1/sdk/config
  3. In-memory merged config exposed by AI.getConfig()

Remote Config Fetch

The SDK fetches config asynchronously after init:

GET /v1/sdk/config
Headers:
  X-KYCIS-SDK-Version: 1.0.0
  X-Client-ID: your_client_id
  X-API-Key: your_api_key (optional, per backend policy)

Response includes:

  • features — boolean feature flags
  • thresholds — numeric thresholds (cooldowns, limits)
  • metadata — version and targeting info

Dynamic Refresh Behavior

SDK refreshes remote config periodically during active sessions:

  • Controlled by kycis_config_refresh_interval_seconds (default 60s)
  • AI.getConfig() always returns the latest merged snapshot
  • Backend changes propagate without app restart

Reading Config at Runtime

val cfg = AI.getConfig()

// Check feature flags
if (cfg.isFeatureEnabled("allow_multiple_assistant_prompt")) {
    // Multiple prompts allowed with cooldown
}

// Read thresholds
val cooldown = cfg.thresholds["min_trigger_interval_seconds"]

Critical Flag Example

trigger.suppress_high_time_spent (backend) is mirrored to SDK-facing feature:

  • suppress_high_time_spent_trigger (SDK merged config feature)

This keeps trigger suppression aligned across backend decisions and SDK-side guard logic.

Config Verification Checklist

  1. Update backend kycis.yaml flag
  2. Restart backend
  3. On client, wait one refresh interval (or restart app)
  4. Verify AI.getConfig().isFeatureEnabled("<feature>")
  5. Verify behavior in /api/activity

No-Op Mode

For testing without backend:

// Use NoOpBackendClient (automatic in test mode or when backend unreachable)
// Trigger always returns false
// Session start returns error

Configuration Files Reference

FilePurpose
android-sdk/sdk/src/main/res/values/kycis_config.xmlProduction defaults
android-sdk/sdk/src/debug/res/values/kycis_config.xmlDebug overrides
backend/config/kycis.yamlBackend feature flags
backend/app/config.pyFeature flag registry

On this page