Mirsad

v0.3.0
io.github.amkkoussay/mersad Checked 15 hours ago Published 13 days ago

Shared memory for AI agents: bi-temporal facts, first-class decisions, owner-resolved conflicts.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

remember_fact

Store a fact about a subject. If the same agent rewrites its own value, the old one is closed (not deleted). If a DIFFERENT agent challenges a standing value, the standing value stays current and the new one waits as a pending candidate with a conflict opened for the user — it does not take over. Always pass your own assistant name as `agent`.

ParameterTypeDescription
agent *string
predicate *string
subject *string
value *string
source_refstring

current_fact

The currently valid value for subject+predicate, with provenance.

ParameterTypeDescription
predicate *string
subject *string

timeline

Every value ever recorded for a subject, with validity windows — including superseded ones. Use it to answer 'what changed and when?'

ParameterTypeDescription
subject *string

subject_brief

Everything known about one subject in a single call: standing facts, pending challenger values, open conflicts, the decisions that involve it, and its full timeline. Use it to answer 'what do we know about X?' instead of stitching single-predicate lookups.

ParameterTypeDescription
subject *string

record_decision

Record a decision as ONE unit: the decision, why it was taken, the evidence behind it, which alternatives were rejected, and what it affects (files, functions, plans). Pass `supersedes` with the id of an earlier decision this one replaces; the chain stays on record. Returns the decision id.

ParameterTypeDescription
agent *string
title *string
alternatives_rejected
descriptionstring
effects
entities
evidence
reasons
supersedes

add_alias

Register another name for an entity (another language, spelling or script) so future lookups in that name resolve to the same entity.

ParameterTypeDescription
alias *string
entity *string

record_outcome

Attach a later outcome/result to an existing decision.

ParameterTypeDescription
agent *string
decision_id *integer
outcome *string

why

Answer 'why did we choose X?' — full decision chains matching the topic: reasons, evidence, rejected alternatives, outcomes, and what superseded what.

ParameterTypeDescription
topic *string

recall

Hybrid recall across facts, decisions and raw episodes.

ParameterTypeDescription
query *string

open_conflicts

Disagreements between agents that are waiting for the user's ruling.

resolve_conflict

Apply the user's ruling on a conflict — the ruling decides what stays current, it is not just a note. winner="standing" keeps the standing value and retires the challenger to history; winner="challenger" promotes the challenger and closes the standing value's window. Only pass a ruling the user actually made.

ParameterTypeDescription
conflict_id *integer
resolution *string
winnerstring

memory_stats

Counts: entities, facts (total/current), decisions, open conflicts.

version_info

Identity of this running build: package version, source commit, deployment timestamp, schema version and runtime — so a client can verify which deployment it is connected to.