npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tatou

v0.5.0

Published

TypeScript implementation of the Agent-to-Agent (A2A) protocol

Readme

tatou

Note: This package is ESM-only. Use import/export and Node.js 16+.

Overview

A robust TypeScript implementation of the Agent-to-Agent (A2A) protocol, with runtime validation, high test coverage, and modern developer experience.

Quick Start

import { Agent, Transport, ProtocolMessage, Task, TaskStatus, AgentConfig } from 'tatou';

const config: AgentConfig = {
  name: 'MyAgent',
  description: 'A sample agent',
  capabilities: {
    streaming: true,
    pushNotifications: false,
    stateTransitionHistory: true
  },
  endpoint: 'ws://localhost',
  version: '1.0.0',
  metadata: {
    author: 'Jane Doe',
    tags: ['example', 'demo'],
    customField: 'customValue'
  }
};

const transport = new Transport({ protocol: 'ws', host: 'localhost' });
const agent = new Agent(config, transport);

// Start a task
const task = await agent.startTask({ content: { type: 'text', content: 'Hello!' } });

// Get task status
const status = await agent.getTaskStatus(task.id);

// List all tasks
const tasks = await agent.listTasks();

// Listen for events
agent.on('taskStarted', (task) => {
  console.log('Task started:', task);
});

// Emit an event (for custom logic)
agent.emit('customEvent', { foo: 'bar' });

// Use protocol and task types directly
const message: ProtocolMessage = {
  jsonrpc: '2.0',
  id: '1',
  method: 'startTask',
  params: { /* ... */ }
};

const statusType: TaskStatus = 'pending';

AgentConfig & Agent Interface

The AgentConfig and Agent interfaces are designed for extensibility and protocol compatibility:

import { AgentConfig, Agent } from 'tatou';

const config: AgentConfig = {
  name: 'MyAgent',
  description: 'A sample agent',
  capabilities: {
    streaming: true,
    pushNotifications: false,
    stateTransitionHistory: true
  },
  endpoint: 'ws://localhost',
  version: '1.0.0',
  metadata: {
    author: 'Jane Doe',
    tags: ['example', 'demo'],
    customField: 'customValue'
  }
};

// Agent interface includes task management and event handling
interface Agent {
  readonly name: string;
  readonly description: string;
  readonly capabilities: AgentCapabilities;
  readonly endpoint: string;
  readonly version: string;
  readonly metadata?: Record<string, unknown>;

  startTask(params: unknown): Promise<Task>;
  getTaskStatus(taskId: string): Promise<TaskStatus>;
  listTasks(): Promise<Task[]>;

  on(event: string, listener: (...args: any[]) => void): this;
  emit(event: string, ...args: any[]): boolean;
}

Agent Skills

The skills property of AgentConfig allows you to describe the specific capabilities or functions your agent can perform, following the A2A spec:

import { AgentSkill } from 'tatou';

const skills: AgentSkill[] = [
  {
    id: 'summarize-text',
    name: 'Text Summarizer',
    description: 'Summarizes input text.',
    tags: ['nlp', 'summarization'],
    examples: ['Summarize this article', 'TL;DR for the following text'],
    inputModes: ['text/plain'],
    outputModes: ['text/plain']
  },
  {
    id: 'currency-converter',
    name: 'Currency Converter',
    tags: ['finance', 'conversion'],
    examples: ['convert 100 USD to EUR'],
    inputModes: ['application/json'],
    outputModes: ['application/json']
  }
];

const config: AgentConfig = {
  name: 'MyAgent',
  description: 'A sample agent',
  capabilities: { streaming: true },
  endpoint: 'ws://localhost',
  version: '1.0.0',
  skills,
};

Agent Authentication

The authentication property of AgentConfig describes the authentication requirements for accessing the agent's endpoint, following the A2A spec:

import { AgentAuthentication } from 'tatou';

const authentication: AgentAuthentication = {
  schemes: ['OAuth2', 'ApiKey'],
  credentials: '{"authorizationUrl": "https://auth.example.com", "tokenUrl": "https://token.example.com"}'
};

const config: AgentConfig = {
  name: 'MyAgent',
  description: 'A sample agent',
  capabilities: { streaming: true },
  endpoint: 'ws://localhost',
  version: '1.0.0',
  authentication,
};