JSPM

@gicm/agent-core

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q29638F
  • License MIT

Core utilities for gICM Web3 AI agents - shared types, base classes, and chain abstractions

Package Exports

  • @gicm/agent-core
  • @gicm/agent-core/chains
  • @gicm/agent-core/llm

Readme

@gicm/agent-core

Core utilities for gICM Web3 AI agents - shared types, base classes, and chain abstractions

npm version License: MIT

Installation

npm install @gicm/agent-core
# or
pnpm add @gicm/agent-core

Features

  • BaseAgent Class: Event-driven agent foundation with progress tracking
  • LLM Client: Universal client for Claude, GPT-4, Gemini with effort optimization
  • Chain Abstractions: Solana and EVM chain utilities
  • Type Safety: Full TypeScript with Zod validation

Quick Start

import { BaseAgent, createLLMClient } from "@gicm/agent-core";

// Create an LLM client
const llm = createLLMClient({
  provider: "anthropic",
  model: "claude-opus-4-5-20251101",
  effort: "medium", // Token optimization
});

const response = await llm.chat([
  { role: "user", content: "Analyze this token..." }
]);

LLM Client with Opus 4.5 Features

import { createPowerClient, createBalancedClient } from "@gicm/agent-core/llm";

// High-power mode with extended thinking
const powerClient = createPowerClient({
  extendedThinking: {
    enabled: true,
    budgetTokens: 16000,
  },
});

// Balanced mode for everyday use (50% token savings)
const balancedClient = createBalancedClient();

Creating Custom Agents

import { BaseAgent } from "@gicm/agent-core";

class MyAgent extends BaseAgent {
  async run(input: unknown): Promise<unknown> {
    this.emit("started");
    this.emit("progress", 50, "Processing...");

    // Your agent logic here
    const result = await this.processInput(input);

    this.emit("completed", result);
    return result;
  }
}

Exports

Export Description
@gicm/agent-core Main exports (BaseAgent, types)
@gicm/agent-core/llm LLM client and utilities
@gicm/agent-core/chains Chain abstractions (Solana, EVM)

License

MIT - Built by gICM