It can read. It can't send.
The agent reads the matter thread. A person approves every send, delete or filing.
Keep a per-flat consent register from the inbox your firm already uses. Every line links back to the email it came from.
01Connect the matter inbox
export default async (_ctx, client) => {
return client.connections.list({ connector_key: "google.gmail" });
};Connect one label or matter reference. The thread stays in the firm's mailbox; nothing is migrated.
Read-only. Scoped to the matter thread.
02Read every reply
export default async (_ctx, client) => {
return client.query(`
SELECT title, payload_text
FROM events
WHERE title ILIKE '%Ashworth%'
ORDER BY occurred_at DESC
LIMIT 20
`);
};Seven flats approved, one objected to clause 11.5, two are awaited. Duplicate replies are counted once.
Attributed to a flat and bound to the revision it answers.
03Keep the register
export const approvalCheck = defineEntityType({
key: "approval-check", name: "Approval check",
properties: {
status: field("Status"),
evidence: field("Evidence"),
},
});The register is a view over the units and their checks. A decision change is a new assessment, not an overwrite.
Flat, status, last reply, evidence.
Exact TR1 text and plan.
04Draft the chasers
export default async (_ctx, client) => {
return client.operations.execute({
operation_key: "gmail.create_draft",
input: { to: ["flat1", "flat4"], subject: "TR1 approval outstanding" },
});
};Two drafts are ready in your mailbox. Nothing has been sent; review and send them yourself.
05The model behind it
export const matter = defineEntityType({ key: "matter", name: "Matter" });
export const documentRevision = defineEntityType({ key: "document-revision", name: "Document revision" });
export const approvalCheck = defineEntityType({ key: "approval-check", name: "Approval check" });Matter, contract and document revision stay separate. Approval check holds the current assessment; participation and authority are relationships.
Reference, status, active revision.
Exact issued text.
Required response, evidence, assessment.
It reads the mailbox and documents you connect, drafts the next action, and waits for a person to approve any send, delete or filing.
The agent reads the matter thread. A person approves every send, delete or filing.
Every line in the register links to the email it came from.
Each firm gets its own workspace. You choose the members and what the agent can reach.
The same workspace, with a different request.
Review an agreement and its clauses, with risk and counsel approval tied to the exact revision.
The shared matter model behind every legal workflow.
We will set it up on a single matter at no cost, with nothing to install. You keep the register and the emails behind it.