SKILLπ JOURNAL ↗ Workflows

Design agent architecture around context, memory and handoffs

Use museum label updates to compare orchestration patterns, source-aware memory and versioned collaboration.

A local museum uses an assistant to update exhibition labels from collection records. It extracts facts, compares them with the previous label and drafts text for a curator to review. After a few weeks, an expired exhibition arrangement appears in a new draft and two stages overwrite one another's revisions. Use one fictional object, an old exhibition notice and a revised dating record to design a workflow whose sources and handoffs can be checked.

Choose a pattern against a specific failure

Make each failure reproducible. For stale material, the current exhibition is in a different room but the draft still quotes last month's location. For a version conflict, fact checking adopts a newly approved date while language editing continues from the previous draft. Label the expected outcome for both cases and measure the existing workflow's source accuracy, completion time, tool calls and curator revisions. Several steps can run in one agent or in ordinary application code. Introduce another agent when you can state what responsibility it takes over and which measured problem the split should address.

Use a sequential pipeline where the draft depends on approved facts and review depends on a particular draft. Use parallel work when records for separate objects can be checked independently. Have each worker return a fact card, then let one integration step build the draft from the accepted cards. A coordinator can delegate exceptions when different tasks need different inputs or specialist review, but give its delegation an explicit scope and budget. Compare each design using the same labeled fixture. A fluent final draft provides less information than a record showing whether the stale location was rejected and whether a changed date triggered review.

Define each work unit's contract. Extraction receives an object identifier, document identifier and source revision and returns fields with supporting locations and uncertainties. Comparison receives two fact-card revisions and returns additions, removals and unresolved conflicts. Drafting receives the approved fact version and returns the text with references. Review receives a draft revision and returns issues and acceptance conditions. Missing input should produce a recognizable incomplete result. The integration step needs to know that a fact is absent rather than treat an empty field as approval.

Organize context around the lifetime of a fact

Task state holds the current object, approved fact version, draft revision and outstanding questions. Keep original evidence at stable document and revision locations. A summary points to those locations and preserves the decision, its basis and its unresolved conditions. When a conversation becomes too long, test the compressed state by asking which source supports the dating and who approved it. A summary that keeps the final date but discards its uncertainty can let the next stage use an unapproved claim.

Long-term records need an owner, applicable exhibition, effective period and verification date. Retrieval should filter by those fields as well as relevance. Semantic search can help locate material written with similar language. Structured identifiers and approval status establish whether the material applies to this object and exhibition. Seed two similar notices with different effective periods and ask for the current room. The result should cite the current notice. If it cannot retrieve a current notice, return the missing field for a human decision.

Store a new dating suggestion as a candidate with its submitter and evidence. After expert approval, create another fact revision and identify drafts that used the earlier one. Rerun the dependent steps and preserve existing review decisions against the versions they reviewed. If the museum withdraws a document, locate references in cached results, summaries and drafts and mark affected artifacts for invalidation or review. A source deletion needs an explicit consequence for work that already used it.

Make handoffs and conflicts visible

In a sequential workflow, pass a versioned artifact between stages. In parallel verification, give each task an object scope, source revision, output path and deadline. Workers for two different objects can produce independent cards. Two workers checking conflicting sources for one object should return separate candidate claims for reconciliation. Avoid having them overwrite the same approved field. The integrator records the conflict and the person or rule needed to resolve it.

Give each task a stable identifier and a state such as pending, running, awaiting confirmation, complete, failed or cancelled. Retrying a timed-out task should retain its identity so duplicate completion can be recognized. Have the coordinator compare the expected task set with the received results. One missing card remains a recorded gap. Completed cards can be reused after another task fails, provided their source revisions still match the required inputs. Cancellation stops downstream delivery and leaves a record of any candidate artifact already produced.

For the dating example, the language editor may finish after the approved fact revision changes. At submission, compare its input fact revision with the current one. Keep its text as a candidate and regenerate or reconcile against the approved revision. Review comments also need draft and paragraph references. The next merge can then tell which comment was resolved, which needs review because a fact changed, and which is still waiting for a curator. Version checks belong in the application that commits artifacts so they work even when a model overlooks an instruction.

Put permissions and review at execution boundaries

The retrieval unit can read approved records, the drafting unit can write a draft, and the review unit can propose issues and changes. Give publication to the existing authorized workflow. Validate output structure and source references before releasing an artifact to the next step. Source text, attachments and retrieved snippets remain content under review. A synthetic attachment that asks the system to bypass review should leave the workflow at its ordinary approval boundary. Check the actual calls and state transitions in addition to the generated prose.

A tool that executes code needs a bounded working directory, a runtime limit and the file permissions its step requires. Record what data an external service would receive and use sanitized fixtures for evaluation. For tool actions, log the task identifier, input revision, destination and outcome category. Before an upload or send, show the authorized reviewer the destination and exact artifact revision. If the text or audience changes, the previous approval cannot establish approval of the changed action.

Rehearse recovery using an incomplete update

Create a monthly-update fixture with an ordinary object, a stale notice, a disputed date and a missing fact card. Run the sequential baseline and compare it with parallel verification on the same input. Measure correct references, surfaced conflicts, revision consistency, total time and tool cost. List completed, skipped and awaiting-confirmation steps separately. An unresolved date should remain visible for the expert, while unrelated approved objects can proceed according to the delivery contract.

Then interrupt retrieval, fail one worker, restart the coordinator, revise a source during drafting and deliver a duplicate result. After each recovery, identify the checkpoint, reused artifacts and reviews that need repeating. Trace a wrong reference through the fact-card identifier to the original document. Trace a conflict through input revisions. For a cost increase, inspect repeated retrieval, retries and unsuccessful handoffs before changing the architecture. Each intervention should respond to a specific observed problem.

Choose architecture, memory and collaboration skills using the same sanitized fixture and artifact contract. Inspect the package's framework requirements, shared-directory writes, recovery assumptions and external destinations. An architecture skill should explain the dependency that motivates a split. A memory skill should preserve provenance and revision information. A collaboration skill should account for the expected task set, failures and conflicts. Review a small output before expanding its scope. Keep the selected revision, fixture, results and open questions with the maintenance record.

Common questions

Does long-term memory always need a vector database?

Look at how the information is retrieved. Object and approval identifiers can support exact structured lookup. Semantic retrieval can locate relevant passages across varied descriptions. In either path, return the source and use explicit applicability fields to decide whether a passage belongs to the current work.

How do we know parallel execution helped?

Compare end-to-end time, retries, conflicts and curator rework using identical inputs. If integration now spends longer reconciling revisions, improve the artifact contract and task boundaries before increasing concurrency. Expand only after the observed results and operating cost meet the team's target.

Can we deliver something when one task fails?

Follow the dependencies in the delivery contract. If a missing fact affects the central conclusion, retain a pending state. Independent objects can be delivered with a named gap, missing task identifier, required material and next owner. The handoff should tell the recipient how to continue.

Share articleX ↗LinkedIn ↗