diff --git a/course/labs/L1-first-agent/test.txt b/course/labs/L1-first-agent/test.txt index 2b653c1..ed5f1d5 100644 --- a/course/labs/L1-first-agent/test.txt +++ b/course/labs/L1-first-agent/test.txt @@ -1,5 +1,17 @@ -This is a test file for Lab 1.7: Your First Agent. -It contains sample data for the agent to read and summarize. -Line 1: Hello world -Line 2: The quick brown fox jumps over the lazy dog -Line 3: 42 is the answer to everything +This is a sample log file from a production agent system running on 2026-05-15. +It contains session traces, tool calls, and timing data. + +Session ID: sess_abc123 +Date: 2026-05-15T14:30:00Z +Model: claude-sonnet-4-20260501 + +[14:30:01] AGENT INITIALIZED — Task: "Analyze the latest deployment log" +[14:30:02] TOOL CALL: read_file(path="logs/deploy-2026-05-15.log") +[14:30:03] TOOL RESULT: 847 bytes read +[14:30:04] TOOL CALL: grep_search(pattern="ERROR|FAIL|CRITICAL") +[14:30:05] TOOL RESULT: 3 matches found +[14:30:06] TOOL CALL: read_file(path="logs/deploy-2026-05-15.log:42:50") +[14:30:07] TOOL RESULT: 9 lines read +[14:30:08] ANALYSIS: Found 2 warnings, 1 critical error +[14:30:09] FINAL ANSWER: Deployment has a database connection issue +[14:30:10] SESSION END — Total time: 9.2s, Total cost: $0.042 diff --git a/course/labs/L2-multi-tool/test.txt b/course/labs/L2-multi-tool/test.txt new file mode 100644 index 0000000..3e45336 --- /dev/null +++ b/course/labs/L2-multi-tool/test.txt @@ -0,0 +1,26 @@ +{ + "app_name": "AgentMonitor", + "version": "2.4.1", + "environment": "production", + "features": { + "dashboard": true, + "alerts": true, + "scheduling": false, + "multi_tenant": true + }, + "database": { + "host": "db-primary-01.example.com", + "port": 5432, + "pool_size": 20, + "timeout_ms": 5000 + }, + "api_keys": [ + { "service": "openai", "key": "sk-...prod...", "quota": 1000000 }, + { "service": "anthropic", "key": "sk-ant-...prod...", "quota": 500000 } + ], + "logging": { + "level": "INFO", + "format": "json", + "sink": "cloudwatch" + } +} diff --git a/course/labs/_shared/__pycache__/mock_llm.cpython-313.pyc b/course/labs/_shared/__pycache__/mock_llm.cpython-313.pyc index ee24d24..5b763f4 100644 Binary files a/course/labs/_shared/__pycache__/mock_llm.cpython-313.pyc and b/course/labs/_shared/__pycache__/mock_llm.cpython-313.pyc differ diff --git a/course/labs/_shared/mock_llm.py b/course/labs/_shared/mock_llm.py index 2f3c3ff..95504dd 100644 --- a/course/labs/_shared/mock_llm.py +++ b/course/labs/_shared/mock_llm.py @@ -133,9 +133,17 @@ def _generate_text_response(prompt: str) -> str: prompt_lower = prompt.lower() - # File content responses + # Agent session log responses + if "session" in prompt_lower and ("agent" in prompt_lower or "tool call" in prompt_lower): + return "I've analyzed the session log. Here's what I found:\n\n- The agent completed 3 tool calls successfully\n- 1 critical error was detected (database connection timeout)\n- 2 warnings (deprecated API usage)\n- Total session cost: $0.042\n- Recommendation: Check the database connection pool settings" + + # File content responses - extract what the file is about if "contents of" in prompt_lower: - return "Based on the file contents, I can see the document contains sample data. The key information includes test records and example data points. What specific aspect would you like me to analyze?" + if "error" in prompt_lower or "FAIL" in prompt_lower: + return "I've analyzed the file. It contains session trace data from a production agent deployment. There are signs of a database connection issue that needs investigation." + if "deploy" in prompt_lower or "log" in prompt_lower: + return "I've reviewed the deployment log. The system ran 3 tool calls successfully with one critical error. The root cause appears to be a database timeout." + return "Based on the file contents, I can see it contains sample data with records and configuration details. The key patterns I identified are structured around standard formats." # Search result responses if "search" in prompt_lower and ("result" in prompt_lower or "found" in prompt_lower): diff --git a/site/.vitepress/dist/404.html b/site/.vitepress/dist/404.html index f908830..5efc293 100644 --- a/site/.vitepress/dist/404.html +++ b/site/.vitepress/dist/404.html @@ -6,12 +6,12 @@