Temporal Continuity API / Install
Install the Temporal Continuity API
Follow these steps from your Node.js application. Each step tells you exactly where the configuration belongs.
Run this command in a terminal from the root directory of your Node.js application.
npm install temporal-continuityThe tc-cognition cognition bridge is a required dependency and installs automatically with the Temporal Continuity API.
When you create an API key, Temporal Continuity gives you a complete installation block. Save that block before leaving the Create Key page, then add it to your application's environment configuration, such as a .env file.
TEMPORAL_CONTINUITY_API_KEY=rms_test_...
TEMPORAL_CONTINUITY_BASE_URL=https://api.rscapex.com
TEMPORAL_CONTINUITY_ORGANIZATION_ID=org_...
TEMPORAL_CONTINUITY_PROJECT_ID=project_...
TEMPORAL_CONTINUITY_ENVIRONMENT_ID=environment_...Use an rms_test_ key during development. Use an rms_live_ key in production.
If Temporal Cognition will use OpenAI, add your OpenAI credential to the same environment configuration. Temporal Cognition reads this credential when it invokes cognition.
OPENAI_API_KEY=your_openai_api_keyYou supply and control the cognition-provider credential. Temporal Continuity does not own cognition or persist this credential as relational memory.
Skip this step when using the built-in OpenAI adapter. For Anthropic, Gemini, a local model, or another cognition source, create an object that implements the Temporal Cognition provider contract and register it during application startup.
import { registerProductionCognitionProvider } from "tc-cognition";
const myProvider = {
id: "my-provider",
model: "my-model",
async generate(request) {
// Send request.instructions and request.input to your cognition provider.
const text = await callMyCognitionProvider(request);
return {
provider: "my-provider",
model: "my-model",
responseId: crypto.randomUUID(),
outputText: text,
elapsedMs: 0
};
}
};
registerProductionCognitionProvider(myProvider);Temporal Cognition mediates the cognition call. The provider does not become the owner of Temporal Continuity relational state.
Create the Temporal Continuity client with the Temporal Continuity API installation values from Step 2.
import { TemporalContinuity } from "temporal-continuity";
const temporalContinuity = new TemporalContinuity({
apiKey: process.env.TEMPORAL_CONTINUITY_API_KEY,
baseUrl: process.env.TEMPORAL_CONTINUITY_BASE_URL,
organizationId: process.env.TEMPORAL_CONTINUITY_ORGANIZATION_ID,
projectId: process.env.TEMPORAL_CONTINUITY_PROJECT_ID,
environmentId: process.env.TEMPORAL_CONTINUITY_ENVIRONMENT_ID
});Use the values exactly as Temporal Continuity provided them in your saved installation block.
APPLICATION
↓
TEMPORAL CONTINUITY
↓
TEMPORAL COGNITION (TC)
↓
YOUR COGNITION PROVIDER
↓
TEMPORAL COGNITION (TC)
↓
TEMPORAL CONTINUITY