AgentSea

Package

@lov3kaizen/agentsea-core

Framework-agnostic core library for building agentic AI applications in Node.js.

v1.2.1On npm

01Install

Install from npm into your project.

BASH
npm install @lov3kaizen/agentsea-core

02Example

TS
import { Agent, AnthropicProvider, ToolRegistry, BufferMemory, calculatorTool } from '@lov3kaizen/agentsea-core';

const agent = new Agent(
  { name: 'assistant', description: 'General assistant', model: 'claude-sonnet-4-6', provider: 'anthropic',
    systemPrompt: 'You are a helpful assistant.', tools: [calculatorTool] },
  new AnthropicProvider(process.env.ANTHROPIC_API_KEY),
  new ToolRegistry(),
  new BufferMemory(50),
);
const response = await agent.execute('What is 42 * 58?', { conversationId: 'user-123', sessionData: {}, history: [] });
console.log(response.content);

03Key API

Agent.execute(input, context)
Runs the agent on one input and returns the response.
Agent.executeStream(input, context)
Streams the response in chunks.
ToolRegistry.register(tool)
Adds a tool that the agent can call.
MCPRegistry.addServer({ name, command, args, transport })
Connects an MCP server and exposes its tools with getTools().
SequentialWorkflow / ParallelWorkflow / SupervisorWorkflow
Run several agents in a fixed order, in parallel, or under a supervisor.

04Caveats

  • MCP stdio servers do not receive provider API keys by default. Pass them with passEnv or env.
  • Only the 13 coding tools and calculatorTool are documented. Eight general tools are mentioned but not named.
  • Model names in the examples may change. Check the provider's current model list before use.
  • Requires Node.js 20 or later.