Releases: the-artinet-project/artinet-sdk
v0.6.0
🚀 @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
describeUtilities — Helpers for creating A2A objects (describe.card(),describe.message(),describe.task(), etc.)- Push Notifications — Full support via
@a2a-js/sdkintegration - SQLite Storage — Production-ready task persistence with
drizzle-orm - Browser Support (Experimental) — Use
@artinet/sdk/browserfor client-side messaging - Skip Function — Conditionally skip workflow steps with
skip() - Native Compatibility — Convert agents to
@a2a-js/sdkA2ARequestHandlerwithnative()
💥 Breaking Changes
Peer Dependencies Required
npm install @a2a-js/sdk @modelcontextprotocol/sdk expressConfiguration 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.ContextAgentBuilder → 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
- Migration Guide — Upgrading from v0.5.x
- Agent Creation (
cr8) — Complete builder API - AgentMessenger — Client methods and streaming
- Configuration — Logging and tracing setup
- Storage — SQLite, FileStore, and custom backends
- Customization — Native handlers, tRPC, and engines
🙏 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
What's Changed
- feat/0.5.13 by @EditUndo in #30
- chore: bump version to 0.5.13 and add quickstart script by @EditUndo in #31
- chore: update dependencies and bump version to 0.5.13 by @EditUndo in #32
- chore: bump version to 0.5.14 and update A2AClient functionality by @EditUndo in #33
- Feat/0.5.15 by @EditUndo in #34
- Enhance A2A functionality and schema requirements by @EditUndo in #35
- chore: update package-lock.json for dependency version bumps by @EditUndo in #36
- Feat/0.5.16 by @EditUndo in #37
- Feat/0.5.17 by @EditUndo in #38
- Feat/0.5.18 by @EditUndo in #39
Full Changelog: v0.5.12...v0.5.18
v0.5.12
What's Changed
- Updated to version 0.5.9 by @EditUndo in #22
- Update version to 0.5.10 and enhance README for clarity on breaking c… by @EditUndo in #23
- Add package-lock.json by @EditUndo in #24
- Feat/add content to builder by @EditUndo in #25
- Fix formatting and variable naming in README example by @EditUndo in #26
- Update version to 0.5.12 by @EditUndo in #27
Full Changelog: v0.5.8...v0.5.12
v0.5.8
v0.5.6
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 patternsrc/services/core/- Core execution and management services- New
A2AServiceInterfacefor 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
- Authentication types (
- New Deployment Export Path: Added
./deploymentexport 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 -
A2AServeris now removed in favor of the new Express-basedcreateAgentServer() - BREAKING: Reorganized exports in main index - services now exported before utils
- BREAKING: Updated Agent Card endpoint from
/.well-known/agent.jsonto/.well-known/agent-card.json - Updated dependencies:
- Added
@trpc/server: ^11.4.3for tRPC integrations - Added
ts-patch: ^3.3.0for TypeScript transformations - Added
typescript-transform-paths: ^3.5.5for path transformation
- Added
- 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
A2AServerclass: The legacy A2A server implementation is deprecated. Use the newcreateAgentServer()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.tssrc/server/interfaces/server.tssrc/server/interfaces/store.ts- Legacy Express server utilities
- Outdated Manager: Removed
src/services/manager.tsin favor of new core managers
Improved
- Development Experience:
- Added
preparescript for automatic ts-patch installation - Added
rebuildscript for clean rebuilds - Enhanced Jest configuration with path mapping support
- Added
- 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
A2AServerhas been removed developers should migrate to the newcreateAgentServer()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
v0.3.0
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: trueoption in the server parameters. There's also a manualA2AServer.registerServer()method if you prefer more control. - Customizable Agent Card Path: While the standard
/.well-known/agent.jsonpath is great, you can now define a custom fallback path (e.g.,/my-agent-card) for serving your Agent Card using thefallbackPathoption inA2AServerParams. TheA2AClientalso accepts afallbackPathto check if the standard endpoints don't work. - Dependency Updates: Keeping things fresh, key dependencies like
express(to v5!),jayson, andeventsource-parserhave 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.mdwith 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
A2AServerOptionstoA2AServerParamsfor better consistency across the SDK.
v0.2.1
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: ProvidesA2AClientfor interacting with A2A servers.@artinet/sdk/server: ProvidesA2AServerfor 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
TaskHandleryields. - Configurable Agent Card served automatically (
/.well-known/agent.json). - Integrated support for CORS configuration.
- Optional custom JSON-RPC server implementation via
createJSONRPCServerfactory function parameter.
- Enhanced Client (
A2AClient):- Reliable streaming support (
sendTaskSubscribe) usingeventsource-parser. - Convenience methods for capability checking (
supports). - Flexible header management for authentication (
addHeader,setHeaders). - Informative client-side error handling (
RpcError).
- Reliable streaming support (
- 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 toerrorlevel, configurable viaconfigureLogger.
- 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
TaskStoreinterface. - Includes
InMemoryTaskStore(default, for development/testing). - Includes
FileStorefor basic file-based persistence. Easily extensible for custom database integrations.
- Pluggable
- 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.
- Full implementation based on the official A2A JSON Schema (
3. Technical Details
- Language: TypeScript
- Module System: ES Modules (ESM) (
"type": "module"inpackage.json). Requires Node.js >= 16. - Build System: Uses
tscto compile TypeScript to JavaScript in thedistdirectory. - 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 aTaskHandlerasync generator function and optionally aTaskStoreand other configurations. Callserver.start(). - Client: Instantiate
A2AClientwith the server's A2A endpoint URL. Use methods likesendTask,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.