Remote Config
Dynamic configuration values your app fetches at runtime, with stored segment and percentage conditions.
Remote config lets you change app behavior without shipping an update. Set key / value pairs on the server and the SDK fetches them with config.fetch(). Keys can also carry per-segment or percentage-rollout conditions, which apply to signed-in users; a caller without a session gets each key's default value.
How it works
- Admins (or AI agents via MCP) set config values on the server. Every value has a type (
string,number,boolean,json) and optional stored conditions for specific segments or a percentage of users. - The client SDK fetches the key → value map from
GET /v1/client/config. The SDK keeps no cache of its own. The response carriesCache-Control: private, max-age=300, so in a browser a repeatconfig.fetch()within five minutes can return the browser's cached copy. Keep the result in app state and callfetch()again when you want fresh values. - The route returns an
ETagheader. A request that sends it back inIf-None-Matchgets304 Not Modifiedwhile nothing changed, which helps when you call the route yourself. The SDK'sfetch()sends noIf-None-Matchand always receives the full map. - Server-side version hashes make change detection fast: flipping a value bumps
config_versions.version_hash, which changes theETag.
SDK usage
Method signature:
Get a single value
Because each value is typed as unknown, cast to your expected type. Always provide a default:
Get the full config map
Refresh
Expo
Amba.config.fetch() returns the full ConfigBundle ({ version, values }); read individual keys off values.
Manual refresh in Expo
Conditional values
A config key can carry conditions that target segments or a percentage of users. GET /v1/client/config evaluates them for a signed-in user, in order, and returns the value of the first condition that matches; a caller without a session gets the default value.
Example schema stored in remote_configs.conditions:
This stores a default of false with a seg_power_users override and a 25% rollout condition; GET /v1/client/config returns false.
Setting config values
Via the Admin API
Via MCP
Via the CLI
Routes reference
| Method | Path | Description |
|---|---|---|
GET | /v1/client/config | Fetch config values. Supports If-None-Match → 304. |
POST | /v1/admin/projects/:projectId/config | Create or update a config value |
GET | /v1/admin/projects/:projectId/config | List all active config values |
PATCH | /v1/admin/projects/:projectId/config/:key | Update a specific config |
DELETE | /v1/admin/projects/:projectId/config/:key | Delete a config value |
MCP tools
| Tool | Description |
|---|---|
amba_remote_configs_list | List a project's config keys (values, types, conditions) |
amba_remote_configs_create | Create / upsert a key with optional conditions |
amba_remote_configs_update | Partially update a single key (only fields provided) |
amba_remote_configs_delete | Remove a key |