English. This package is a Python interpreter for AgentSpeak, the
agent-oriented programming language used by Jason,
a well-known BDI (belief-desire-intention) multi-agent platform written in
Java. It is a fork of niklasf/python-agentspeak (previously published on
PyPI as agentspeak), maintained at
farell14/python-agentspeak
and published here as py-agentspeak while changes make their way back
upstream.
Español. Este paquete es un intérprete en Python de AgentSpeak, el
lenguaje de programación orientado a agentes que usa Jason, una conocida plataforma multi-agente BDI
(creencias-deseos-intenciones) escrita en Java. Es un fork de
niklasf/python-agentspeak
(publicado antes en PyPI como agentspeak), mantenido en
farell14/python-agentspeak
y publicado aquí como py-agentspeak mientras los cambios llegan al
repositorio original.
- Jason-style AgentSpeak interpretation
- Easy integration with existing Python code
- Support for complex agent constructions
English:
pip install py-agentspeak
Español:
pip install py-agentspeak
- Python 3.8 or higher / Python 3.8 o superior
- Additional dependencies are automatically installed / Las dependencias adicionales se instalan automáticamente
!hello_world.
+!hello_world <-
.print("Hello world!").
English. Run a standalone agent program:
$ python -m agentspeak examples/hello_world.asl
Run an interactive console:
$ python -m agentspeak
See examples/embedded for an example that interfaces with custom
Python code.
Español. Ejecutar un programa de agente independiente:
$ python -m agentspeak examples/hello_world.asl
Ejecutar una consola interactiva:
$ python -m agentspeak
Revisa examples/embedded para un ejemplo de integración con código
Python propio.
python-agentspeak should be mostly equivalent to Jason.
- Plan annotations are parsed and used as plan labels (e.g. for
.untellHow), but behavior annotations such asatomicorbreakpointare not interpreted. - Standard library does not yet contain syntactic transformations with
{begin ...}and{end}. - Standard library contains some, but not all, introspective and
plan-manipulation actions. Implemented:
.current_intention,.intend,.drop_intention,.succeed_goal,.drop_all_intentions,.add_plan,.remove_plan,.relevant_plans,.plan_label. Not yet implemented:.fail_goal, event/desire introspection (.desire,.drop_event,.drop_all_events,.drop_desire,.drop_all_desires), and agent lifecycle actions (.create_agent,.kill_agent,.at,.perceive). .send(Receiver, askOne, Query, Answer)and.send(Receiver, askAll, Query, Answer)query the receiver's belief base directly and bind the answer in the same reasoning step, rather than actually dispatching an asynchronous message and suspending the sender until a reply arrives.- Jason 2.0 fork join operators are tokenized by the lexer but not yet parsed/supported.
- Literals are only comparable if they have the same signature.