Agentar is an agent-oriented programming language (AOP) for modeling intelligent behavior.
Status: Early development stage
- Python 3.8+
- (Optional) Java 11+ – required only if you want to generate parsers directly using ANTLR
Create a virtual environment (Linux):
python3 -m venv venv-agentarActivate and deactivate (Linux):
source venv-agentar/bin/activate
deactivate
Clone the repository
git clone https://github.com/AntoniRL/agentar.gitRun these commands inside the agentar folder (where setup.py is located) and with the virtual environment activated.
Before installation, make sure pip and setuptools are up to date:
pip install --upgrade pip setuptools wheelThen install Agentar in editable (development) mode:
pip install -e .*Re-run this command every time you change the project’s structure.
- Generate the parser and lexer (only after modifying the .g4 grammar file)
./scripts/generate_parser.sh- Run the interpreter
agentar run examples/helloAgentar.agar
agentar --help - Run the visualization (GUI) All programs located in GUI folder, for example:
python GUI/exampleGui.py-
Generate the parser in Java (useful for testing and visualizing the parse tree)
Requires:
- Java (version 11 or higher)
- plik antlr-4.13.1-complete.jar (
curl -O https://www.antlr.org/download/antlr-4.13.1-complete.jar)
Then run:
antlr4 -Dlanguage=Java -o java_tree grammar/Agentar.g4 find java_tree/grammar -name "*.java" | xargs javac -cp ".:antlr-4.13.1-complete.jar" java -cp ".:../antlr-4.13.1-complete.jar:java_tree/grammar" org.antlr.v4.gui.TestRig Agentar program -gui examples/test.agar