Skip to content

Releases: the-artinet-project/artinet-sdk

v0.6.0

05 Jan 22:36
a3d6f80

Choose a tag to compare

🚀 @artinet/sdk v0.6.0

What's Changed

This is a major release with significant architectural improvements, new features, and breaking changes. v0.6.0 marks full adoption of the official A2A JavaScript SDK (@a2a-js/sdk) at the transport layer for guaranteed protocol compliance.

✨ Highlights

New cr8 Builder Pattern

The recommended way to build agents is now the cr8 builder, replacing AgentBuilder with a more expressive, fluent API:

import { cr8 } from "@artinet/sdk";

cr8("QuickStart Agent")
  .text(async ({ content }) => `You said: ${content}`)
  .server.start(3000);

New step types: .text(), .file(), .data(), .message(), .artifact(), .status(), .task(), .sendMessage()

AgentMessenger Client

A2AClient has been replaced by AgentMessenger with improved ergonomics, Zod validation, and comprehensive error handling:

import { createMessenger } from "@artinet/sdk";

const messenger = await createMessenger({
  baseUrl: "http://localhost:3000/a2a",
});

const stream = messenger.sendMessageStream("Hello World!");
for await (const update of stream) {
  console.log(update);
}

Pluggable Observability

Bring your own logger with first-class support for Pino, Winston, and OpenTelemetry:

import { configure } from "@artinet/sdk";
import { configurePino } from "@artinet/sdk/pino";

configure({ logger: configurePino(pinoLogger) });

Multi-Agent Orchestration

Chain agents together with the new sendMessage step for powerful orchestration workflows:

cr8("Orchestrator")
  .text("Starting workflow...")
  .sendMessage({ agent: analyzerAgent, message: "Analyze data" })
  .sendMessage({ agent: summarizerAgent })
  .text("Workflow complete!").agent;

🆕 New Features

  • describe Utilities — Helpers for creating A2A objects (describe.card(), describe.message(), describe.task(), etc.)
  • Push Notifications — Full support via @a2a-js/sdk integration
  • SQLite Storage — Production-ready task persistence with drizzle-orm
  • Browser Support (Experimental) — Use @artinet/sdk/browser for client-side messaging
  • Skip Function — Conditionally skip workflow steps with skip()
  • Native Compatibility — Convert agents to @a2a-js/sdk A2ARequestHandler with native()

💥 Breaking Changes

Peer Dependencies Required

npm install @a2a-js/sdk @modelcontextprotocol/sdk express

Configuration API

// Before (v0.5.x)
import { configureLogger } from "@artinet/sdk";

// After (v0.6.0)
import { applyDefaults } from "@artinet/sdk";
applyDefaults();

A2A Namespace for Types

// Before (v0.5.x)
import { Task, Message } from "@artinet/sdk";

// After (v0.6.0)
import { A2A } from "@artinet/sdk";
// Use A2A.Task, A2A.Message, A2A.Context

AgentBuilder → cr8

// Before (v0.5.x)
const { app } = createAgentServer({
  agent: AgentBuilder().text(() => "Hello!").createAgent({ agentCard: "MyAgent" }),
});

// After (v0.6.0)
const { app } = cr8("MyAgent").text("Hello!").server;

A2AClient → AgentMessenger

// Before (v0.5.x)
const client = A2AClient("https://example.com");

// After (v0.6.0)
const messenger = await createMessenger({ baseUrl: "https://example.com" });

📦 Module Exports

Export Description
@artinet/sdk Core SDK
@artinet/sdk/sqlite SQLite storage with drizzle-orm
@artinet/sdk/pino Pino logger extension
@artinet/sdk/winston Winston logger extension
@artinet/sdk/otel OpenTelemetry integration
@artinet/sdk/trpc tRPC router support
@artinet/sdk/browser Browser client (experimental)

📚 Documentation

🙏 Acknowledgments

v0.6.0 marks the beginning of our integration with the Agentic AI Foundation's official A2A JavaScript SDK. This enables interoperability with the broader Agent2Agent ecosystem while maintaining the artinet-sdk's unique architecture.


Full Changelog: v0.5.18...v0.6.0

v0.5.18

05 Jan 22:10
a87a73a

Choose a tag to compare

v0.5.18 Pre-release
Pre-release

What's Changed

Full Changelog: v0.5.12...v0.5.18

v0.5.12

01 Nov 06:28
0485edd

Choose a tag to compare

What's Changed

Full Changelog: v0.5.8...v0.5.12

v0.5.8

07 Oct 19:11
edf9b58

Choose a tag to compare

0.5.8

  • Multiple Bug Fixes

  • Portability & Build Improvements

  • NPM

v0.5.6

29 Aug 23:41
21f5378

Choose a tag to compare

