Skip to main content

agmen (Python)

Agmen es un framework de código abierto para robótica, IA e IoT. Su núcleo (en C++) es el "sistema nervioso" del robot: mueve mensajes entre nodos de forma rápida, confiable y con marca de tiempo.

Este paquete es la implementación de referencia en Python del formato de mensajes. Con él, un nodo de Python habla con nodos de C++ sin dependencias extra.

pip install agmen
from dataclasses import dataclass
import agmen
from agmen import wire

@dataclass
class MotorCommand(wire.Message):
    SCHEMA = "MotorCommand{f32 left;f32 right}"   # el mismo esquema que en C++
    left: float
    right: float

pub = agmen.Publisher(MotorCommand, "/cmd")      # un topic: sin IPs ni puertos
pub.publish(MotorCommand(0.5, 0.5))

sub = agmen.Subscriber(MotorCommand, "/cmd")     # cuantos quieras
sample = sub.receive(timeout=0.05)               # None si no llegó nada

Con topics, los nodos se encuentran solos con el agmen hub de la máquina (agmen run lo arranca). También puedes usar una dirección fija ("127.0.0.1:7500"), sin hub.

Basta con el esquema: el layout en bytes (igual que un struct de C) sale solo.

También instala el comando agmen, que levanta todo tu robot con un solo comando y abre un panel web para controlarlo:

agmen run robot.toml     # todos los nodos + panel web (nodos, logs, gráficas, inspector, manejar)
agmen run robot.toml --red   # el panel en tu red local (celular), con clave
agmen web                # solo el panel: grafica cualquier mensaje que le llegue
agmen echo 127.0.0.1:7400   # muestra cualquier mensaje en la terminal
agmen topic list            # qué topics hay, de qué tipo, quién manda y quién escucha
agmen topic echo /imu       # los mensajes de un topic, sin quitarle el puerto a nadie

Tus mensajes también pueden vivir en un archivo .agmen, el mismo que usa C++ para generar su código:

msgs = agmen.load("arca9.agmen")
pub = agmen.Publisher(msgs.Articulaciones, "/arca9/q")
pub.publish(msgs.Articulaciones(q=[90.0] * 12, modo=msgs.Modo.TROTAR))

agmen gen arca9.agmen --python . escribe el .py (para el autocompletado de tu editor) y agmen gen arca9.agmen muestra cada tipo con su esquema.

El panel también acepta a Foxglove (solo lectura): conéctate a ws://127.0.0.1:8080/ws.

⚠ Versión 0.x: la API todavía va a cambiar entre versiones menores.

Documentación, tutorial y código: https://github.com/flkochu/Agmen

Metadata

Release files for agmen 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agmen 0.7.0
File Size Uploaded Provenance Actions
agmen-0.7.0.tar.gz 92.6 kB With provenance Details for agmen-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agmen 0.7.0
File Interpreter ABI Platform Actions
agmen-0.7.0-py3-none-any.whl Python 3 none any Details for agmen-0.7.0-py3-none-any.whl

Total release size: 190.6 kB

Release files / agmen-0.7.0.tar.gz

Download URL agmen-0.7.0.tar.gz
Size 92.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9a9f4f17112f3373f4886fbdbab9cf9b10d546cca0d82d3124586be43e5c7abf
BLAKE2b-256 checksum
How to use checksums
0d4e40dd44806a26b11479a799a8de0dc5d8d2b50f2deb5a80a681610316abbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / agmen-0.7.0-py3-none-any.whl

Download URL agmen-0.7.0-py3-none-any.whl
Size 98.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bba49949b9d41ac71c84e7d70344d1a67b1861958feba59d11e6edb426f4119
BLAKE2b-256 checksum
How to use checksums
1a94aece671c1ad4cf83ebf06838cd73c3dc8c6f2f729a8aca4f9914dc3ad3dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for agmen 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agmen-0.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page