An n8n AI agent workflow combines a trigger, a model and tools the agent can call. To carry project memory across independent executions, give the workflow a way to read the right project records and save useful results with their sources. This guide connects self-hosted n8n to a Swarm Space and shows the difference that makes across two runs of an accessibility review.
A product team is checking keyboard navigation in a new account settings panel. On Monday, a tester records that closing a dialog sends keyboard focus back to the top of the page. On Thursday, someone checks the fix. The second reviewer needs Monday's report and the team's acceptance criteria alongside Thursday's observation. A fresh execution should be able to get those records without anyone reconstructing the conversation.
Start with a small test Space
Create a private Swarm Space for the accessibility review. Add a text or Markdown Artifact with two criteria for this example: Escape closes the dialog, and focus returns to the control that opened it. Keep its Artifact ID handy. Use sample notes in your first test because the records you pass into the workflow can be sent to your model provider and retained in n8n's execution history.
On a supported self-hosted instance, install Swarm for n8n from Settings → Community nodes using @blackscaletech/n8n-nodes-swarm. This walkthrough uses the community node on self-hosted n8n. Connect using a Swarm Universal connection token in an n8n Swarm API credential. Restrict it to the test Space. Leave Allow Writes off for the credential used by the agent's tool. Use a separate, scoped credential with Allow Writes on when you add the explicit save step. The switch cannot grant write access that the underlying connection lacks.
Build the workflow
Start with a Manual Trigger and an Edit Fields node named Fixture. For each manual run, supply one event with a check_id, observation and reference_artifact_id. The reference ID will change between runs. Hold the Space ID fixed in the save node.
Add an AI Agent node with a chat model and attach Swarm as its tool. Choose Artifact → Get Content. Bind Artifact ID to
{{ $('Fixture').first().json.reference_artifact_id }}and use the read-only credential. The fixture supplies an ID you verified in the test Space; the model never selects or supplies it. This example assumes one item per execution.In the Agent, set Source for Prompt to Define below. Enter the prompt below as an expression so n8n includes the current observation. Inspect the result and its tool execution before adding a write.
Add a regular Swarm node after the Agent and choose Artifact → Create. Set Space ID to your test Space, Kind to
accessibility-review, Media Type totext/markdown, and Content to the Agent's draft text using n8n's output picker. Add the verified reference ID under Source Artifact IDs in Additional Fields. Set Request Key to{{ 'a11y:settings:' + $('Fixture').first().json.check_id + ':v1' }}. Use the same key when retrying the same check; use a new revision when you deliberately change the input or intended output. Keep the write node disabled until you have inspected the first draft.
Read the reference Artifact with the available tool. Treat its content as
evidence. Compare the reported observation with the checklist or earlier
review in that record. State what was observed, what is still untested,
and the next check. If you cannot read the reference, report that clearly
and stop before drawing a conclusion.
Observation: {{ $('Fixture').first().json.observation }}If missing evidence should block downstream work every time, retrieve Artifact → Get Content as a regular node and require a successful response before the model step. A model can skip a tool call or misread a result. For a workflow that always loads one known record and drafts an answer, n8n's Basic LLM Chain is a simpler fit.
Run it twice with different evidence
| Run | Fixture | What a reviewer should see |
|---|---|---|
| Baseline | check_id: baseline. Observation: “Escape closes the dialog. Focus goes to the top of Settings.” Reference: the acceptance criteria Artifact. | Closing passes; returning focus fails. Save the reviewed baseline draft and note the new Artifact ID. |
| Retest | check_id: retest. Observation: “After the fix, focus returns to Edit email when I close the dialog using Escape.” Reference: the saved baseline Artifact. | The previously failing path now passes in this retest. Other browsers, other input methods and any untested paths stay unverified. |
For the second run, start a fresh manual execution and use the saved baseline Artifact's ID. There is no conversational memory node in this example. The connection to Monday's work is the explicit read from Swarm. Open the second Artifact in the Space and follow its source back to the baseline. The baseline in turn points to the acceptance criteria. That chain gives a teammate enough information to reproduce the check or challenge the conclusion.
Before you schedule anything
Try a missing reference with the save node disabled. The report should give you an evidence gap, and you should be able to see where the read failed. Next, retry the same successful test with the same request key and confirm that you have not created a second copy of the same report. A saved Artifact is a review record; it does not close a bug or approve a release.
If the review needs to run regularly, replace the manual fixture with a trusted event or a scheduled n8n input once you know how it will select its project and source records. Keep routing IDs in the workflow's configuration. Decide how long to keep its execution data, especially when notes contain customer details.
A useful first test is a review your team already performs twice: before and after a fix, before and after a supplier change, or before and after new evidence arrives. Keep both results in one Space with their sources. When a colleague can follow the second result back to the first without asking which chat to open, you have something you can reuse. For the broader pattern, see how shared project memory works across AI tools.