Version 0.5.6 of the artinet SDK comes loaded with new features:

Added

  • New Service-Based Architecture: Complete refactoring with dedicated service layer for better modularity and maintainability
    • src/services/a2a/ - A2A protocol service implementation with factory pattern
    • src/services/core/ - Core execution and management services
    • New A2AServiceInterface for standardized service contracts
  • New Express Server Implementation: Modern Express-based server replacing the legacy A2A server
    • createAgentServer() function for simplified server creation
    • Custom JSON-RPC middleware for Express (jsonRPCMiddleware)
    • Enhanced error handling with dedicated error middleware
    • Support for tRPC integration (commented example provided)
  • Enhanced Type Organization: Comprehensive type restructuring under schemas/a2a/ directory using Zod
    • Authentication types (auth/auth.ts, auth/oauth.ts, etc.)
    • Enhanced message, task, and parameter schemas
    • New deployment-specific type definitions
  • New Deployment Export Path: Added ./deployment export in package.json for deployment utilities
  • Path Alias Support: Added ~/ path alias for cleaner imports throughout the codebase
  • New Core Managers: Command, event, and stream managers for better resource management
  • Enhanced Factory Pattern: Builder pattern implementation for creating A2A services and agents

Changed

  • BREAKING: Updated package description from "TypeScript SDK for Agentic Communication" to "TypeScript SDK for the Agent2Agent (A2A) Protocol"
  • BREAKING: Major refactoring of server architecture - A2AServer is now removed in favor of the new Express-based createAgentServer()
  • BREAKING: Reorganized exports in main index - services now exported before utils
  • BREAKING: Updated Agent Card endpoint from /.well-known/agent.json to /.well-known/agent-card.json
  • Updated dependencies:
    • Added @trpc/server: ^11.4.3 for tRPC integrations
    • Added ts-patch: ^3.3.0 for TypeScript transformations
    • Added typescript-transform-paths: ^3.5.5 for path transformation
  • Enhanced project structure with better separation of concerns
  • Improved JSON-RPC method handling with dedicated middleware
  • Enhanced error handling with more specific error types and better context

Deprecated

  • A2AServer class: The legacy A2A server implementation is deprecated. Use the new createAgentServer() function instead
  • Legacy server interfaces and parameter types in favor of the new service-based architecture

Removed

  • Legacy Server Components: Removed outdated server interfaces and implementations
    • src/server/interfaces/params.ts
    • src/server/interfaces/server.ts
    • src/server/interfaces/store.ts
    • Legacy Express server utilities
  • Outdated Manager: Removed src/services/manager.ts in favor of new core managers

Improved

  • Development Experience:
    • Added prepare script for automatic ts-patch installation
    • Added rebuild script for clean rebuilds
    • Enhanced Jest configuration with path mapping support
  • Code Organization: Better separation between client, server, services, and utilities
  • Type Safety: Enhanced type definitions with more specific interfaces and better error handling
  • Modularity: Service-based architecture allows for better testing and extensibility
  • Documentation: Added comprehensive project structure documentation

Technical Notes

  • This release represents a major architectural shift towards a service-oriented design
  • The new architecture provides better separation of concerns and improved testability
  • Legacy A2AServer has been removed developers should migrate to the new createAgentServer() approach
  • Enhanced support for different transport layers (Express, tRPC, WebSockets, etc.)
  • Improved factory patterns for creating and configuring A2A services and agents

What's Changed

Full Changelog: v0.5.5...v0.5.6

v0.5.5

26 Aug 16:49

Choose a tag to compare

See Changelog

v0.3.0

28 Apr 19:28

Choose a tag to compare

v0.3.0 Pre-release
Pre-release

What's new in v0.3.0:

  • Automatic Server Registration: You can now have your A2A server automatically register itself with the public Artinet Registry on startup by setting the register: true option in the server parameters. There's also a manual A2AServer.registerServer() method if you prefer more control.
  • Customizable Agent Card Path: While the standard /.well-known/agent.json path is great, you can now define a custom fallback path (e.g., /my-agent-card) for serving your Agent Card using the fallbackPath option in A2AServerParams. The A2AClient also accepts a fallbackPath to check if the standard endpoints don't work.
  • Dependency Updates: Keeping things fresh, key dependencies like express (to v5!), jayson, and eventsource-parser have been updated. We've also bumped the target Node version to 22 and ECMAScript target to ES2022.
  • Improved Server Customization: Refactored the internal JSON-RPC method handling. We now export default method implementations and provide helpers (createJSONRPCMethod, defaultCreateJSONRPCServer) to make advanced server setups cleaner and easier to manage.
  • Enhanced Documentation: Significantly revamped the README.md with updated examples, a new section detailing the server registration & discovery features, and clearer explanations for advanced customization.
  • Breaking Change: Renamed the server configuration type from A2AServerOptions to A2AServerParams for better consistency across the SDK.

