amoorion.methods

Operations over the platforms; the CLI, API, MCP and daemon expose them.

class amoorion.methods.AccountStatus(*, platform, ready, missing=[], error=None)[source]

Bases: Model

Whether a platform is ready: its missing secrets by name, never by value.

Parameters:
  • platform (str)

  • ready (bool)

  • missing (list[str])

  • error (str | None)

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class amoorion.methods.Accounts(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Tells which platforms can work right now. Asks the vault, not the platforms.

Parameters:
run(params)[source]

Try every secret of every plugin; what can’t be read counts as missing.

Parameters:

params (Model)

Return type:

list[AccountStatus]

class amoorion.methods.Compose(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Lets a language model write a text. Posts nothing: pair it with publish in a workflow.

Parameters:
Params

alias of ComposeParams

run(params)[source]

One completion by the server in the vault.

Parameters:

params (ComposeParams)

Return type:

Composition

class amoorion.methods.Delete(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Removes a message from its platform, and marks its copy in the dataset as deleted.

Parameters:
Params

alias of DeleteParams

run(params)[source]

A failure comes back as a Result with the reason, not as an exception.

Parameters:

params (DeleteParams)

Return type:

Result

class amoorion.methods.InboxMethod(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Lists what is already kept; asks no platform, so it works offline.

Parameters:
Params

alias of InboxParams

run(params)[source]

The newest messages kept.

Parameters:

params (InboxParams)

Return type:

list[Message]

class amoorion.methods.Method(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Controller

One operation of amoorion, the same for every front-end.

A subclass names itself, declares Params and implements run; registered in METHODS, it appears in the CLI, the API, the MCP server and Amoorion.

Parameters:
Params

alias of NoParams

property vault: Vault

The vault given, or the environment’s when first needed.

property inbox: Inbox

The inbox given, or the environment’s when first needed.

property dataset: Dataset

The dataset given, or the environment’s when first needed.

run(params)[source]

Do the work; takes validated parameters, answers models.

Parameters:

params (Model)

Return type:

Model | list[Model]

class amoorion.methods.Notify(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

A post to wherever the user wants to hear from amoorion, set in AMOORION_NOTIFY.

Parameters:
Params

alias of NotifyParams

run(params)[source]

Publish to those platforms; none set means nothing is sent and no error.

Parameters:

params (NotifyParams)

Return type:

list[Result]

class amoorion.methods.PluginInfo(*, name, description, capabilities, error=None)[source]

Bases: Model

One platform and what it can do; error when its package failed to load.

Parameters:
  • name (str)

  • description (str)

  • capabilities (list[Capability])

  • error (str | None)

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class amoorion.methods.Plugins(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

What is installed. Loads every plugin, and also reports those that failed.

Parameters:
run(params)[source]

Working plugins by name, then the failed ones.

Parameters:

params (Model)

Return type:

list[PluginInfo]

class amoorion.methods.Publish(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

One post to several platforms. One failing doesn’t stop the others.

Parameters:
Params

alias of PublishParams

run(params)[source]

One Result per platform, whatever happens on each of them.

Parameters:

params (PublishParams)

Return type:

list[Result]

class amoorion.methods.Read(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Fetches the latest messages, and keeps them in the inbox and the dataset.

Parameters:
Params

alias of ReadParams

run(params)[source]

Read, then keep; keep also tells which messages are known already.

Parameters:

params (ReadParams)

Return type:

list[Message]

class amoorion.methods.Reply(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Answers one message on its platform.

Parameters:
Params

alias of ReplyParams

run(params)[source]

A reply needs only the id, so the message is rebuilt from it instead of fetched.

Parameters:

params (ReplyParams)

Return type:

Message

class amoorion.methods.Search(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Finds messages already in the inbox; asks no platform.

Parameters:
Params

alias of SearchParams

run(params)[source]

The newest messages containing the text.

Parameters:

params (SearchParams)

Return type:

list[Message]

class amoorion.methods.Simulate(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Personas talking about a topic, for trying out rules and workflows on a crowd.

Parameters:
Params

alias of SimulateParams

run(params)[source]

The feed goes into the inbox under society:<run>; no platform is touched.

Parameters:

params (SimulateParams)

Return type:

list[Message]

class amoorion.methods.Skill(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Hands out the SKILL.md installed with the package, so its version always fits.

Parameters:
run(params)[source]

Read the file; nothing else is touched, so it needs no vault.

Parameters:

params (Model)

Return type:

SkillText

class amoorion.methods.SkillText(*, path, text)[source]

Bases: Model

The skill’s file: path to copy it into an agent’s skills, text to read it.

Parameters:
  • path (str)

  • text (str)

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class amoorion.methods.Snapshot(*, platform, profile, path, read, complete, present, gone, deleted)[source]

Bases: Model

What a snapshot found: read now, present, gone from the platform, and deleted by amoorion.

Parameters:
  • platform (str)

  • profile (str)

  • path (str)

  • read (int)

  • complete (bool)

  • present (int)

  • gone (int)

  • deleted (int)

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class amoorion.methods.SnapshotMethod(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

A copy of a profile’s posts, as files. Read-only for the platform.

Parameters:
Params

alias of SnapshotParams

run(params)[source]

Only a complete read (fewer posts than asked for) can tell that a post is gone.

Parameters:

params (SnapshotParams)

Return type:

Snapshot

class amoorion.methods.Wiki(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

A Wikipedia summary as a message, ready for a workflow to post on.

Parameters:
Params

alias of WikiParams

run(params)[source]

Ask Wikipedia’s public REST API; it wants a User-Agent saying who is asking.

Parameters:

params (WikiParams)

Return type:

Message

class amoorion.methods.Workflow(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

Methods one after another; each can use the previous answer as $last. Or rules over the inbox.

Each message goes through a rule once; a rule that failed gets it again next time.

Parameters:
Params

alias of WorkflowParams

run(params)[source]

Each step run, stopping at the first failure; or each rule run on each new message.

Parameters:

params (WorkflowParams)

Return type:

list[StepResult] | list[Handled]

amoorion.methods.plugsFlagsToList(flags)[source]

The names of the flags that are on, e.g. of Plugins["x"].infoflags.

Parameters:

flags (dict[str, bool])

Return type:

list[str]

Modules

accounts_method

Accounts: which platforms have their secrets.

all_params

The params of every method in one place; each is defined next to its method.

base

Methods: what amoorion can do, independent of who asks.

compose_method

Compose: ask a language model to write something.

delete_method

Delete: remove one message from its platform, a copy kept first.

inbox_method

Inbox: the messages received so far.

notify_method

Notify: tell the platforms of AMOORION_NOTIFY.

plugins_method

Plugins: what is installed and what each can do.

publish_method

Publish: one post on several platforms.

read_method

Read: the latest messages of one platform.

reply_method

Reply: answer one message on its platform.

search_method

Search: find messages of the inbox by their text.

simulate_method

Simulate: personas reacting to a topic, in memory only.

skill_method

Skill: amoorion's agent skill, what an agent reads to learn to use it.

snapshot_method

Snapshot: read a profile's posts into the dataset.

wiki_method

Wiki: the summary of a Wikipedia article.

workflow_method

Workflow: methods run one after another, or rules running them on what arrived.