AI curriculum
Course outline for Event-Driven Workflow Design
Build workflows that react to events, including events that start or resume agents. Follow repair requests through triage, investigation, and parts arrival. Separate fixed event routing from agent-selected work. Implement durable messages, state, history, and a bounded agent activation. Test duplicates, stale evidence, restarts, and feedback loops without replaying actions during history rebuild.
Event-Driven Workflow Design Course Objectives
- Distinguish commands, events, queries, subscriptions, and delivery responsibilities.
- Model event-triggered agent activation and resumption through concrete cases.
- Separate fixed routing from agent-selected tools and next steps.
- Implement legal transitions with independent caller/action permission checks.
- Execute a bounded event-triggered agent with case-scoped evidence and tools.
- Persist events and reconstruct current or historical projections without actions.
- Test duplicate, reordered, stale, incompatible, and self-triggering messages.
- Resume waiting work and trace event, activation, tool, and result links.
- Explain when a direct call or ordinary handler is simpler than an agent.
Pre-requisites
- Workflow Foundations for AI Automation or equivalent workflow, stage classification, state, and decision knowledge.
- Basic Python, JSON, files, API use, and simple tests.
- Agentic AI Foundations or equivalent bounded model/tool-loop knowledge helps; a starter bridge is provided.
- No broker administration or specific agent-framework expertise is assumed.
- An authorized model endpoint is required for the event-triggered agent lab.
Before this course
Complete the required courses or bring equivalent experience. Recommended courses add useful depth; they are not enrolment gates.
Required preparation
Recommended preparation
Readiness checks
- Workflow Foundations for AI Automation or equivalent workflow, stage classification, state, and decision knowledge.
- Basic Python, JSON, files, API use, and simple tests.
- Agentic AI Foundations or equivalent bounded model/tool-loop knowledge helps; a starter bridge is provided.
- No broker administration or specific agent-framework expertise is assumed.
- An authorized model endpoint is required for the event-triggered agent lab.
Workflow Foundations for AI Automation or equivalent workflow, stage classification, state, and decision knowledge.
Find your place in the learning mapLab Setup
Delivery requirements: this environment, access, and the exercise materials must be prepared and verified before delivery. This outline does not certify that a lab package is ready.
Stable Python, SQLite, tests, prepared durable message/activation store, bounded agent adapter, authorized model endpoint, read-only tools, and controlled local effect sink. Provide synthetic repair records, references, and failure hooks. Teach the first event/handler before connecting the prepared agent. Preflight model/tool support, budgets, credentials, data handling, transaction boundaries, restart behavior, and independent inspection commands. No Kafka, cloud broker, production account integration, or mandatory second framework is required.
Detailed Course Outline
Module 1: Turn business occurrences into explicit messages (2 hours)
- Message roles: Events, commands, queries, producers, subscribers, and read models.
- Message identity: Message identity, case identity, schema version, and timestamps.
- Legal state transitions: State transitions, invariants, and caller/action permission checks.
- Events and action requests: Event facts versus requests to start work or perform actions.
- Actual publisher and handler: Durable local delivery and an actual Python publisher/handler.
- Repair-request events: Repair-request events as the starting point for reactive cases.
- Guided-time allocation: 0.5 hours for explanation and a worked example, 0.75 hours for guided and independent practice, 0.5 hours for checks and feedback, and 0.25 hours for questions and contingency.
Practical outcome: Publish a real event and run accepted and rejected transitions through the service.
Module 2: Rebuild history without repeating work (2 hours)
- Event sourcing: Event sourcing versus event-driven behavior and ordinary operational logs.
- Append-only projections: Append-only records, per-case sequence, and projection functions.
- Time and schema versions: Effective time, recorded time, historical cutoffs, and schema versions.
- Replay and live activation: Projection replay versus live triggers and agent activation.
- Case/run provenance: Case/run linkage and preserved model inputs, outputs, and versions.
- Transactional outbox: Persistence/publication gaps and a prepared transactional-outbox example.
- Guided-time allocation: 0.5 hours for explanation and a worked example, 0.75 hours for guided and independent practice, 0.5 hours for checks and feedback, and 0.25 hours for questions and contingency.
Practical outcome: Rebuild two historical views without calling the model or changing the controlled effect sink.
Module 3: Let events activate bounded agents (2 hours)
- Repair triage case: Case study: a new repair request triggers a triage agent.
- Investigation case: Case study: inspection evidence triggers a bounded investigation agent.
- Parts-arrival case: Case study: parts arrival resumes a waiting case's next-step work.
- Activation and tool selection: Fixed subscriptions, activation records, case state, and agent-selected tools.
- Context and limits: Case-scoped context, tool allowlists, budgets, and stop conditions.
- Result events and authority: Agent result events, deterministic checks, and separately authorized actions.
- Actual triggered agent: A learner-extended trigger and actual model/tool execution.
- Ordinary-handler alternative: An ordinary-handler alternative when no adaptive work is needed.
- Guided-time allocation: 0.5 hours for explanation and a worked example, 0.75 hours for guided and independent practice, 0.5 hours for checks and feedback, and 0.25 hours for questions and contingency.
Practical outcome: Trigger a real bounded agent run and distinguish its choices from routing, validation, and service effects.
Module 4: React safely when messages repeat or arrive late (2 hours)
- Delivery and activation identity: At-least-once delivery, durable consumer progress, and activation identity.
- Duplicate and distinct events: Duplicate event versus distinct request with similar content.
- Activation states: In-progress, completed, failed, and uncertain agent activations.
- Order and stale inputs: Per-case order, sequence gaps, stale input versions, and late-event policy.
- Bounded redelivery: Bounded redelivery, quarantined records, and repeated inference costs.
- Self-triggering chains: Self-triggering chains, causation links, activation limits, and stop rules.
- Adverse-delivery tests: Actual duplicate/reordering tests and independently checked final state.
- Guided-time allocation: 0.5 hours for explanation and a worked example, 0.75 hours for guided and independent practice, 0.5 hours for checks and feedback, and 0.25 hours for questions and contingency.
Practical outcome: Reject a stale agent result and stop a feedback chain without creating duplicate committed lab effects.
Module 5: Resume work and explain the whole case (2 hours)
- Durable waiting: Durable waiting state and restart before a later business event.
- Activation and continuation: New activation versus continuation of a recorded agent run.
- Causation trace: Correlation, recorded cause, tool-call, and result identifiers.
- Choreography and coordination: Choreography versus an explicit coordinator with visible ownership.
- Reconciliation: Missing notifications, reconciliation, and unresolved historical evidence.
- Synchronous comparison: End-to-end case walkthrough and a simpler synchronous comparison.
- Guided-time allocation: 0.5 hours for explanation and a worked example, 0.75 hours for guided and independent practice, 0.5 hours for checks and feedback, and 0.25 hours for questions and contingency.
Practical outcome: Restart a waiting repair case, process its later event, and reconstruct what actually ran and why.
Practical exercise
- Extend a prepared Python/SQLite repair service with a transition handler, event contract, projector, activation handler, and bounded agent adapter. Use actual local producer/consumer processes and persisted messages. Select one case study for learner implementation; trace the other two through worked starter examples. The prepared harness supplies the model/tool loop so the exercise does not rebuild an agent framework or train a model.
- Publish RepairRequestReceived through the service. Record a stable activation identity linked to event, case, subscription version, and input version. Run a real model/tool loop whose available choices include case lookup and approved reference lookup. Capture actual selected tools and observations, not merely a supplied completion trace. Require a structured proposal or explicit missing- information outcome. Test the final proposal against independent evidence and the current case version. Only the service can commit an allowed state change. Use a local controlled notification sink; no real email, purchase, or customer mutation is permitted. Not every harmless read needs human approval.
- Test duplicate delivery before and after activation completion, incompatible schema, sequence gap, late event, and a case change while the agent runs. Prevent another committed activation for the same trigger identity under the declared transaction policy, and reject a proposal based on stale case inputs. A crash around a model call can still cause repeated inference; do not promise exactly-once model invocation or identical regenerated output. Preserve the accepted output and retry history. A new event ID does not automatically resolve a conflicting request, and semantic duplicate requests need an explicit policy.
- Introduce an agent-result event that accidentally matches its own subscription. Test the corrected event-type filter and a bounded chain limit. Distinguish this causal chain guard from a promise to solve every possible event cycle. Use a learner-designed duplicate or feedback test before showing worked feedback.
- Rebuild current and historical projections while independently checking model call records and sink state: replay must activate neither agents nor effects. Event-driven workflows do not require full event sourcing; explain a current-state plus inbox/outbox alternative. Historical projections need saved facts and outputs, not a fresh model rerun that can change the past.
- Finally persist a waiting-for-part case, stop the service, restart, and publish PartReceived. Check current state before choosing whether to start a fresh activation or continue a saved run. An external event does not magically resume an in-memory model conversation. Record the explicit application mapping to the durable case/run state. Reconstruct the timeline with event, activation, tool, result, and recorded-cause identifiers without inventing unrecorded business cause.
- Learners implement one activation path and its permission/state checks. They run supplied parameterized adverse-message tests and author one new duplicate, stale, or self-triggering case. The outbox, storage, and restart inspection tools are supplied, not separate learner platform builds.
Delivery and timing
- Guided hours include explanations, demonstrations, learner practice, checks, feedback, questions, and contingency as allocated above. Breaks, bulk downloads, and prerequisite account/environment setup are additional. These allocations require a timed pilot before delivery; they are not measured completion times.
What you will produce
Implement an event-triggered agent and verify duplicate handling, replay isolation, waiting, and resumption.
How the work is checked
- Actual publishers and handlers distinguish event facts from requested actions.
- Three case studies identify trigger, work, state, result, and simpler alternatives.
- A learner-extended subscription activates an actual model/tool run.
- Fixed routing and validation remain distinct from agent-selected work.
- Agent proposals cannot bypass current-state and permission checks.
- Duplicate/stale/feedback tests enforce the stated bounded activation policy.
- Historical rebuild calls neither the model nor the effect path.
- Restart preserves waiting state and explicitly maps the later event to work.
- Timeline explanations separate correlation from recorded cause and missing evidence.
- The design explains the costs of agents, asynchronous delivery, and event sourcing.
10 guided hours. One event-triggered agent case is implemented; two further cases are worked walkthroughs. Learners extend supplied durable event, activation, projection, and tool adapters. Replay must not call models or perform live actions. Prepared adverse tests supplement, not replace, actual agent execution. No production broker cluster or arbitrary autonomous action is required.
When another approach is better
- Prefer a synchronous operation when a request has no independent consumers or long-running coordination.
- Avoid event sourcing when historical reconstruction does not justify event-version and projection maintenance.
How we train
Contact us for full course details, including duration, delivery options and lab requirements.
Ask about exercises, instructor feedback and the prior knowledge you need. Tool-specific courses marked provisional may become modules in a broader course.
Discuss your learning goalsRelated Courses
These courses list this course as preparation.