Sentience is an experimental, AI-native programming language built around:
- Memory-first architecture (
mem.short
,mem.long
, and potentiallymem.latent
) - Agent-based programming (
goal
,on input
,reflect
,train
,evolve
) - Contextual conditions (
if context includes
) - Embeddable REPL and optional file interpreter
- Designed for exploring emergent agency, adaptation, and synthetic awareness
⚠️ This project is in an early research/prototyping phase.
It is not production-ready, may change significantly, and should be considered exploratory research.
- Memory-First Architecture
All agent knowledge (short and long memory) is stored via simple key–value maps insideAgentContext
. - Agent-Based Programming
Define agents usingagent Name { … }
syntax (includinggoal: "…"
,on input(param) { … }
,reflect { … }
,train { … }
,evolve { … }
). - Contextual Conditions
Inside anyreflect
block (or nested deeper), useif context includes "some_string" { … }
to execute code only when the short-term memory (mem.short["msg"]
) contains that substring. - Embeddable REPL
Experiment interactively: register agents, send them input, train or evolve them, and immediately see how they react. - Designed for Emergent Intelligence Research
A minimal language core that allows quick prototyping of synthetic‐agent behavior and introspection.
git clone https://github.com/nbursa/sentience.git
cd sentience
cargo build --release
cargo run --release
You should see:
Sentience REPL v0.1 (Rust)
>>>
Within the REPL, type an agent definition block. For example:
>>> agent Reflector {
... mem short
... goal: "Detect emotion in input"
...
... on input(msg) {
... embed msg -> mem.short
... reflect {
... if context includes "joy" {
... print "You're radiating joy!"
... }
... if context includes "sad" {
... print "I sense sadness..."
... }
... }
... }
... }
After closing the }
you’ll see:
Agent: Reflector
Init mem: short
Goal: "Detect emotion in input"
Agent: Reflector [registered]
Use the .input
command:
>>> .input I am filled with joy today!
You're radiating joy!
- When you type
.input I am filled with joy today!
, the REPL finds theon input(msg)
block of the registered agent, setsmem.short["msg"] = "I am filled with joy today!"
, then executes the body. In our example, thereflect
block sees “joy” in the message and prints “You’re radiating joy!”.
Similarly, use:
.train <some_data>
– triggers thetrain { … }
block, settingmem.short["msg"] = <some_data>
before running its body..evolve <some_data>
– triggers theevolve { … }
block in the same way.
If the agent does not have a train
or evolve
block, REPL will respond with, for example, Agent has no train block.
This repository is licensed under the MIT License. See the LICENSE file for details.
Contributors: Nenad Bursać
If you have questions, suggestions, or want to contribute, please open an issue or submit a pull request.