Skip to content

Variations

The Quickstart keys every profile by your own user id. Until that user links a real Configure account, the profile is yours: it exists only in your namespace, and your secret key is full authority over it. Nothing about it is portable yet, and nobody else can see it.

Every snippet here uses the handle from the Quickstart, built once on your server:

ts
import { Configure } from "configure";

export const configure = new Configure({
  apiKey: process.env.CONFIGURE_API_KEY,   // sk_..., server only
  agent: process.env.CONFIGURE_AGENT,      // your agent handle
});

export const profileFor = (userId: string) => configure.profile({ externalId: userId });

They can link at any time, through the same Connect chip. When they do, their profile migrates in place: nothing is lost, and the externalId you use does not change.

One thing does change, and it will catch you out if you run more than one agent.

Linking clears every agent's approval for that user. The connect page re-grants only the one agent the user approved. This is deliberate: while the profile was yours it was auto-approved for every agent of yours that touched it, and those are not consents a human ever gave. Once the account is real, the user decides who gets it, not your key.

So your other agents start refusing the moment that user links:

ts
try {
  const read = await profile.read({ sections: ["identity", "preferences", "summary"] });
} catch (err) {
  if (err.code === "approval_required") {
    // Your key is no longer authority over this user. Ask them.
    const { connect_url } = await profile.connect();
    return showConnectCard(connect_url);
  }
  throw err;
}

profile.connect() and profile.mcpSession() keep working while approval is outstanding, precisely so you can mint the link that fixes it. Everything else, reads and writes alike, waits for the user.

Handle approval_required once, in whatever wraps your Configure calls, and this becomes invisible.

Sign in with Configure

Configure can be your account system instead of a profile alongside one. That is its own page: Sign in with Configure.

Two other shapes

  • Your agent has no screen (SMS, voice, a CLI, a scheduled job): the minted link is the button. See Message agents.
  • You do not own the model loop (the user runs Claude, ChatGPT, or a coding agent): point the host at mcp.configure.dev and stop. See MCP. That is the one case where "connect MCP and stop" is the whole integration, because the host carries its own read and save behavior. In every other case it is not, since nothing would inject context on the first turn and nothing would commit the turns.

Personalization infrastructure for agents