Sign In

@ar-agents/aduana

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ar-agents/aduana

ARCA Aduana (formerly AFIP Aduana / María) agent toolkit for the Vercel AI SDK 6. Look up import/export declarations by SUSI/KIM/OM number, status of an in-flight despacho, and the publicly-available tariff nomenclature (NCM). Adapter pattern: typed mock

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
10
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

@ar-agents/aduana

ARCA Aduana (formerly AFIP / María) as drop-in tools for the Vercel AI SDK.

Look up Argentine customs declarations by SUSI / KIM / OM number, check the status of an in-flight despacho, and resolve NCM tariff codes — all from inside an agent.

Install

pnpm add @ar-agents/aduana

Usage

import { aduanaTools, HttpAduanaAdapter } from "@ar-agents/aduana";

const tools = aduanaTools({ adapter: new HttpAduanaAdapter() });
// Pass `tools` directly to Vercel AI SDK's generateText / streamText.

For testing, swap the HTTP adapter for the in-memory one:

import { InMemoryAduanaAdapter } from "@ar-agents/aduana";

const tools = aduanaTools({
  adapter: new InMemoryAduanaAdapter({
    despachos: [
      {
        identifier: { kind: "SUSI", value: "24001IM4001234A" },
        found: true,
        status: "canalizado_verde",
        operationKind: "IM4",
        ncmCode: "84713010",
      },
    ],
  }),
});

Tools

ToolReturns
aduana_lookup_despachoStatus, operation kind, NCM, registration date, Aduana office. {found: false} for unknown IDs — not an error.
aduana_lookup_ncmDescription, whether currently in force, AEC + DIE percent.

Errors

All errors extend AduanaError (which extends ArAgentsError from @ar-agents/core):

  • AduanaValidationError — bad input
  • AduanaUnconfiguredError — adapter not wired (default), see error message for setup steps
  • AduanaApiError — non-2xx HTTP response (retryable for 5xx / 429)

Status

v0.1 — read-only against the public ARCA REST surface published in 2025. Write operations (registering a despacho) require WSAA cert handling and are out of scope for v0.1.

License

MIT

Keywords

aduana

FAQs

Package last updated on 03 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts