
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@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 0 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.