v0.2.1

25 Apr 21:07

Choose a tag to compare

v0.2.1 Pre-release
Pre-release

Full Changelog: https://github.com/the-artinet-project/artinet-sdk/commits/v0.2.1

Artinet SDK (@artinet/sdk) High-Level Summary

This project provides the Artinet SDK, a production-ready, feature-rich TypeScript library for building clients and servers compliant with the Agent2Agent (A2A) protocol. Developed by the Artinet Team, it aims to simplify A2A implementation by offering robust, easy-to-use components with a focus on developer experience and reliability, significantly enhancing the foundational concepts presented in the official A2A samples.

The SDK is distributed as the @artinet/sdk npm package.

1. Core Components & Purpose

  • Purpose: Enable developers to easily create A2A-compliant AI agent clients and servers in TypeScript/JavaScript environments.
  • Target Audience: Developers building AI agents or applications that need to communicate using the standardized A2A protocol.
  • Key Modules:
    • @artinet/sdk/client: Provides A2AClient for interacting with A2A servers.
    • @artinet/sdk/server: Provides A2AServer for implementing A2A agent endpoints.
    • @artinet/sdk/types: Contains TypeScript interfaces for all A2A protocol structures derived from the official JSON schema, plus extended types for SDK usage.
    • @artinet/sdk/transport: Handles underlying communication logic (JSON-RPC, SSE streaming).
    • @artinet/sdk/utils: Includes common utilities, error definitions, and logging integration.

2. Features & Enhancements (vs. Basic A2A Samples)

  • Production-Grade Server (A2AServer):
    • Built on Express.js, providing a robust and familiar foundation.
    • Simplifies setup: Handles JSON-RPC request/response/error handling, SSE stream management, and routing automatically.
    • Requires only a core TaskHandler (async generator function) for agent logic implementation.
    • Manages task state transitions based on TaskHandler yields.
    • Configurable Agent Card served automatically (/.well-known/agent.json).
    • Integrated support for CORS configuration.
    • Optional custom JSON-RPC server implementation via createJSONRPCServer factory function parameter.
  • Enhanced Client (A2AClient):
    • Reliable streaming support (sendTaskSubscribe) using eventsource-parser.
    • Convenience methods for capability checking (supports).
    • Flexible header management for authentication (addHeader, setHeaders).
    • Informative client-side error handling (RpcError).
  • Developer Experience:
    • Strong Typing: Comprehensive TypeScript types for the entire A2A protocol and SDK interfaces.
    • Simplified APIs: Abstracts protocol complexities for both client and server.
    • Structured Logging: Integrated, configurable logging using pino. Defaults to error level, configurable via configureLogger.
  • Reliability & Testing:
    • High Test Coverage: (>95% reported) using Jest, covering core logic, streaming, error handling, push notification config, and edge cases.
    • Standardized error classes (A2AError, RpcError) mapped to JSON-RPC error codes.
  • Flexible Storage:
    • Pluggable TaskStore interface.
    • Includes InMemoryTaskStore (default, for development/testing).
    • Includes FileStore for basic file-based persistence. Easily extensible for custom database integrations.
  • Protocol Compliance:
    • Full implementation based on the official A2A JSON Schema (a2a.json).
    • Supports core methods: tasks/send, tasks/get, tasks/cancel.
    • Supports streaming method: tasks/sendSubscribe.
    • Supports push notification configuration methods: tasks/pushNotification/set, tasks/pushNotification/get (though full push sending logic might be agent-specific).
    • Supports streaming resubscription: tasks/resubscribe.

3. Technical Details

  • Language: TypeScript
  • Module System: ES Modules (ESM) ("type": "module" in package.json). Requires Node.js >= 16.
  • Build System: Uses tsc to compile TypeScript to JavaScript in the dist directory.
  • Testing: Jest (ts-jest).
  • Linting: ESLint with TypeScript-ESLint (Flat Config eslint.config.js).
  • Core Dependencies: express, jayson (for JSON-RPC server), pino, eventsource-parser, cors.

4. Usage (High-Level)

  • Server: Instantiate A2AServer, providing a TaskHandler async generator function and optionally a TaskStore and other configurations. Call server.start().
  • Client: Instantiate A2AClient with the server's A2A endpoint URL. Use methods like sendTask, sendTaskSubscribe, getTask, cancelTask, supports.

5. Project Goals

  • Provide a reliable, easy-to-use, and fully-typed SDK for A2A development in the Node.js ecosystem.
  • Offer a more complete and production-oriented solution compared to basic protocol samples.
  • Encourage adoption of the A2A standard by lowering the barrier to implementation.