Start

Quickstart

Three commands to a graded report card. No API keys, no network, no configuration. Everything below runs offline on any machine with Node 20.

1. Install and build

Terminal
pnpm install && pnpm build

Nothing phones home. There is no telemetry and no account.

2. Attack the bundled agent

Terminal
pnpm attack

Runs all 16 vectors against the bundled reference agent, a deliberately naive keyword-sentiment agent with no provenance checking, which is the class of agent the published attacks target. Result: grade C, 31.3% of attacks changed the order, 25.0% breached its own risk contract.

3. Attack it again, behind the shield

Terminal
node packages/cli/dist/bin.js attack --demo --shielded

The same agent, same vectors, wrapped in @heyarka/shield: grade B, 12.5% changed, 0.0% risk violations. The remaining 12.5% is entirely semantic. What the shield does not stop spells out why.

Run the test suite

Terminal
pnpm -r test

192 tests across 6 packages: core 53, shield 43, llm-agent 34, cli 29, canary 25, mcp 8.

Attack your own agent

Anything that can be expressed as an AgentUnderTest can be attacked. That interface is one method:

TypeScript
export default {
  name: "my-agent",
  async decide(ctx) {
    // ctx.news is the untrusted channel.
    return { side: "hold", symbol: ctx.symbol, size: 0 };
  },
};
Terminal
arka attack --agent ./my-agent.js
arka attack --agent ./my-agent.js --shielded

The live canary

@heyarka/canary runs the A/B continuously against a real public news feed, across two Bitget Demo paper accounts, one shielded and one not, ticking every 15 minutes.

Demo trading only, enforced in code
The client sends the Bitget paper-trading header unconditionally. There is no live mode. Not a flag, not a config option. Credentials come from environment variables only and are never logged.
What the canary currently shows
Control and shielded have agreed on all 205 ticks. The shield costs nothing on clean input. No PnL delta is claimed.