Preview: cf-code-example
1. Code Block 14 - Stop Building Agents That Forget. Here's How to Fix It. — language: Python
# memory/skills.py - get_expanded_context()
matched = self.match_skills(query) # keyword match against index
for skill in matched[:3]: # cap at 3
content = self.expand_skill(skill.id) # load full .md file on-demandRaw data
Code Block 14 - Stop Building Agents That Forget. Here's How to Fix It.
{
"metadata": {
"tags": [],
"concepts": []
},
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "0vvalmm98slw"
}
},
"type": "Entry",
"id": "4N6OKqX0V8FjWQ1w2VWhml",
"contentType": {
"sys": {
"type": "Link",
"linkType": "ContentType",
"id": "componentCodeExample"
}
},
"revision": 1,
"createdAt": "2026-07-29T13:08:51.564Z",
"updatedAt": "2026-07-29T13:09:14.716Z",
"publishedAt": "2026-07-29T13:09:14.716Z",
"firstPublishedAt": "2026-07-29T13:09:14.716Z",
"publishedVersion": 3,
"environment": {
"sys": {
"id": "migration-test",
"type": "Link",
"linkType": "Environment"
}
},
"locale": "en-US"
},
"fields": {
"internalName": "Code Block 14 - Stop Building Agents That Forget. Here's How to Fix It.",
"language": "Python",
"code": "# memory/skills.py - get_expanded_context() \nmatched = self.match_skills(query) # keyword match against index \nfor skill in matched[:3]: # cap at 3 \n content = self.expand_skill(skill.id) # load full .md file on-demand"
}
}2. Code Block 13 - Stop Building Agents That Forget. Here's How to Fix It. — language: Python
## incident_triage - Incident Triage & Root Cause Analysis
Summary: Guide SREs through severity classification, diagnostics, and RCA.
Keywords: incident, outage, alert, p1, triage, root cause
## rollback - Deployment Rollback Procedures
Summary: Step-by-step rollback for K8s deployments, Helm releases, feature flags.
Keywords: rollback, deploy, revert, helm, release, canary
Raw data
Code Block 13 - Stop Building Agents That Forget. Here's How to Fix It.
{
"metadata": {
"tags": [],
"concepts": []
},
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "0vvalmm98slw"
}
},
"type": "Entry",
"id": "EEyj7JSyLITIzaa3R2ac8",
"contentType": {
"sys": {
"type": "Link",
"linkType": "ContentType",
"id": "componentCodeExample"
}
},
"revision": 1,
"createdAt": "2026-07-29T13:07:55.861Z",
"updatedAt": "2026-07-29T13:08:27.454Z",
"publishedAt": "2026-07-29T13:08:27.454Z",
"firstPublishedAt": "2026-07-29T13:08:27.454Z",
"publishedVersion": 3,
"environment": {
"sys": {
"id": "migration-test",
"type": "Link",
"linkType": "Environment"
}
},
"locale": "en-US"
},
"fields": {
"internalName": "Code Block 13 - Stop Building Agents That Forget. Here's How to Fix It.",
"language": "Python",
"code": "## incident_triage - Incident Triage & Root Cause Analysis \nSummary: Guide SREs through severity classification, diagnostics, and RCA. \nKeywords: incident, outage, alert, p1, triage, root cause \n \n## rollback - Deployment Rollback Procedures \nSummary: Step-by-step rollback for K8s deployments, Helm releases, feature flags. \nKeywords: rollback, deploy, revert, helm, release, canary \n"
}
}3. Code Block 12 - Stop Building Agents That Forget. Here's How to Fix It. — language: XML
<episodic_memory>
Last session summary: Triaged P1 OOM in payment-service.
Rolled back to v2.3.1. Next step: set up Datadog memory alerts.
</episodic_memory>Raw data
Code Block 12 - Stop Building Agents That Forget. Here's How to Fix It.
{
"metadata": {
"tags": [],
"concepts": []
},
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "0vvalmm98slw"
}
},
"type": "Entry",
"id": "9V7yzaaGedsuw7uEbdMvT",
"contentType": {
"sys": {
"type": "Link",
"linkType": "ContentType",
"id": "componentCodeExample"
}
},
"revision": 1,
"createdAt": "2026-07-29T13:05:23.061Z",
"updatedAt": "2026-07-29T13:06:03.561Z",
"publishedAt": "2026-07-29T13:06:03.561Z",
"firstPublishedAt": "2026-07-29T13:06:03.561Z",
"publishedVersion": 4,
"environment": {
"sys": {
"id": "migration-test",
"type": "Link",
"linkType": "Environment"
}
},
"locale": "en-US"
},
"fields": {
"internalName": "Code Block 12 - Stop Building Agents That Forget. Here's How to Fix It.",
"language": "XML",
"code": "<episodic_memory> \n Last session summary: Triaged P1 OOM in payment-service. \n Rolled back to v2.3.1. Next step: set up Datadog memory alerts. \n</episodic_memory>"
}
}4. Code Block 11 - Stop Building Agents That Forget. Here's How to Fix It. — language: Python
# memory/session_store.py
def get_previous_session_summary(self, user_id, current_session_id):
for s in reversed(self.list_sessions(user_id)):
if s["session_id"] != current_session_id:
prev = self.get_session(user_id, s["session_id"])
if prev and prev.get("summary"):
return prev["summary"]
return None Raw data
Code Block 11 - Stop Building Agents That Forget. Here's How to Fix It.
{
"metadata": {
"tags": [],
"concepts": []
},
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "0vvalmm98slw"
}
},
"type": "Entry",
"id": "TdDE7fo2PQVK3MF6x4Pcm",
"contentType": {
"sys": {
"type": "Link",
"linkType": "ContentType",
"id": "componentCodeExample"
}
},
"revision": 1,
"createdAt": "2026-07-29T13:03:16.022Z",
"updatedAt": "2026-07-29T13:03:47.310Z",
"publishedAt": "2026-07-29T13:03:47.310Z",
"firstPublishedAt": "2026-07-29T13:03:47.310Z",
"publishedVersion": 3,
"environment": {
"sys": {
"id": "migration-test",
"type": "Link",
"linkType": "Environment"
}
},
"locale": "en-US"
},
"fields": {
"internalName": "Code Block 11 - Stop Building Agents That Forget. Here's How to Fix It.",
"language": "Python",
"code": "# memory/session_store.py \ndef get_previous_session_summary(self, user_id, current_session_id): \n for s in reversed(self.list_sessions(user_id)): \n if s[\"session_id\"] != current_session_id: \n prev = self.get_session(user_id, s[\"session_id\"]) \n if prev and prev.get(\"summary\"): \n return prev[\"summary\"] \n return None "
}
}5. Code Block 10 - Stop Building Agents That Forget. Here's How to Fix It. — language: XML
<user_profile>
Name: Rahul
Preferences:
- monitoring: Datadog
- iac: Terraform
Known facts:
- SRE at Acme Corp
- Runs Kubernetes on AWS EKS
</user_profile>Raw data
Code Block 10 - Stop Building Agents That Forget. Here's How to Fix It.
{
"metadata": {
"tags": [],
"concepts": []
},
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "0vvalmm98slw"
}
},
"type": "Entry",
"id": "58stNCfbjLwcVzFY7G94Mh",
"contentType": {
"sys": {
"type": "Link",
"linkType": "ContentType",
"id": "componentCodeExample"
}
},
"revision": 1,
"createdAt": "2026-07-29T13:01:49.921Z",
"updatedAt": "2026-07-29T13:02:18.984Z",
"publishedAt": "2026-07-29T13:02:18.984Z",
"firstPublishedAt": "2026-07-29T13:02:18.984Z",
"publishedVersion": 3,
"environment": {
"sys": {
"id": "migration-test",
"type": "Link",
"linkType": "Environment"
}
},
"locale": "en-US"
},
"fields": {
"internalName": "Code Block 10 - Stop Building Agents That Forget. Here's How to Fix It.",
"language": "XML",
"code": "<user_profile> \n Name: Rahul \n Preferences: \n - monitoring: Datadog \n - iac: Terraform \n Known facts: \n - SRE at Acme Corp \n - Runs Kubernetes on AWS EKS \n</user_profile>"
}
}