Socket
Book a DemoInstallSign in
Socket

@aigne/core

Package Overview
Dependencies
Maintainers
2
Versions
303
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aigne/core

The functional core of agentic AI

latest
Source
npmnpm
Version
1.71.0
Version published
Maintainers
2
Created
Source

@aigne/core

AIGNE Logo

The functional core of agentic AI

GitHub star chart Open Issues codecov NPM Version Elastic-2.0 licensed

Introduction

@aigne/core is the foundation component of AIGNE Framework, providing the essential modules and tools needed to build AI-driven applications. This package implements the core functionalities of the framework, including agent systems, aigne environment, model integrations, and workflow pattern support.

AIGNE Arch

Features

  • Multiple AI Model Support: Built-in support for OpenAI, Gemini, Claude, Nova, and other mainstream AI models, easily extensible to support additional models
  • Agent System: Powerful agent abstractions supporting AI agents, function agents, MCP agents, and more
  • AIGNE Environment: Flexible handling communication between agents and workflow execution
  • Workflow Patterns: Support for sequential, concurrent, routing, handoff, and other workflow patterns
  • MCP Protocol Integration: Seamless integration with external systems through the Model Context Protocol
  • TypeScript Support: Comprehensive type definitions providing an excellent development experience

Installation

Using npm

npm install @aigne/core

Using yarn

yarn add @aigne/core

Using pnpm

pnpm add @aigne/core

Basic Usage

import { AIAgent, AIGNE } from "@aigne/core";
import { OpenAIChatModel } from "@aigne/core/models/openai-chat-model.js";

// Create AI model instance
const model = new OpenAIChatModel({
  apiKey: process.env.OPENAI_API_KEY,
  model: process.env.DEFAULT_CHAT_MODEL || "gpt-4-turbo",
});

// Create AI agent
const agent = AIAgent.from({
  name: "Assistant",
  instructions: "You are a helpful assistant.",
});

// AIGNE: Main execution engine of AIGNE Framework.
const aigne = new AIGNE({ model });

// Use the AIGNE to invoke the agent
const userAgent = await aigne.invoke(agent);

// Send a message to the agent
const response = await userAgent.invoke(
  "Hello, can you help me write a short article?",
);
console.log(response);

License

Elastic-2.0

FAQs

Package last updated on 12 Dec 2025

Did you know?

Socket

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.

Install

Related posts