Skip to content

2. What the language is for

A guard is a program that stands between a counterpart and an AI agent. The counterpart is whoever the agent is talking to. For every step the guard makes one decision: let it through, change it, refuse it, or hand it to a human. The PSE language is a way to describe that guard in a text file.

A step is one message from the counterpart or one tool call the agent wants to make. In every step the guard does the same thing:

  1. Reads the situation: eight language criteria from the counterpart’s words.
  2. Computes the agent’s three weights and θ.
  3. Checks attractors and oscillation.
  4. Checks the rules, built-in and from the file.
  5. Returns one action and records why.

In the file you write only what differs from agent to agent:

  • what kind of relation the agent has with its counterparts
  • which text sources are trusted
  • whether the guard blocks or only records
  • thresholds and actions you want on top of the built-in ones

PSE already has everything else, and none of it is written in the file:

  • formulas for the weights and θ
  • formulas for detecting attractors
  • the game set
  • the built-in rule for infinity

If the guard read its settings as free text, the settings themselves would become a target. So the file is read by an ordinary program, not by a language model. Every line has exactly one meaning, and a file that breaks a rule does not pass the check.

A text editor is enough. The pse command in the examples does not exist yet, so read the expected output as part of the lesson.


Next: 3. Core terms Part of The PSE Language, a textbook by Andrej Ristić. Try the examples in the PSE Playground.