Import existing context
Import transcripts from another assistant or context your app already stores. The imported context becomes available in the user profile before the first conversation with your agent. Use imports to add existing context or migrate stored data. Connected agents contribute subsequent updates through MCP tools or SDK conversation commits. Importing an export does not create an ongoing connection to its source.
Choose the import method for a single user or a batch of existing users.
| Method | Use case | Result |
|---|---|---|
profile.import(text) | A user submits content to import, such as a pasted export | One user, returns the stored memory |
configure.importProfiles({ mode, users }) | You are integrating and already have users | Many users, returns a job you poll |
Set up the client
Create the SDK client on your server with your secret key.
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 });Import content for one user
When someone pastes a transcript, an export, or a long note, do not split it into remember() calls. Send the complete text to Configure for extraction.
ts
const result = await profileFor(user.id).import(pastedText);
// { saved: true, box: "work", distilled: true, memory: { id, text, ... } }Configure extracts durable facts and stores them in a profile category. The response identifies the category in box. Set box in the request to select a category. The response carries memory.id, which is the ID forget() needs.
Use this instead of many remember() calls when the content is longer than a sentence or covers more than one topic.
Every user you already have
For a product with existing users, backfill the context you already store. Configure creates a synthesized profile that your agent can use after the user connects.
ts
const job = await configure.importProfiles({
mode: "backfill",
idempotencyKey: `backfill-${batchId}`,
users: [
{
externalId: user.id,
profile: {
summary: "Runs a small logistics company in Rotterdam.",
preferences: ["Prefers metric units"],
},
conversations: [
{ id: thread.id, messages: [
{ role: "user", content: "We ship pallets to Hamburg twice a week." },
{ role: "assistant", content: "Noted, twice weekly to Hamburg." },
]},
],
},
],
});
// { id: "imp_...", status: "queued", accepted_profiles: 1, quota: { imported_profiles: { used, limit, remaining } } }mode is backfill. externalId is the same ID you use everywhere else. Use the same externalId when the user later links a Configure account.
Set an idempotencyKey for each batch. Repeating the same request returns the existing job without duplicating imports. This allows retries after a timeout.
Read quota.imported_profiles on the response. It reports used, limit and remaining for your account. On a large migration, check it between batches so you do not hit the limit mid-run.
The job finishes after the call returns
importProfiles() returns as soon as the work is accepted, with status: "queued". Distillation happens afterwards. A small batch usually finishes within seconds.
ts
const res = await fetch(`https://api.configure.dev/v1/import/jobs/${job.id}`, {
headers: { "X-API-Key": process.env.CONFIGURE_API_KEY, "X-Agent": process.env.CONFIGURE_AGENT },
});
const status = await res.json();
// { status: "completed", processed_profile_count: 1, imported_memory_count: 3, failed_profile_count: 0 }status moves through queued, processing, then completed, failed or cancelled. Poll it over HTTP. The published SDK can start a job but has no method to read one back.
Run backfill during integration instead of blocking a user request on the job. Other profile operations remain available while processing continues. When the job completes, check failed_profile_count. A job can finish with some users imported and others not.
What it does not do
Importing does not link anyone. A backfilled profile is developer-scoped context keyed by your externalId, the same as a user who has not connected yet. Connecting is still what gives you their wider profile and their apps. The user still decides whether to connect. See Quickstart for that flow.