Scan your whole stack
From OX Research Newsroom
Are you using @keemakr/agent-sdk?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.0-keemakr-v2-20261123232249
@keemakr/agent-sdk was last scanned on 23 Nov 2026 at version 1.0.0-keemakr-v2-20261123232249. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.0-keemakr-v2-20261123232249 LATEST | 23 Nov 2026 | No rules fired |
| 1.0.0-keemakr-v2-20261123225817 | 23 Nov 2026 | No rules fired |
| 1.0.0-keemakr-v2-20261123222902 | 23 Nov 2026 | No rules fired |
| 1.0.0-keemakr-v2-20261123212014 | 23 Nov 2026 | Not shown |
| 1.0.0-keemakr-v2-20261123161355 | 23 Nov 2026 | Not shown |
Findings for v1.0.0-keemakr-v2-20261123232249. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.0-keemakr-v2-20261123232249; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
The floor for keemakr marketplace agents — separately deployed eve agents that the keemakr operator delegates to. The SDK gives your agent a stable, secure contract to:
The tenant identity and scopes come from a short-lived signed grant the operator mints per delegation; keemakr-core re-verifies the grant and enforces scope on every capability call. Connection credentials never leave keemakr-core on the default (proxy) path.
npm install @keemakr/agent-sdk
Peer dependencies: jose@^6.2.3, plus the optional peers eve >=0.40.0 <0.81 and zod@^4.4.3.
CI type-checks the SDK at both ends of the eve range: eve 0.40.0 and eve 0.80.1, the version Core
runs.
Set these in your deployed agent's environment:
| Variable | Purpose |
|---|---|
KEE_CORE_URL |
Required. The keemakr platform you installed on, e.g. https://dash.dev.keemakr.ai. Used both to verify grants and to call the capability API. |
KEE_AGENT_AUDIENCE |
This deployment's audience — your runtime URL's origin, e.g. https://my-agent.example.com. Must match the audience the operator mints. |
KEE_AGENT_REQUIRE_AUDIENCE |
Optional strict mode. Set to 1 and a deployment with no audience configured refuses every grant instead of accepting grants minted for any deployment. Off by default; turn it on after setting KEE_AGENT_AUDIENCE. |
KEE_CORE_JWKS_URL |
Only when the JWKS is not at <KEE_CORE_URL>/.well-known/jwks.json. Takes precedence over KEE_CORE_URL for verification. |
There is no default platform, deliberately. KEE_CORE_URL names the keys your
agent trusts and the host it sends the tenant's grant token to. A compiled-in
default would mean this package picking your trust anchor for you — and since the
same published SDK is installed against dev, staging and production, whichever
origin it named would be wrong for the others. Set one variable per deployment.
With neither set, grantAuth() refuses every grant and logs once explaining why,
and coreBaseUrl() throws rather than posting a live credential somewhere you did
not choose. Both name the variables in their message.
grantAuth() returns an eve AuthFn. Put it ahead of any fallback:
import { localDev, vercelOidc } from 'eve/channels/auth';
import { eveChannel } from 'eve/channels/eve';
import { grantAuth } from '@keemakr/agent-sdk';
export default eveChannel({
auth: [localDev(), vercelOidc(), grantAuth()],
});
On success the verified tenant id and scopes are attached to the session auth context, where useKee reads them.
import { defineTool } from 'eve/tools';
import { z } from 'zod';
import { useKee } from '@keemakr/agent-sdk';
export default defineTool({
description: "Find a lead's work email.",
inputSchema: z.object({
domain: z.string(),
first_name: z.string(),
last_name: z.string(),
}),
async execute(args, ctx) {
const kee = useKee(ctx);
// Proxy path: the credential stays in keemakr-core; you get the result.
const result = await kee.connections.hunter.call('email-finder', args);
return result; // { email, score, status }
},
});
const kee = useKee(ctx);
kee.tenantId; // the tenant this delegation is for (from the grant)
kee.scopes; // the scopes the grant carries
// Proxy (default): run a named operation; the secret never leaves core.
await kee.connections.hunter.call("email-finder", { domain, first_name, last_name });
await kee.connections.get("hunter").call("email-finder", { ... }); // equivalent
// Token (opt-in): only if your entry.json declared `access: "token"` on the
// dependency. Returns a short-lived credential you may use directly.
const { access_token } = await kee.connections.hunter.token();
call throws a KeeError carrying core's HTTP status and its body ({ error, code, retry_after? }).
classifyConnectionError(err) turns that into what to do next, so you never match on core's codes
yourself:
import { classifyConnectionError, useKee } from '@keemakr/agent-sdk';
try {
return await kee.connections['meta-ads'].call('campaign.pause', { campaign_id });
} catch (err) {
const c = classifyConnectionError(err);
// c = { outcome, reason, code?, status?, retryAfterSeconds?, message }
if (c.outcome === 'rejected') return `Not done: ${c.message}`; // core's words; never retry
if (c.outcome === 'transient') return `Try again in ${c.retryAfterSeconds ?? 60}s`;
return `Meta Ads isn't set up (${c.reason}); nothing was changed.`; // simulated
}
| outcome | means | do |
|---|---|---|
simulated |
never reached the provider: connection_missing, per_user_connection_requires_user, scope_missing, unknown_operation, auth_revoked, a disabled connector, any 401 |
say what is missing; nothing changed |
rejected |
refused on its merits: forbidden, invalid_request, push_account_full, a connector_error on a 4xx, any other coded 4xx; invalid_args reads reason: 'core_schema' |
show message verbatim; do not retry |
transient |
rate_limited, breaker_open, provider_unavailable, connection_unavailable, connector_error, 408/429/5xx, no response |
retry later, after retryAfterSeconds; a write may have landed, so check before retrying one |
The code decides before the status: a connector's invalid_request on a 404 is still a refusal.
reason is the code (or http_<status> with no code, no_response with no answer).
@keemakr/agent-sdk/connectors ships a generated, typed manifest of every connector keemakr-core exposes — provider slugs, maturity, and each operation's name + JSON-Schema arg contract. Use it to discover what's callable (and get autocomplete on provider + op names) without scanning a core checkout or hitting a running instance. It's metadata only — no credentials.
import { connectors, opNames, isReady } from '@keemakr/agent-sdk/connectors';
opNames('hunter'); // → ["email-finder"]
connectors.hunter.ops['email-finder'].inputSchema; // JSON Schema for the args
isReady('meta'); // false while a connector is coming_soon
connectors.meta.maturity; // "coming_soon" | "ready"
A coming_soon connector is declarable in your entry.json dependencies today; its operations start callable (and isReady flips to true) once core ships them — no change to your agent.
Refresh the manifest after core ships new connectors/operations (it's a committed snapshot of GET /api/connections/catalog):
curl -s "$KEE_CORE_URL/api/connections/catalog" > src/connectors.snapshot.json
npm run gen:connectors # or: npm run build (runs gen first)
await kee.memory.set('prefs', 'tone', { tone: 'formal' });
await kee.memory.get('prefs', 'tone'); // → { tone: "formal" }
await kee.memory.list('prefs'); // → entries in the namespace
await kee.memory.delete('prefs', 'tone');
// Semantic search by meaning (embeddings):
const hits = await kee.memory.search('how should I speak to the user?', { limit: 5 });
// → [{ namespace, key, value, score, … }] (score 0–1, nearest first)
Memory is tenant-shared: any of the tenant's installed agents can read/write any
namespace. Concurrent writers should take turns — every entry carries a
monotonic version, and conditional writes lose gracefully instead of
clobbering:
const entry = await kee.memory.getEntry('crm', 'lead:acme'); // { value, version, … }
try {
await kee.memory.set('crm', 'lead:acme', next, { ifVersion: entry!.version });
} catch (e) {
if (e instanceof MemoryConflictError) {
// someone wrote first — e.current is the winning entry; re-read, re-derive, retry
}
}
// Or merge one field with no read at all (object values only):
await kee.memory.patch('crm', 'lead:acme', { status: 'contacted' });
Use memory for your agent's own continuity (preferences, cursors, entity
state) — durable documents belong in the tenant knowledge base, which you read
via kee.kb.
const hits = await kee.kb.search('what is our refund policy?', { k: 5 });
// → [{ text, score, artifact_id, version_id, chunk_id, title,
// audience, visibility, provenance }]
Core derives the retrieval actor from the verified grant. A Kee acting for a
user can retrieve that user's Personal Knowledge plus Organization and Platform
Knowledge. A System Kee can retrieve Organization and Platform Knowledge but
never Personal Knowledge. External Kees are additionally restricted to External
Safe knowledge. Collections organize artifacts but never grant access
(kb:retrieve scope, granted to every install). Retrieval is hybrid and may be
reranked in Core; text may be a wider parent context.
await kee.tools.list(); // tools this grant is entitled to
await kee.tools.run('current-time'); // run one in keemakr-core
A call whose grant lacks the required scope returns a KeeError with status: 403; an expired/invalid grant returns status: 401.
A delegation from Kee carries Kee's brief as the message and, beside it, the user's own latest message in that conversation, verbatim. eve gives that second text (clientContext.keemakr_user_message) to your model only. Core also signs it into the grant, so grantAuth() puts it on the session auth and getUserMessage(ctx) returns it to tool code:
import { defineTool } from 'eve/tools';
import { z } from 'zod';
import { getUserMessage } from '@keemakr/agent-sdk';
export default defineTool({
description: 'Request a discount on a deal.',
inputSchema: z.object({ dealId: z.string(), percent: z.number() }),
// An approval policy gets the same ctx, in the turn the user wrote in. Refuse here and no
// approval card is raised for a request the user never made.
approval: (ctx) => {
const said = getUserMessage(ctx);
if (said && !said.truncated && !mentions(said.text, ctx.toolInput?.dealId)) {
return { type: 'denied', reason: `the user did not name deal ${ctx.toolInput?.dealId}` };
}
return 'user-approval';
},
async execute({ dealId, percent }, ctx) {
/* ... */
},
});
const mentions = (text: string, id: unknown) =>
typeof id === 'string' &&
text
.toUpperCase()
.replace(/[^A-Z0-9]/g, '')
.includes(id.toUpperCase().replace(/[^A-Z0-9]/g, ''));
getUserMessage(ctx) returns { text, inputMode, truncated } or null. It is null when nobody wrote anything for this turn (a routine, a dispatch with no conversation turn), inside execute() after a human approved (core resumes the turn with a fresh grant that does not carry the words), and on any session that a grant did not authenticate. Decide what null means for each tool; most should go on as before rather than refuse. truncated is true when core cut the text (at 4 KiB in the grant), so do not refuse on the absence of something from a truncated message.
Subagents see the same value: eve passes the parent's session auth to a declared subagent.
Every useKee capability call keeps its grant alive by itself: when the active token has under two minutes left, the SDK exchanges it at core's POST /api/capability/grant/refresh (single-flight per delegation — concurrent tool calls share one refresh), and a 401 grant_expired gets one refresh + one retry before surfacing. You write nothing; long runs simply stop dying at the TTL.
The floor is core's, not the SDK's: an expired grant can never be refreshed, scopes are re-derived from the install at each exchange, and the whole chain dies at the renewal horizon (CAPABILITY_GRANT_MAX_LIFETIME_SECONDS on core, default 6h) with a relayable grant_horizon_exceeded error.
Headless callers holding a raw grant can drive the exchange directly:
import { refreshGrant } from '@keemakr/agent-sdk';
const { token, exp } = await refreshGrant(currentToken); // throws KeeError when core refuses
refreshGrant resolves core from KEE_CORE_URL / KEE_CORE_JWKS_URL (pass { coreUrl } to override) and never verifies or signs anything locally — core is the only judge.
The exception is a grant core signs for ONE call (no_refresh: an event delivery, an approval decision, a card click). A client on such a grant sends it exactly as it is and never asks to refresh it; see "Call Kee back from a handler".
When a decision belongs to a person (a reply to send, a deal to move, an invoice to pay), your module proposes a card of a kind its manifest declares in approvalKinds; a person decides it in Kee's queue, and core calls you back with the decision. Core sets the card's audience, department and sender; you send what to decide.
import { onApprovalResolved, approvalResolvedHandler, useKee } from '@keemakr/agent-sdk';
const kee = useKee(ctx);
await kee.approvals.propose(`stage:${deal.id}`, {
kind: 'stage_move',
title: 'Move Apex from B to A',
recordRef: { objectType: 'deal', id: deal.id },
resumeRef: `${deal.id}:B->A`, // comes back with the decision
});
await kee.approvals.withdraw(`stage:${deal.id}`); // its reason ended
onApprovalResolved('stage_move', async (d) => {
if (d.decision === 'move') await moveStage(d.resumeRef);
});
export const approvals = approvalResolvedHandler(); // POST /approvals/:dedupeKey/resolved Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.