
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@agentic-kit/ollama
Advanced tools
A JavaScript/TypeScript client for the Ollama LLM server, supporting model listing, text generation, streaming responses, embeddings, and model management.
npm install @agentic-kit/ollama
# or
yarn add @agentic-kit/ollama
import OllamaClient, { GenerateInput } from '@agentic-kit/ollama';
// Create a client (default port 11434)
const client = new OllamaClient('http://localhost:11434');
// List available models
const models = await client.listModels();
console.log('Available models:', models);
// Non-streaming text generation
const output = await client.generate({ model: 'mistral', prompt: 'Hello, Ollama!' });
console.log(output);
// Streaming generation
await client.generate(
{ model: 'mistral', prompt: 'Hello, streaming!', stream: true },
(chunk) => {
console.log('Received chunk:', chunk);
}
);
// Pull a model to local cache
await client.pullModel('mistral');
// Generate embeddings
const embedding = await client.generateEmbedding('Compute embeddings');
console.log('Embedding vector length:', embedding.length);
// Generate a conversational response with context
const response = await client.generateResponse(
'What is the capital of France?',
'Geography trivia'
);
console.log(response);
// Delete a pulled model when done
await client.deleteModel('mistral');
new OllamaClient(baseUrl?: string)
– defaults to http://localhost:11434
.listModels(): Promise<string[]>
.generate(input: GenerateInput, onChunk?: (chunk: string) => void): Promise<string | void>
.generateStreamingResponse(prompt: string, onChunk: (chunk: string) => void, context?: string): Promise<void>
.generateEmbedding(text: string): Promise<number[]>
.generateResponse(prompt: string, context?: string): Promise<string>
.pullModel(model: string): Promise<void>
.deleteModel(model: string): Promise<void>
interface GenerateInput {
model: string;
prompt: string;
stream?: boolean;
}
Please open issues or pull requests on GitHub.
The Ollama /api/tags
endpoint returns the following JSON structure:
{
"models": [
{
"name": "mistral:latest",
"model": "mistral:latest",
"modified_at": "2025-06-09T04:48:21.588888008Z",
"size": 4113301824,
"digest": "...",
"details": {
"parent_model": "",
"format": "gguf",
"family": "llama",
"families": ["llama"],
"parameter_size": "7.2B",
"quantization_level": "Q4_0"
}
}
]
}
The listModels()
method extracts and returns just the model names:
const client = new OllamaClient('http://localhost:11434');
const models = await client.listModels();
console.log(models); // ["mistral:latest", "llama2:latest", ...]
© Hyperweb (formerly Cosmology). See LICENSE for full licensing and disclaimer.
FAQs
Ollama
The npm package @agentic-kit/ollama receives a total of 4 weekly downloads. As such, @agentic-kit/ollama popularity was classified as not popular.
We found that @agentic-kit/ollama 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.