Uploaded August 2026 | Updated November 2026, 3 days ago
Prompt caching can cut the input cost of long AI agent sessions dramatically—but only when your harness preserves reusable prompt prefixes. This video explains what prompt caching actually stores, why agent costs compound across turns, how provider behavior differs, and the implementation mistakes that invalidate your cache.
---
🔗 *Links*
- Written tutorial: alejandro-ao.com/tutorials/prompt-caching
- Tau coding agent: github.com/huggingface/tau
- Pi coding agent: github.com/badlogic/pi-mono
- Hugging Face Inference Providers: huggingface.co/docs/inference-providers/index
- OpenAI prompt caching: platform.openai.com/docs/guides/prompt-caching
- Anthropic prompt caching: docs.anthropic.com/en/docs/build-with-claude/prompt-caching
- Gemini context caching: https://ai.google.dev/gemini-api/docs/caching
---
👋 *Connect with me*
- My website: alejandro-ao.com
- X (Twitter): https://x.com/_alejandroao
- LinkedIn: linkedin.com/in/alejandro-ao
---
🤓 *Topics Covered*
- How prompt caching works
- AI agent token cost reduction
- Cache-friendly agent harness design
---
⏱️ *Timestamps*
0:00 Why long AI agent sessions get expensive
0:45 What prompt caching actually caches
5:55 Provider pricing and cache discounts
9:19 Prompt caching best practices
15:40 Summary and cache monitoring
Prompt caching can cut the input cost of long AI agent sessions dramatically—but only when your harness preserves reusable prompt prefixes. This video explains what prompt caching actually stores, why agent costs compound across turns, how provider behavior differs, and the implementation mistakes that invalidate your cache.
---
🔗 *Links*
- Written tutorial: alejandro-ao.com/tutorials/prompt-caching
- Tau coding agent: github.com/huggingface/tau
- Pi coding agent: github.com/badlogic/pi-mono
- Hugging Face Inference Providers: huggingface.co/docs/inference-providers/index
- OpenAI prompt caching: platform.openai.com/docs/guides/prompt-caching
- Anthropic prompt caching: docs.anthropic.com/en/docs/build-with-claude/prompt-caching
- Gemini context caching: https://ai.google.dev/gemini-api/docs/caching
---
👋 *Connect with me*
- My website: alejandro-ao.com
- X (Twitter): https://x.com/_alejandroao
- LinkedIn: linkedin.com/in/alejandro-ao
---
🤓 *Topics Covered*
- How prompt caching works
- AI agent token cost reduction
- Cache-friendly agent harness design
---
⏱️ *Timestamps*
0:00 Why long AI agent sessions get expensive
0:45 What prompt caching actually caches
5:55 Provider pricing and cache discounts
9:19 Prompt caching best practices
15:40 Summary and cache monitoring

![Short summary of the paper Role playing in Large Language Model
[Friday evening short video] Where Im summarizing a paper that caught my attention this week: Role play with large language models by Murray Shanahan, Kyle McDonell and Laria Reynolds.
Paper can be found here: https://www.nature.com/articles/s41586-023-06647-8
Not a technical paper! This one is on anthropomorphism and AI – An interesting approach to explaining AI. Its doesnt solve everything but Ill likely experiment with using this approach when talking about AI to new comers to the field of LLM. Short summary of the paper Role playing in Large Language Model](https://i.ytimg.com/vi/TTulJbOMpXY/mqdefault.jpg)








