|
| 1 | +# 🧠 PyEpicOdyssey: Python Internals & Agentic AI – Advanced Insights |
| 2 | + |
| 3 | +> Dive deep into Python’s internals, advanced mechanics, and the nuts & bolts of modern agent frameworks. |
| 4 | +
|
| 5 | +--- |
| 6 | + |
| 7 | +## 🚀 What This Repo Is |
| 8 | + |
| 9 | +Go beyond surface — see exactly how things tick, break, and can be re-engineered. |
| 10 | +If you want to truly understand Python (and the new OpenAI Agents SDK), you’re in the right place. |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## 🧩 What You’ll Find Inside |
| 15 | + |
| 16 | +### 🏛️ **Python Deep Dives** |
| 17 | +- **CPython Internals:** Bytecode, VM, memory management, reference counting, garbage collection. |
| 18 | +- **Data Model Magic:** Dunder methods, MRO, metaclasses, descriptors, and why they matter. |
| 19 | +- **Async, Threads & GIL:** Threading, multiprocessing, asyncio, and what’s really possible in Python concurrency. |
| 20 | +- **Iterators & Generators:** How `for` works, lazy evaluation, `yield` mechanics. |
| 21 | +- **Memory & Performance:** Using `__slots__`, memory optimizations, profiling, and weird edge cases. |
| 22 | + |
| 23 | +### 🤖 **Agentic AI & OpenAI Agents SDK** |
| 24 | +- **Agent Loop Internals:** |
| 25 | + Step-by-step breakdowns of what happens in an agent run ([See: OpAgentLoop.md](docs/OpAgentsOlympus/OpAgentLoop.md)) |
| 26 | +- **Hooks & Execution Order:** |
| 27 | + Understand how AgentHooks and RunHooks interact, with MCQs and real trace outputs ([See: OpAgentsComplexMCQ.md](docs/OpAgentsOlympus/OpAgentsComplexMCQ.md)) |
| 28 | +- **Tool Call Logic & Inefficiencies:** |
| 29 | + Discover silent SDK inefficiencies: parallel tool calls, wasted resources, and how to optimize ([See: OpAgentsEfficiencyBug.md](docs/OpAgentsOlympus/OpAgentsEfficiencyBug.md)) |
| 30 | +- **Input Filtering & Handoffs:** |
| 31 | + The real precedence of input filters during agent handoffs ([See: OpAgentsFilteringPrecedence.md](docs/OpAgentsOlympus/OpAgentsFilteringPrecedence.md)) |
| 32 | +- **Local LLM Streaming:** |
| 33 | + How to hook up and stream from a local Jan LLM with the OpenAI-compatible API ([See: OpAgentsLocalLLMStreamed.py](docs/OpAgentsOlympus/OpAgentsLocalLLMStreamed.py)) |
| 34 | +- **Sync vs Async Agent Runs:** |
| 35 | + What blocks, what doesn’t, and how to work around limitations ([See: OpAgentsDiff_run_sync_and_run.py](docs/OpAgentsOlympus/OpAgentsDiff_run_sync_and_run.py)) |
| 36 | +- **Tool Use Behaviors & Custom Logic:** |
| 37 | + How custom tool use behaviors work and when your decision function is called ([See: OpAgentsOrderOfTools&CustomToolUseBehavior.md](docs/OpAgentsOlympus/OpAgentsOrderOfTools%26CustomToolUseBehavior.md)) |
| 38 | +- There is a lot more you can dig & explore... |
| 39 | + |
| 40 | +### 🧪 **Live Code Experiments** |
| 41 | +- Not just theory. |
| 42 | +- MCQs and “weird cases” to challenge your intuition and solidify real-world understanding. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## 🎯 Who This Repo Is For |
| 47 | + |
| 48 | +- You know Python Bro very well — and want to understand what really happens under the hood. |
| 49 | +- You’re digging the OpenAI Agents SDK or building agentic workflows. |
| 50 | +- You love going deep and want clear explanations, real code, and edge cases that make you say “wait, what?” |
| 51 | +- You want to master advanced stuffs. |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## 🚀 **Ready to dig deep?** |
| 56 | + |
| 57 | +1. Dive into [Python Internals](docs/PyDeepOlympus/PythonRunningCode.md) to understand the language better |
| 58 | +2. Start with the [OpenAI Agents SDK Guide](docs/OpAgentsOlympus/OpenAI_Agents_SDK_Guide.md) for a comprehensive overview |
| 59 | +3. Check out the [Practice Examples](docs/OpAgentsOlympus/practice/) for hands-on learning |
| 60 | +4. Explore [Advance Concepts](docs/OpAgentsOlympus/) to be confident when building |
| 61 | +5. Gaze at [OpenAI Agents SDK Advance MindMap](docs/OpAgentsOlympus/openai_agent_sdk_mindmap) to get quick clear concepts |
| 62 | +6. Attempt [Complex Quizzes](docs/OpAgentsOlympus/openai_agent_sdk_mindmap.md) to challenge yourself at the deepest levels |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## 🌐 **Online Docs** |
| 67 | + |
| 68 | +> Need a fast, interactive reference? |
| 69 | +> Explore the online docs: [PyEpicOdyssey](https://danielhashmi.github.io/PyEpicOdyssey/) |
| 70 | +
|
| 71 | +--- |
| 72 | + |
| 73 | +## 👨💻 About Me |
| 74 | + |
| 75 | +I’m **Daniel Hashmi** a Learner! |
| 76 | + |
| 77 | +- I love creative ideas, theories & going deep. |
| 78 | +- Building stuff for devs who want to truly understand. |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +## 🤝 Contributions |
| 83 | + |
| 84 | +- Found a Mistake? |
| 85 | +- Want to add a weird Python or agent SDK edge case? |
| 86 | +- Want to add your own experiment or breakdown? |
| 87 | +- PRs are welcome! |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## ⭐ Support & Share |
| 92 | + |
| 93 | +If these resources help you: |
| 94 | +- Give it a ⭐. |
| 95 | +- Share it with other advanced Python or Agentic AI learners. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +Keep digging and diving, keep learning! 🚀 |
0 commit comments