ProductAgent Workflows
Back

Building reliable company workflows with Matrix agents

A practical architecture for reliable agent workflows that gather context, produce work, request human review, take action, and leave a shared record.

Matrix OS9 min read

Part of the Matrix company OS series.

“Automate our reporting” sounds like one task. In practice, it is a chain of decisions spread across several systems.

The workflow must know when to start, which projects count, where the latest numbers live, what changed since last month, which template to use, who must review the draft, where the approved report belongs, and who should receive it.

A model can write the prose. The product challenge is reliably moving from a trigger to an accountable outcome.

We are designing Matrix workflows around a simple loop:

Trigger → gather context → agent work → policy check → human review → action → shared record

This post describes a roadmap architecture. The workflow surface discussed here is a direction for Matrix OS, not a statement that every trigger and connector is currently available.

Start with a goal, not an automation canvas

Workflow products often begin with boxes and arrows. Users usually begin with an outcome.

  • “When KYC documents arrive, organize them and tell me what is missing.”
  • “Every month, prepare a project report for review.”
  • “When a client email has no reply after two business days, draft a follow-up.”

Matrix should capture five things before generating a workflow:

  1. Trigger: What observable event or schedule starts the work?
  2. Outcome: What artifact or state means the work is complete?
  3. Sources: Which systems and records may the workflow use?
  4. Policy: What may happen automatically, and what requires approval?
  5. Owner: Which person is responsible when the workflow cannot decide?

The system can propose the intermediate steps, but those five fields define the contract.

Model the workflow as durable state

Agent work is nondeterministic; workflow state should not be.

A run needs an explicit state machine:

queued
  -> gathering_context
  -> working
  -> awaiting_input | awaiting_review
  -> acting
  -> complete
  -> failed | canceled

Each transition records its inputs, outputs, actor, and timestamp. Long waits are normal. A run may pause for a client document for three days or for a partner's approval until Monday.

The persistent computer model behind Matrix cloud coding already keeps processes and artifacts available beyond one browser session. Company workflows add durable business state above those processes so work can resume without guessing what happened before an interruption.

Triggers wake workflows; they do not decide outcomes

Triggers can come from:

  • a schedule,
  • a new or changed file,
  • an incoming email,
  • a form submission,
  • a changed CRM record,
  • a person pressing Run,
  • another workflow completing.

Provider notifications are not always complete event payloads. Google Drive, for example, documents that change notifications indicate that new changes exist; the application then reads the changes feed. Microsoft Graph subscriptions expire and must be renewed, and lifecycle notifications can signal missed events or required reauthorization.

Matrix should therefore convert external triggers into internal, deduplicated events. The event wakes a workflow, which then reconciles authoritative state before acting.

This avoids fragile assumptions such as “one webhook equals one new file” or “no webhook means nothing changed.”

Gather only the context required for this run

The context step resolves references at execution time:

  • current project plan,
  • files in approved source folders,
  • relevant email thread,
  • last accepted report,
  • company template and instructions,
  • known exceptions and prior reviewer feedback.

It also records versions. If a document changes while an agent is working, the workflow can refresh, flag the conflict, or require a new review.

This is where OneDrive and Google Drive as agent working memory connects to the workflow runtime. The agent receives bounded context with provenance instead of broad, invisible access to a company corpus.

Separate reasoning from authority

An agent can decide that an email is probably ready. That does not mean it should have the authority to send it.

Matrix workflows should represent actions as proposals:

action: send_email
recipient: client@example.com
draft: workspace://follow-up-3
evidence: [thread, project-status, company-policy]
risk: external-communication
required_review: project-owner

Policy then determines whether the proposal can execute automatically, requires one reviewer, requires two reviewers, or is prohibited.

This separation lets companies change their risk posture without rewriting every prompt. Internal folder organization might be automatic. External communication might always require approval. A workflow involving identity documents might require a designated compliance role.

Design the human review around the decision

“Approve this agent run” is too vague.

A reviewer should see:

  • the exact proposed action,
  • the artifact or diff,
  • the sources used,
  • unresolved uncertainty,
  • policy checks,
  • the consequence of approval,
  • the person who owns the workflow.

The review surface should make rejection useful. A reviewer can correct data, edit the draft, change the destination, provide an instruction, or stop the workflow. That feedback becomes structured evidence for improving the template or skill later.

The team experience belongs in a shared agent workspace, where colleagues can find pending decisions without tracking down the person who launched the run.

Three workflows to prove the model

1. KYC document intake

Trigger: New files arrive in an approved client folder.

Context: Required-document checklist, client record, file metadata, and current folder state.

Agent work: Classify files, extract bounded fields, detect duplicates, and identify missing or expired items.

Review: A designated person checks ambiguous classifications and any proposed client request.

Action: Organize approved files and update the checklist.

Record: Sources, extracted fields, exceptions, reviewer decision, and final location.

The agent assists the process; it does not determine whether the company has satisfied its legal obligations.

2. Monthly project reporting

Trigger: A monthly schedule.

Context: Project plan, completed work, open risks, financial inputs, prior report, and current template.

Agent work: Reconcile sources, draft narrative sections, and flag missing inputs.

Review: Project owner edits and approves the report.

Action: Save the approved version and notify the distribution list.

Record: Source versions, changes from prior month, approvals, and final document link.

3. Email follow-up preparation

Trigger: An owned client thread has no reply after a configured period.

Context: Thread, deal stage, promised next step, calendar context, and communication policy.

Agent work: Decide whether a follow-up is appropriate and prepare a draft.

Review: The relationship owner approves or dismisses it.

Action: Create an Outlook draft first; sending can remain a separate approval.

Record: Why the follow-up was suggested, sources, final copy, and outcome.

Reliability is a product feature

A serious workflow runtime needs more than retries.

  • Idempotency: Replayed events do not duplicate emails or files.
  • Checkpoints: Long runs resume from completed stages.
  • Timeouts: Waiting states escalate to a person instead of hanging forever.
  • Compensation: Partial actions have a documented recovery path.
  • Version checks: Writes do not silently overwrite newer work.
  • Observability: Owners can see latency, failures, and review bottlenecks.
  • Evaluation: Teams can sample outputs and track correction rates over time.

NIST's Generative AI Profile emphasizes governance, measurement, and management alongside model capability. In product terms, an automated workflow should expose enough evidence to evaluate whether it remains safe and useful after launch.

Build one complete outcome at a time

The temptation is to ship a large gallery of triggers and actions. We would rather prove a small number of complete workflows.

A complete workflow handles the happy path, missing input, revoked access, conflicting versions, reviewer changes, API failure, cancellation, and audit history. Only then does it become company infrastructure.

Matrix already provides the foundation: a persistent computer for agents, files, apps, long-running sessions, and multiple interfaces. The company workflow layer turns those primitives into repeatable outcomes that colleagues can own together.

The goal is not to remove people from the loop. It is to remove the coordination work that prevents people from exercising judgment where it matters.

Next, see how these primitives come together in an agent-native deal workspace, then examine the shared permissions, approvals, and audit layer underneath every workflow.