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

@172ai/a2a-client

v1.1.0

Published

Official Node.js client library for 172.ai A2A (Agent-to-Agent) communication

Downloads

221

Readme

@172ai/a2a-client

Official Node.js client library for 172.ai A2A (Agent-to-Agent) communication system.

Installation

npm install @172ai/a2a-client

Quick Start

const { A2AClient } = require('@172ai/a2a-client');

const client = new A2AClient({
  apiKey: 'sk_your_api_key',
  agentId: 'my-agent-v1',
  agentType: 'code-analysis'
});

// Create container
const result = await client.createContainer({
  name: 'code-analysis-' + Date.now(),
  dockerfile: 'FROM node:18\nCOPY . /app\nRUN npm audit',
  tags: ['code-analysis', 'automated']
});

// Build container
const buildResult = await client.buildContainer(result.id);
console.log('Build initiated:', buildResult.buildLogId);

Configuration

Required Parameters

  • apiKey: API key with A2A scope from 172.ai dashboard
  • agentId: Unique identifier for your agent instance
  • agentType: One of:
    • code-analysis - Code quality and security analysis
    • testing - Automated testing and QA
    • deployment - CI/CD and orchestration
    • monitoring - Observability and metrics
    • security - Vulnerability scanning
    • documentation - Technical documentation
    • integration - API management
    • generic - General purpose

Optional Parameters

  • baseUrl: API base URL (default: 'https://api.172.ai')
  • timeout: Request timeout in ms (default: 30000)

API Methods

Authentication

// Test authentication
await client.authenticate();

// Get platform capabilities
const capabilities = await client.getCapabilities();

// Health check
const health = await client.healthCheck();

Container Operations

// List containers
const containers = await client.listContainers({ limit: 10 });

// Get container
const container = await client.getContainer(containerId);

// Create container
const newContainer = await client.createContainer({
  name: 'my-container',
  dockerfile: 'FROM alpine:latest',
  tags: ['test'],
  isPrivate: true
});

// Build container
const build = await client.buildContainer(containerId);

// Update container
await client.updateContainer(containerId, { name: 'new-name' });

// Delete container
await client.deleteContainer(containerId);

Build Operations

// Get build status
const status = await client.getBuildStatus(containerId, buildLogId);

// Get build logs
const logs = await client.getBuildLogs(containerId, buildLogId);

// List builds
const builds = await client.listBuilds(containerId);

Container Execution

// Get cost estimate
const estimate = await client.getExecutionCostEstimate(containerId, 1);

// Start execution
const execution = await client.startExecution(containerId, { durationDays: 1 });

// Get execution status
const status = await client.getExecutionStatus(containerId);

// Stop execution
await client.stopExecution(containerId);

// Get execution history
const history = await client.getExecutionHistory(containerId);

// List all executions
const executions = await client.listExecutions();

File Operations

// Upload file
await client.uploadFile(
  containerId,
  'config.yml',
  Buffer.from('config: value').toString('base64'),
  'application/x-yaml'
);

// List files
const files = await client.listFiles(containerId, '/app');

// Get file content
const content = await client.getFile(containerId, 'config.yml');

Container Fix Operations (AI-Powered)

// Analyze container build failures
const analysis = await client.analyzeContainerFailure(containerId);
console.log('Issues found:', analysis.issues);

// Execute full fix workflow (analyze + apply + rebuild)
const fixResult = await client.executeContainerFix(containerId, {
  autoApply: true,  // Auto-apply AI-generated fixes
  analyzeOnly: false
});
console.log('Fix applied:', fixResult.success);

// Apply a specific fix
await client.applyContainerFix(containerId, fixId);

// Get fix history
const history = await client.getContainerFixHistory(containerId);

// Get specific fix attempt details
const attempt = await client.getContainerFixAttempt(containerId, fixId);

Container Improvements Operations (AI-Powered)

// Get AI improvement suggestions
const suggestions = await client.suggestContainerImprovements(containerId);
console.log('Suggested improvements:', suggestions);

// Apply an improvement
const applyResult = await client.applyContainerImprovement(
  containerId,
  modificationId
);

// Check improvement status
const status = await client.getImprovementStatus(containerId, modificationId);

// List all applied improvements
const improvements = await client.listAppliedImprovements(containerId);

Examples

See the examples directory for complete SDLC workflow examples.

License

MIT