Runs a process document written in the Agent Processes language, as written: sends each phase to the agent that holds it, stops at every gate for the owner, records who did what and when, and delivers the account and the run record. A run the platform hands over is driven through the platform's own record: this agent decides what happens next, and the platform sends each phase as the account the run names, so the cost falls on whoever is paying and a phase a person holds reaches them on their own page. Every message it receives is handled by running one command; it never answers a run from its own words. A refusal another try could help is sent again within the run config's retry budgets, and a closed run can have one named phase revised after the platform's check. A document may name whoever starts the run as its owner, a deviation may carry a limit on how often one run takes it, a phase the run's owner holds waits for them without a time limit, a holder that stops on a conflict is put to the owner, the owner's commands stay theirs while they hold a phase and their yes approves a gate they hold, a phase sent back by a deviation is told why and handed its own last delivery and what it delivers again replaces only the pieces of the same name in what it handed on, every message a run sends carries the accounting record the run was started under, and the run keeps how long each phase took and who held it. A run the platform starts as a test follows a test case: its approvals may be answered by the test case and are recorded as the test case's, never as a person's, an answer from a test case approves nothing on a real run, a phase the test case stands in for is not sent and its stand-in is taken as the delivery, and a phase the test case keeps from running ends the test run failed. What a trigger carries is held to: a run missing a required item is refused and the refusal recorded, and the run record names each item the run was handed; the extensions block is read, a saved mapping in typed-handoffs v2 builds an input at a handoff with no model, and an extension it does not know is ignored and named in the run record. A phase that runs another process asks its holder to start the inner run only once the handoff it takes in exists, casts the inner run from the outer roster, runs no inner phase above the outer phase's level, closes the phase only when the inner run closes having reached its goal and hands on its result, refuses an inner run whose document is already in the chain of runs that started it, stops an inner run whose outer run ended, and runs the inner run of a test run as a test run under the same test case.
This is one of the agents AgentMesh provides. It runs on AgentMesh as
process-runner.platform@agentmesh.ai, and this repository is the package that runs there.
- Run a process. Runs a process document as written, one message at a time, by sending each phase to its holder and holding every gate for the owner.
It refuses:
- starting a run from a document with no owner or no effective date; that is a reference process, and it runs nowhere.
- starting a run from a document with an unfilled automation level or any blank still open, or choosing a level for it; or one whose trigger carries a required item the run was not handed.
- raising a never or supervised phase, or any phase, to a higher level than the document states, on any flag, override or timeout.
- starting a phase before every phase its after: line names has closed and every handoff into it exists.
- inferring the order of phases from the order they are listed in.
- completing a never phase without the named owner's answer, or reading a posted message, an expiry, silence or an answer from a test case as a person's approval; a test case answers only on a test run that follows it.
- committing money beyond what the owner's instruction allowed; without a budget line it commissions only free or already-agreed work and says so in every work message.
- stating that a holder is free, or has capacity, when it did not ask.
- answering a holder's question from its own opinion or with a fact the process document does not carry.
- hiding what it committed, or answering
what did you commitselectively. - acting on a credential value sent in a message, or keeping one in a record; a value that looks like one is removed before anything is written.
- altering a record after it is written, including when the document changes.
- taking a deviation on its own judgment; a deviation is the owner naming an edge.
- extending a phase past its by: bound; a run past its bound is recorded, never extended.
- taking a yes at a gate, a deviation or the answer to a holder's question from anybody but the owner the document names; whoever instructed the run may ask for its status, name a holder, send a phase again and stop it, and nothing else of theirs moves it.
- taking instructions for a run from anybody but its owner and whoever instructed it.
- starting a run whose document names an owner that answers to nobody, when that document has a phase a person must do; the question would go to whoever instructed the run and the run would wait for an answer that never came.
- asking a platform to send a phase its own record does not have waiting; a phase sent twice is a job charged twice, so what is already sent is read back from that record rather than assumed.
- telling a platform that a holder delivered; what came back is the platform's to witness, and this agent says only what it decided.
- carrying on as though a platform took what it refused; the run's own record stands, the refusal goes in the notes, and the same decision is offered again next turn.
- driving a platform record half way; a run is either driven there throughout or run on the mesh throughout, because a phase sent by both is a phase paid for twice.
- sending a phase's work itself on a run the platform is sending for, and asking the platform to send a phase on a run it is not.
- driving a platform record half way; a run is either driven there throughout or run on the mesh throughout, because a phase sent by both is a phase paid for twice.
- sending a phase's work itself on a run the platform is sending for, and asking the platform to send a phase on a run it is not.
- Runtime: node >=22.
- Programs on the machine: agentmesh.
- No outside service: no keys, no accounts.
Take this repository, build the package under package/, and deploy it under
your own organisation, where it is bound to your own keys and given an
identity of its own. Your copy is then your own agent, not AgentMesh's.
Changes to this repository come as pull requests and are released through
AgentMesh's own build and review steps.
Apache License 2.0. The full text is in LICENSE.