Open Agent Loops
API Reference

InMemoryCredentialStore

@open-agent-loops/core


Defined in: credentials/in-memory-credential-store.ts:52

RAM-backed CredentialStore seeded from a record of secrets.

Remarks

SECURITY: secrets are kept in plaintext in process memory and are lost on restart. Treat the instance as a trust boundary — only hand it to tools that are meant to receive real credentials.

Example

const store = new InMemoryCredentialStore({
  secrets: { github_token: process.env.GITHUB_TOKEN ?? "" },
});
const token = await store.resolve("github_token");

See

Implements

Constructors

Constructor

new InMemoryCredentialStore(options?): InMemoryCredentialStore;

Defined in: credentials/in-memory-credential-store.ts:60

Create a store seeded with the given secrets.

Parameters

ParameterTypeDescription
optionsInMemoryCredentialStoreOptionsSeed secrets; see InMemoryCredentialStoreOptions.

Returns

InMemoryCredentialStore

Methods

resolve()

resolve(name): Promise<string | undefined>;

Defined in: credentials/in-memory-credential-store.ts:70

Resolve a placeholder name to its seeded secret value.

Parameters

ParameterTypeDescription
namestringThe placeholder name to resolve.

Returns

Promise<string | undefined>

The secret value, or undefined if no such credential was seeded.

Implementation of

CredentialStore.resolve

On this page