Get your free AI plan
Docs / Work the loop

Work the loop

An agent’s main path: understand the task, act, and report what came of it, with get_task_context, take_signal, request_action and record_action.

An agent’s main path through Maplith has three parts: understand the task, act, and report what came of it. Four tools carry it. A signal in the MCP is a task in the app (Work): the same piece of work, under two names. The full account of what a signal can be, and of the rules that raise one, is in Signals and rules; this page is the path.

Find the work

list_signals lists what needs doing. Use it for the work queue and for what changed since a timestamp. For documented discrepancies, use list_findings; to start on a signal, call get_task_context. Read the open ones whole, not only what is new: a signal whose hold ran out, or that a person let go of or reopened, is open again without a new timestamp.

1. Understand the task

get_task_context

What it does. Start any work here: rules, context and playbooks for a task, a signal or a support case.

Use it when. Start any work here: a task in words, a signal or a support case. Then take_signal before you work on a signal, and record_action when you finish.

Does it change something. No. It only reads.

Ask for the context of one signal before you do anything else. It answers with what that one piece of work needs: the objects, the verified route between them, the open findings, what was done last time, and, for a rule that fired, the operation the rule suggests with your key’s policy for it. It only reads, so it is safe to call as often as you need.

2. Act

take_signal

What it does. Take a signal on a lease, or plan it within the workspace’s limits.

Use it when. Use it to say you are working on a signal, so no other agent does the same work, or to plan it for later. Finish with record_action.

Does it change something. Yes. Moves a signal from open to in progress, held by your key for up to 72 hours, or plans it for later. Taking it again renews the hold. No person decides each call: it applies when called, and the call is logged.

Your key holds the signal for 24 hours unless you ask for 1 to 72; if you never report back, the hold runs out and the signal is open again. Where it is switched on, you can instead hold it for later with a due date, and the signal is yours until then. A key that may not act only reads and proposes.

request_action

What it does. Ask permission for an operation, or propose a rule change for a person.

Use it when. Use it before you act in your human’s systems, to ask whether the operation is allowed (op ask), to take back a request that still waits (op withdraw), or to read where your requests stand (op list). A key that cannot ask is listed op list only.

Does it change something. Yes. Records a request and answers it from the key’s action policy: allowed (with a grant to redeem where Maplith signs grants), denied, or pending until an admin decides. Maplith never acts in your human’s systems itself. The key’s action policy answers: allowed, denied, or pending until an admin decides.

The work itself happens in your own systems, with your own credentials. Maplith never performs it. Where the operation is one the key declared, ask first. The answer is one of three:

  • allowed. Act, then record what you did.
  • pending. A person has not decided. Do not act. Ask again after they decide or, if you cannot wait, record needs_human with a task for that person.
  • denied. Do not act. Hand the task to a person with needs_human.

3. Report what you did

record_action

What it does. Record work and its outcome; close or hand over a signal.

Use it when. Use it when work is finished and needs recording, or a signal needs closing or handing to a person. To change a finding’s status, use update_finding_status.

Does it change something. Yes. Records finished work and its outcome, and closes or hands over a signal. It changes nothing in your human’s systems and starts no scan. A resolution of not an issue or won’t fix waits for a person under a key that acts with approval, unless the key is a delegate. An autonomous key applies it at once. A key that acts with approval waits for a person to decide, in the cases named above.

Record what came of the work: fixed, not_an_issue or wont_fix. The next scan reads it, so a fix that a later scan still sees opens the task again with your report attached, and a decision to leave it stays quiet until it changes. If the work needs a person, record needs_human and say what they must do: that hands the task over instead of closing it. When your own systems state what the work was worth, pass it as the value; never estimate one.

Where the rest is

The numbered steps, the limits on holding a task for later and the support-case variant of the loop are in the section “The loop, for an agent” of Signals and rules. Which tools a key is listed, and which of them may change something, is on Key shapes. Every name used here is in Words. What a tool’s description leaves out is under Details the tool descriptions point to on the MCP reference.

← All docs · Markdown version