AI curriculum

Course outline for Context Engineering and Context Graphs

Give an agent the evidence it needs for the current task without sending every available record. Model knowledge, activities, decisions, users, and workflow state. Distinguish short-term and long-term memory from episodic, semantic, and procedural information. Implement memory lifecycle, source, time, access, and size rules. Test what a new agent session can recover from the resulting package and what it must leave unresolved.

Context Engineering and Context Graphs Course Objectives

  • Separate stable knowledge, activity history, dependencies, and task context.
  • Distinguish memory scope from episodic, semantic, and procedural information.
  • Implement persistence, retrieval, correction, expiry, and deletion with independent tests.
  • Model provenance, user relevance, temporal meaning, and workflow stage.
  • Implement context selection under access, freshness, relevance, and size rules.
  • Preserve conflicting evidence and distinct historical decision snapshots.
  • Construct a source-linked package with explicit missing-information status.
  • Test actual fresh-session reconstruction against independent expected facts.
  • Compare a minimal handoff with graph-based selection and explain the trade-off.

Pre-requisites

  • Agentic AI Foundations or equivalent actual agent input, tool, and output experience.
  • Knowledge-model and graph concepts equivalent to Knowledge Engineering Foundations for AI Systems.
  • Basic Python, JSON, files, tests, and an authorized model/agent endpoint.
  • No graph database or specific agent framework is assumed.

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

  • Agentic AI Foundations or equivalent actual agent input, tool, and output experience.
  • Knowledge-model and graph concepts equivalent to Knowledge Engineering Foundations for AI Systems.
  • Basic Python, JSON, files, tests, and an authorized model/agent endpoint.
  • No graph database or specific agent framework is assumed.

Agentic AI Foundations or equivalent actual agent input, tool, and output experience.

Find your place in the learning map

Lab Setup

Delivery requirements: the environment, access, and exercise materials must be prepared and verified before delivery. This outline does not certify that a lab package is ready.

Python, tests, synthetic records, a durable memory-store adapter, graph/record-store adapter, and an authorized model/agent endpoint. Delivery requires isolated fresh invocations, disabled automatic task-memory tools, compatible stable clients, verified quotas/cost/data handling, explicit context-size measurement, and cleanup. Authorized persisted retrieval passes through the learner selector before package serialization; the model receives only that package and the task instruction. No personal messages, live calendar access, or production action credentials are used.

Detailed Course Outline

Module 1: Decide what the assistant must remember (2 hours)

  • Returning to unfinished work: A returning assistant: current work, past decisions, and missing evidence.
  • Context and knowledge: Task-specific context versus stable knowledge and accumulated memory.
  • Short-term memory: Short-term memory: conversation history and working task state.
  • Long-term memory: Long-term memory: retained information shared across authorized sessions.
  • Episodic semantic and procedural memory: Episodic experiences, semantic facts, and procedural instructions with concrete examples.
  • Memory classification dimensions: Recall scope versus information type as two separate dimensions.
  • Context windows retrieval and training: Memory versus context windows, retrieval-augmented generation, and model training.
  • Guided-time allocation: 0.75 hours for explanation and a worked example, 0.75 hours for learner practice, 0.25 hours for feedback, and 0.25 hours for questions and contingency.

Practical outcome: Classify project-review records by scope and information type, then explain what a fresh session can access.

Module 2: Turn experience into controlled, reusable memory (2 hours)

  • Memory lifecycle: Capture, select, store, retrieve, update, and forget.
  • Durable state and checkpoints: Durable records, session state, checkpoints, and restart behavior.
  • Controlled memory writes: Candidate memories versus authorized writes and reviewed procedural changes.
  • Sourced memory records: Source-linked facts, dated episodes, and versioned reusable procedures.
  • Correction expiry and deletion: Corrections, expiry, deletion, and derived-copy invalidation.
  • Memory poisoning and privacy: Stale memories, private information, and poisoned instruction-like content.
  • Guided-time allocation: 0.75 hours for explanation and a worked example, 0.75 hours for learner practice, 0.25 hours for feedback, and 0.25 hours for questions and contingency.

Practical outcome: Persist and retrieve memory across a process restart, then test correction, deletion, and denied writes.

Module 3: Select evidence with explicit boundaries (2 hours)

  • Graph relationship meanings: Context, knowledge, activity, and dependency graphs with distinct relationships.
  • Source authority and versions: Source identifiers, versions, authority, and supporting passages.
  • Time and freshness: Event time, recorded time, validity, and freshness rules.
  • User scope and permissions: User role, preferences, access checks, and prohibited fields.
  • Conflicting evidence: Conflict handling without silently discarding inconvenient evidence.
  • Python context selection: Python graph traversal and filtering over a prepared local record store.
  • Pre-exposure authorization: Authorization before serialization and before model/tool exposure.
  • Guided-time allocation: 0.75 hours for explanation and a worked example, 0.75 hours for learner practice, 0.25 hours for feedback, and 0.25 hours for questions and contingency.

Practical outcome: Execute selection that excludes a prohibited record and exposes stale or conflicting required evidence.

Module 4: Build a bounded agent context package (2 hours)

  • Evidence relevance: Required evidence, optional relevance, and ranking without permission bypass.
  • Context size budgets: Size budgets, deterministic truncation, and mandatory-evidence failure.
  • Source-linked summaries: Source-linked summaries and loss of meaning during compression.
  • Workflow state: Current workflow state, next actions, and unresolved-information markers.
  • Historical manifests: Immutable manifests and separate historical versus current views.
  • Independent selection tests: Independent selection tests, including a new learner-designed adversarial case.
  • Guided-time allocation: 0.75 hours for explanation and a worked example, 0.75 hours for learner practice, 0.25 hours for feedback, and 0.25 hours for questions and contingency.

