
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@opena2a/aim-core
Advanced tools
Lightweight agent identity library — Ed25519 identity, local audit log, capability policy, trust scoring. No server required.
Lightweight agent identity library. Ed25519 identity, local audit log, capability policy, and trust scoring. No server required.
Part of the HackMyAgent security toolkit.
npm install @opena2a/aim-core
import { AIMCore } from '@opena2a/aim-core';
// Create or load an agent identity
const aim = new AIMCore({ agentId: 'my-agent' });
// Ed25519 identity (generated and persisted automatically)
const identity = await aim.getOrCreateIdentity();
console.log(identity.publicKey); // base64-encoded Ed25519 public key
// Sign and verify messages
const signature = aim.sign(Buffer.from('hello'));
const valid = aim.verify(Buffer.from('hello'), signature);
// Audit logging
aim.logEvent({ action: 'tool_call', target: 'read_file', details: { path: '/etc/config' } });
const events = aim.readAuditLog({ limit: 10 });
// Capability policy
aim.savePolicy({
rules: [
{ capability: 'file:read', allow: true, paths: ['/data/*'] },
{ capability: 'file:write', allow: false },
]
});
const allowed = aim.checkCapability('file:read', { path: '/data/report.csv' });
// Trust scoring
const trust = aim.calculateTrust();
console.log(trust.score); // 0.0 - 1.0
console.log(trust.factors); // { identity, audit, policy, behavior }
| Function | Description |
|---|---|
createIdentity() | Generate a new Ed25519 keypair |
loadIdentity() | Load an existing identity from disk |
getOrCreateIdentity() | Load if exists, create if not |
sign(data) | Sign data with the agent's private key |
verify(data, signature) | Verify a signature against the public key |
logEvent(event) | Append an event to the local audit log |
readAuditLog(options) | Read audit log entries |
loadPolicy() | Load capability policy from disk |
savePolicy(policy) | Save capability policy to disk |
checkCapability(cap, ctx) | Check if a capability is allowed |
calculateTrust() | Compute a trust score based on identity, audit, and policy factors |
Apache-2.0
FAQs
Lightweight agent identity library — Ed25519 identity, local audit log, capability policy, trust scoring. No server required.
The npm package @opena2a/aim-core receives a total of 521 weekly downloads. As such, @opena2a/aim-core popularity was classified as not popular.
We found that @opena2a/aim-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.