Skip to main content

Jason-style AgentSpeak for Python. Fork of niklasf/python-agentspeak, a Python interpreter for the Jason (jason-lang.github.io) agent-oriented programming language.

Project description

https://img.shields.io/pypi/v/py-agentspeak.svg https://img.shields.io/pypi/pyversions/py-agentspeak.svg GPL 3 License

Origin / Origen

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.

Key Features

  • Jason-style AgentSpeak interpretation

  • Easy integration with existing Python code

  • Support for complex agent constructions

Setup / Instalación

English:

pip install py-agentspeak

Español:

pip install py-agentspeak

Requirements / Requisitos

  • Python 3.8 or higher / Python 3.8 o superior

  • Additional dependencies are automatically installed / Las dependencias adicionales se instalan automáticamente

Usage example / Ejemplo de uso

!hello_world.

+!hello_world <-
  .print("Hello world!").

Usage / Uso

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.

Jason compability

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 as atomic or breakpoint are 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_agentspeak-0.3.0.tar.gz (63.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_agentspeak-0.3.0-py3-none-any.whl (63.8 kB view details)

Uploaded Python 3

File details

Details for the file py_agentspeak-0.3.0.tar.gz.

File metadata

  • Download URL: py_agentspeak-0.3.0.tar.gz
  • Upload date:
  • Size: 63.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_agentspeak-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a8b728a734af34745e639e4d7e2555d903c91c66d9fa34121c68bf48603abff9
MD5 ff7b28b82d1b33d116fc67c101dd3bf9
BLAKE2b-256 72e3ea421d0772dd36f09fe4678cca0902e9c305e0fe18ddd0adba274953bb1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_agentspeak-0.3.0.tar.gz:

Publisher: publish.yml on farell14/python-agentspeak

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_agentspeak-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: py_agentspeak-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 63.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_agentspeak-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f10ce072292e6592c5eb6fd7fed9812ee988ce435851f1e9e6361b8351a54a69
MD5 fb19d57eef244eb7a376bb4678912afc
BLAKE2b-256 ac666039fb7bec9bfe43b925fa41ec39e08006a856812c9eb3a523b71843a803

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_agentspeak-0.3.0-py3-none-any.whl:

Publisher: publish.yml on farell14/python-agentspeak

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page