Practical outcome: Build a package within budget or return an explicit incomplete-context result.

Module 5: Test recovery in a genuinely fresh session (2 hours)

  • Fresh-session isolation: Fresh model/agent invocation without prior conversation or hidden task memory.
  • Package-only reconstruction: Actual package-only reconstruction and constrained next-step proposals.
  • Independent recovery scoring: Required-fact recall, citations, unsupported claims, and unresolved conflicts.
  • Historical and corrected information: Historical snapshots versus later corrected information.
  • Handoff comparison and effort: Minimal-handoff comparison, repeated trials, and context-construction cost.
  • Persistence and authority limits: Limits of memory persistence, model variation, and inferred authorization.
  • Guided-time allocation: 0.75 hours for explanation and a worked example, 0.75 hours for learner practice, 0.25 hours for feedback, and 0.25 hours for questions and contingency.

Practical outcome: Observe a new agent session reconstructing the task and independently score what it recovered or invented.

Practical exercise

  • Implement selection for a synthetic project review using logs, calendar records, messages, and user roles. A prepared JSON or SQLite record store supplies nodes and typed relationships. Write traversal, authorization, freshness, source precedence, and package construction functions. No full graph server is required. Include fresh required evidence, stale evidence, a source conflict, irrelevant activity, and a prohibited field. Test the serialized package before model access.
  • Create a current package and an immutable historical decision snapshot. Enforce the stated size unit and budget; do not silently cut a mandatory fact. If required authorized evidence cannot fit or is unavailable, report incompleteness rather than treating omission as permission to guess. Keep untrusted source text separate from system instructions. Access labels and namespaces do not enforce themselves.
  • Start an actual new agent/model session with no previous task messages or shared task-memory tools. Supply only the selected package and task instruction. Capture its reconstructed state, cited evidence, uncertainty, and next-step proposal. Score against an independent fact/action checklist. Repeat with a changed task and compare with a minimal handoff baseline. A worksheet or supplied response cannot replace this execution. Vary one context choice and inspect its effect. Keep all tools read-only or harmless; proposed permission is not actual authority.
  • Use the same synthetic project review to implement a small persistent memory store through a prepared SQLite or file adapter. Learners implement memory selection, write policy, retrieval, correction, expiry, and deletion behavior. Keep session working state separate from cross-session records. Store one dated episode, one sourced fact, and one reviewed reusable procedure. Memory types are design categories, not claims that the software reproduces human memory.
  • Close the process and start a genuinely new session. Do not copy the old chat. Retrieve only authorized, relevant memories into the context package. Compare a no-memory baseline, a minimal handoff, and selective persisted-memory retrieval on matched tasks. Confirm stored records independently before judging model use. Measure required-fact recovery, unsupported claims, package size, and total effort. One trial does not establish a reliable improvement.
  • Correct an outdated fact without rewriting a historical episode. Expire another record and delete a user-scoped memory. Verify exclusion from active retrieval, cached summaries, and newly constructed packages. Retention rules must also cover historical snapshots, logs, and backups; identify any retained copies explicitly. Deletion from one store is not proof of erasure from a provider or model weights. Use synthetic records only. Test a disallowed cross-user read and write, plus an untrusted note that tries to poison memory by installing a new procedure. Stored text cannot grant authority or silently replace trusted instructions.
  • Implement and run the lifecycle tests. Complete the final changed-task case before opening the separate expected-fact feedback. A supplied memory transcript cannot replace actual persistence tests.

Delivery and timing

  • Guided hours include teaching, demonstrations, learner practice, feedback, questions, and contingency as allocated above. Breaks, bulk downloads, and prerequisite setup are additional. Allocations need a timed learner pilot before delivery; they are not measured completion times.

What you will produce

Implement controlled memory and construct bounded context that supports independently checked fresh-session recovery.

How the work is checked

  • Memory scope and information type receive distinct, example-based explanations.
  • Actual restart tests show persisted records, not hidden conversation carryover.
  • Correction, expiry, deletion, denied access, and poisoned writes receive independent tests.
  • Graph relationships distinguish knowledge, activity, workflow, and dependency.
  • Actual selection enforces access before serialization and model exposure.
  • Required evidence is sourced, current or explicitly stale, and within budget.
  • Conflicts and incomplete context remain visible rather than guessed away.
  • Historical snapshots remain unchanged when current evidence is corrected.
  • Fresh-session outputs receive independent factual and action checks.
  • The comparison states variation, cost, and when a handoff document is enough.

10 guided hours. Short-term versus long-term recall scope is separate from episodic, semantic, and procedural information type. Learners implement memory lifecycle logic using a prepared durable adapter, context selection, and actual fresh-session use. LangGraph is comparison-only; no second framework build is required. Deleting one store record does not prove provider or model-weight erasure. No perfect recall, automatic privacy certification, or universal context-graph architecture is claimed. A versioned handoff can be the simpler sufficient design.

When another approach is better

  • A versioned handoff document may suffice when there are few sources and no relationship queries.
  • Do not treat a smaller prompt as sufficient privacy protection or overwrite incident-time context with current facts.

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 goals