
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Axgen is a framework for connecting your data to large language models.
Ingest, structure, and query your data with ease using the latest vector databases and LLMs.
npm i axgen
We built an open source demo UI for axgen, with a short video that shows the features.
Axgen's goal is to break down the various concepts of working with LLMs into components with well-defined interfaces. These interfaces are important as we cannot provide out-of-the-box components for every use case. Some components are provided (with more coming soon) but the interfaces enable you to extend the framework with your own implementations to satisfy arbitrary use cases.
Axgen aims to be a foundational framework from which you can construct higher-level, declarative workflows.
This example showcases some core concepts of Axgen by 1) ingesting markdown files into the Pinecone vector database and 2) using retrieval augemented generation to answer a question about the contents of the data.
import {
Ingestion,
Pinecone,
FileSystem,
MarkdownSplitter,
OpenAIEmbedder,
RAG,
Retriever,
PromptWithContext,
OpenAICompletion,
} from 'axgen';
const { OPENAI_API_KEY, PINECONE_API_KEY } = process.env;
// OpenAI's embedding model (defaults to text-embedding-ada-002)
const embedder = new OpenAIEmbedder({ apiKey: OPENAI_API_KEY });
//////////////////////////////////
// Connect to your vector store //
//////////////////////////////////
const pinecone = new Pinecone({
index: 'mdindex',
namespace: 'default',
environment: 'us-west1-gcp-free',
apiKey: PINECONE_API_KEY,
});
/////////////////////////////////
// Ingest local markdown files //
/////////////////////////////////
await new Ingestion({
store: pinecone,
source: new FileSystem({ path: '../path/to/sales/data', glob: '**/*.md' }),
splitter: new MarkdownSplitter({ chunkSize: 1000 }),
embedder: embedder,
}).run();
///////////////////////////////////////////////////////////
// Use retrieval augmented generation to query your data //
///////////////////////////////////////////////////////////
const template = `Context information is below.
---------------------
{context}
---------------------
Given the context information and not prior knowledge, answer the question: {query}
`;
const rag = new RAG({
embedder: embedder,
model: new OpenAICompletion({
model: 'text-davinci-003',
max_tokens: 256,
apiKey: OPENAI_API_KEY,
}),
prompt: new PromptWithContext({ template }),
retriever: new Retriever({ store: pinecone, topK: 3 }),
});
// stream the response
const { result, info } = rag.stream(
'What were our biggest sales in Q4 of this year and who were the customers?'
);
for await (const chunk of result) {
process.stdout.write(chunk);
}
process.stdout.write('\n');
// Information about what results were used from the vector database.
console.log(info);
The main components of the API are as follows:
Additionally, there are two higher-level component types that create workflows out of the above components:
We currently support
Hugging Face inference and more coming soon!
We're working on new documentation website. In the meantime, please check out the following (runnable) examples:
These implement CRUD operations for the supported vector stores.
npm run vector_store:prepare -- <options>
npm run vector_store:teardown -- <options>
npm run vector_store:upload -- <options>
npm run vector_store:delete -- <options>
These implement basic LLM queries as well as RAG queries with all supported models.
npm run openai:completion -- <options>
npm run openai:chat-completion -- <options>
npm run vertexai:text -- <options>
npm run vertexai:chat -- <options>
npm run anthropic -- <options>
npm run cohere -- <options>
See the development docs.
FAQs
A framework for connecting your data to large language models
The npm package axgen receives a total of 25 weekly downloads. As such, axgen popularity was classified as not popular.
We found that axgen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.