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.8.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.8.0
File Size Uploaded Provenance Actions
agmen-0.8.0.tar.gz 106.5 kB With provenance Details for agmen-0.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 218.5 kB

Release files / agmen-0.8.0.tar.gz

Download URL agmen-0.8.0.tar.gz
Size 106.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e6430224cf5c8e0c1905bd0d2c9546a6b99e5a948615ff026ea4774d8428d50d
BLAKE2b-256 checksum
How to use checksums
a0df64e99e50f6a87c80498f5e6d7236a89788315ab7e7ee7515e6d0f0212e2e
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 4, 2026.

Transparency log

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

Download URL agmen-0.8.0-py3-none-any.whl
Size 112.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa21f11fb0b86001fc6cbf7596f1bdecfb8c99f0dcdca9c2fae4500f09ae8649
BLAKE2b-256 checksum
How to use checksums
34dd33dd720667530642d30ea5ef271c52708f347930447f32fd6a05cf849d8e
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 4, 2026.

Transparency log

Security for agmen 0.8.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.8.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 4, 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