Show HN: PharmA2A, an open protocol for pharmacy-to-supplier orders on A2A

Hacker News by 6 min read 75x views
Show HN: PharmA2A, an open protocol for pharmacy-to-supplier orders on A2A

Share Post

tests A2A 1.0 A2A extension  CC0 1.0  Apache 2.0 Python 3.11+

The open protocol for straightforward orders between a drugstore and its suppliers, labs, wholesalers and purchasing platforms, on top of A2A.

Version 0.1, published on 12 November 2026. Site: pharma2a.org. Contact: [email protected]. Version française.

In France, a community drugstore orders immediately from hundreds of suppliers: dermocosmetics, supplements, medicinal devices. Every command is a form, a mail, a phone call, afterward a inspect at delivery. PharmA2A fixes what the pharmacy's purchasing delegate and the supplier's delegate say to each other, so that an command is correct the archetypal period and the provider learns, whenever the pharmacist allows it, what its products do on the shelf.

A2A (Agent2Agent, Linux Foundation) says how two agents talk. PharmA2A says what they say: five messages, all a JSON Schema, declared as an A2A profile extension, https://pharma2a.org/ext/v1. To our knowledge, it is the archetypal sector-specific dictionary built on A2A.

Message From To What it carries
fiche_fournisseur supplier anyone, no key who the provider is, its terms, its range by CIP 13 alongside group size, position and VAT rate, and its catalog cost if it chooses
commande pharmacy supplier the acquisition order: products, quantities, a reference; archetypal as a recommendation whenever the conditions are unknown; never a price
accuse_reception supplier pharmacy line by line: confirmed, rear order, out of stock, substitution; command number, shipment date; its own prices as it states them
etat_de_rayon pharmacy supplier only the supplier's products, lone if the pharmacist allows it: stock, sales, cover
relance pharmacy supplier a follow-up on an command already sent; never a new order

The site names are French: PharmA2A starts alongside French community pharmacy, its CIP 13 codes and its words. The specification and the English guide explain all communication in English.

  1. No financial data of the drugstore in any message. The supplier's own conditions journey as it states them, never recomputed.
  2. Nothing invented. A site nobody stated stays null.
  3. Only the provider speaks for the supplier, and a transcribed answer never confirms an command on its own.
  4. A communication that says nothing is not a confirmation.
  5. The drugstore calls, the provider answers. No push, no stream.
  6. No tolerant data.

An command is transmitted once: the citation is its identity, per client account.

What is in this repository

Part What it is Where
The protocol The specification and the five JSON Schemas. This is PharmA2A. SPECIFICATION.md, schema/
Sample supplier The smallest provider delegate that speaks PharmA2A, concerning a hundred lines: an command in, an acknowledgement out. A template for a lab or a application vendor. examples/sample-supplier/
Supplier email bridge A complete supplier-side delegate for suppliers who lone have a mailbox today: it sends the command by mail, says the answer, and returns it as an acknowledgement. It can additionally toggle records alongside an ERP. Replies are transcribed by a tongue model, optional: the model's provider receives the content of the answer and, to equivalent it, the order's citation and lines (product codes, labels, quantities); the delegate never adds the pharmacy's character or a price. the pharma2a package, python -m pharma2a
Demo pharmacy A command row that sends an command to any provider delegate and shows the acknowledgement. python -m pharma2a.officine

The pharma2a bundle additionally carries what all part uses: the dictionary and its validation (pharma2a.dictionnaire).

Python 3.11 or newer.

git copy https://github.com/pharma2a/pharma2a && cd pharma2a python3 -m venv .venv && . .venv/bin/activate && pip instal -e ".[modele,test]"

The example supplier, in one minute. Start it, afterward let the demo drugstore command from it:

python examples/sample-supplier/agent.py python -m pharma2a.officine --agent http://127.0.0.1:8766 --attendre 2 # in a second terminal

The provider email bridge. It starts in outline mode: nothing is sent, mails are written to sorties/.

PHARMA2A_JETON=a-test-token python -m pharma2a PHARMA2A_JETON=a-test-token python -m pharma2a.officine # in a second terminal

Its delegate cardstock is at http://127.0.0.1:8765/.well-known/agent-card.json. Every environment is an environment variable, listed in .env.example. python -m pytest runs the tests.

The drugstore purchasing delegate that SyderaAI (Paris) runs for its pharmacies speaks PharmA2A with their suppliers. No provider runs an delegate yet, so that purchasing delegate hosts the provider email extend for all supplier: the provider gets a apparent communication alongside the command in its body, answers as usual, and the extend transcribes the answer into the dictionary. The day a provider serves its own agent, the drugstore changes one URL.

Pharmacy purchasing agents that conversation PharmA2A:

Agent Publisher
Mercury SyderaAI, Paris

To add yours, open a drag petition that adds one row to this table: the agent's name, its publisher, and a contact. Pour ajouter le vôtre, ouvrez une drag petition qui ajoute une ligne à ce tableau.

Issues and drag requests are welcome: see CONTRIBUTING.md, GOVERNANCE.md and CODE_OF_CONDUCT.md. Security reports go through SECURITY.md, never through a community issue. Versions are in CHANGELOG.md.

The dictionary (schema/) is community domain, CC0 1.0. The delegate and its tests are Apache 2.0. PharmA2A is a trademark of SyderaAI, Paris, submitted alongside the French INPI: the satisfied is free, the name is not, see TRADEMARK.md. Anyone may implement, copy, fork and extend the protocol without asking; the name is protected lone so that nobody can call "PharmA2A" what does not prosecute it, which is what keeps the average tongue common.

Other Article Hacker News
↑
Close Right Ads
Close Left Ads