
Security News
How AI Agents Expand the Software Supply Chain Attack Surface
In his AI Council 2026 talk, Feross Aboukhadijeh covers recent package compromises, vulnerability discovery, and a more automated security model.
@agenite/ollama
Advanced tools
Ollama provider for Agenite, enabling seamless integration with local Ollama models.
npm install @agenite/ollama
Make sure you have Ollama installed and running locally.
import { OllamaProvider } from '@agenite/ollama';
const provider = new OllamaProvider({
model: 'llama2',
host: 'http://localhost:11434',
temperature: 0.7,
});
const messages = [
{
role: 'user',
content: [{ type: 'text', text: 'What are the main features of Llama 2?' }],
},
];
const response = await provider.generate({ messages });
console.log(response.content[0].text);
const calculatorTool = {
name: 'calculator',
description: 'Performs basic arithmetic operations',
parameters: {
type: 'object',
properties: {
operation: {
type: 'string',
enum: ['add', 'subtract', 'multiply', 'divide'],
},
a: { type: 'number' },
b: { type: 'number' },
},
required: ['operation', 'a', 'b'],
},
};
const response = await provider.generate({
messages: [
{
role: 'user',
content: [{ type: 'text', text: 'What is 123 multiplied by 456?' }],
},
],
tools: [calculatorTool],
});
const provider = new OllamaProvider({
model: 'llava',
host: 'http://localhost:11434',
});
const response = await provider.generate({
messages: [
{
role: 'user',
content: [
{
type: 'image',
source: {
type: 'base64',
media_type: 'image/jpeg',
data: imageBase64,
},
},
{ type: 'text', text: 'What do you see in this image?' },
],
},
],
});
The provider accepts the following configuration options:
interface OllamaConfig {
model: string; // Model name (e.g., 'llama2', 'codellama')
host?: string; // Ollama server URL (default: http://localhost:11434)
temperature?: number; // Generation temperature (0-1)
maxTokens?: number; // Maximum tokens to generate
systemPrompt?: string; // System prompt for all conversations
parameters?: { // Additional model parameters
mirostat?: number;
num_ctx?: number;
num_gpu?: number;
// ... and more
};
}
Check out the examples directory for more detailed examples:
basic-chat.ts: Simple text conversationtool-usage.ts: Calculator tool implementationimage-input.ts: Image analysis with multimodal models# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Run examples
npx ts-node examples/basic-chat.ts
MIT
FAQs
Ollama provider for Agenite
The npm package @agenite/ollama receives a total of 341 weekly downloads. As such, @agenite/ollama popularity was classified as not popular.
We found that @agenite/ollama demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
In his AI Council 2026 talk, Feross Aboukhadijeh covers recent package compromises, vulnerability discovery, and a more automated security model.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.