Sovereign 8s.is mirror of standardgalactic/axon
  • TypeScript 98.2%
  • JavaScript 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dave Heritage 164fde95e0
Some checks failed
CI Code Check (TS) / build-and-test (18) (push) Has been cancelled
CI Code Check (TS) / build-and-test (20) (push) Has been cancelled
CI Code Check (TS) / build-and-test (22) (push) Has been cancelled
CI Code Check (TS) / build-and-test (24) (push) Has been cancelled
Bump package version to 0.1.4 in package.json and package-lock.json
2026-04-13 10:52:29 -05:00
.github Publish latest tag and set package to 0.1.1 (#22) 2026-02-25 13:51:27 -06:00
examples/typescript Rename HookRegistry to HookPipeline and update API (#23) 2026-03-02 10:46:56 -06:00
ts-sdk Bump package version to 0.1.4 in package.json and package-lock.json 2026-04-13 10:52:29 -05:00
.gitignore Refactor hooks/patcher, add tests, and lint tweaks (#5) 2026-02-12 15:59:43 -06:00
.pre-commit-config.yaml Remove python-sdk package and related files 2026-02-25 09:23:57 -06:00
CONTRIBUTING.md Replace s3 links with images.memorilabs.ai links (#25) 2026-04-08 16:45:12 -05:00
LICENSE Add docs, provider constants, and patcher/hooks fixes 2026-02-24 16:11:01 -06:00
README.md Replace s3 links with images.memorilabs.ai links (#25) 2026-04-08 16:45:12 -05:00
SECURITY.md Replace s3 links with images.memorilabs.ai links (#25) 2026-04-08 16:45:12 -05:00

Memori Labs

The universal LLM interceptor and hook registry

Axon plugs into the official LLM SDKs you already use. It allows you to seamlessly intercept, modify, and monitor LLM requests and responses through a unified hook system without changing your underlying application code.

NPM version License Discord


What is Axon?

Axon is a lightweight SDK wrapper that gives you complete visibility and control over your LLM traffic. Instead of building custom wrappers around OpenAI, Anthropic, or Gemini, Axon patches the official clients directly.

You write a hook once, and it normalizes the requests and responses across all supported providers.

  • Zero Overhead: Plugs directly into your existing client initialization. No need to rewrite your agent or application logic.
  • Unified Hook System: Modify prompts (before) or track token usage (after) using a single standard format, regardless of which LLM provider your app is talking to.
  • First-Class Streaming: Seamlessly handles and aggregates asynchronous streaming responses behind the scenes so your hooks always get the full picture.

Official SDK

Axon is available for TypeScript / Node.js:


Quick Glance

Axon's API is designed to feel native and consistent.

TypeScript

import { OpenAI } from 'openai';
import { Axon } from '@memorilabs/axon';

const client = new OpenAI();
const axon = new Axon().llm.register(client);

// 1. Intercept and modify requests
axon.hook.before((req, ctx) => {
  console.log(`Sending to: ${req.model}`);
  return req;
});

// 2. Track responses and tokens
axon.hook.after((req, res, ctx) => {
  console.log(`Tokens used: ${res.usage?.totalTokens}`);
});

// 3. Call the client exactly as you normally would
await client.chat.completions.create({ ... });

Supported Integrations

Currently, Axon can patch the following official SDKs out of the box:

Provider TypeScript Peer Dependency
OpenAI openai
Anthropic @anthropic-ai/sdk
Google Gemini @google/genai

Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for details on how to set up your development environment, run tests, and submit pull requests.

Support

License

Apache 2.0 - see LICENSE