{"id":7306,"library":"inspect-scout","title":"inspect-scout","description":"inspect-scout is a Python library for transcript analysis of AI agents, providing tools to capture and analyze agent interactions. It is currently at version 0.4.25 and sees frequent updates, with the latest release on March 27, 2024.","status":"active","version":"0.4.25","language":"en","source_language":"en","source_url":"https://github.com/mitchg/inspect-scout","tags":["AI","Agent","Observability","Debugging","Logging","Transcript Analysis"],"install":[{"cmd":"pip install inspect-scout","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Provides simplified LLM API calls, routing, and cost management, essential for agent introspection.","package":"litellm","optional":false}],"imports":[{"note":"While `import inspect_scout.inspect` is syntactically valid, the decorator is typically imported directly as `inspect` for cleaner syntax when used as `@inspect`.","wrong":"import inspect_scout.inspect","symbol":"inspect","correct":"from inspect_scout import inspect"},{"symbol":"transcript_session","correct":"from inspect_scout import transcript_session"},{"symbol":"configure","correct":"from inspect_scout import configure"}],"quickstart":{"code":"import inspect_scout\nimport os\nimport tempfile\nimport shutil\n\n# Configure inspect-scout to save transcripts to a temporary directory\ntemp_dir = tempfile.mkdtemp()\ninspect_scout.configure(output_dir=temp_dir, print_transcript_on_exit=False)\nprint(f\"Transcripts will be saved to: {temp_dir}\")\n\n# Define a simple agent function\ndef my_agent_logic(input_text: str):\n    if \"hello\" in input_text.lower():\n        return \"Hello there! How can I help you?\"\n    elif \"tool\" in input_text.lower():\n        return \"Simulating tool use...\"\n    return \"I am a generic agent.\"\n\n# Use the @inspect decorator to capture the agent's transcript\n@inspect_scout.inspect(name=\"MyTestAgent\")\ndef my_inspected_agent(input_text: str):\n    print(f\"Agent received: {input_text}\")\n    response = my_agent_logic(input_text)\n    print(f\"Agent responded: {response}\")\n    return response\n\nif __name__ == \"__main__\":\n    print(\"\\n--- Running inspected agent ---\")\n    result1 = my_inspected_agent(\"Hello agent!\")\n    print(f\"First call result: {result1}\")\n\n    result2 = my_inspected_agent(\"Tell me about tool use.\")\n    print(f\"Second call result: {result2}\")\n\n    print(\"\\n--- Running inspected block ---\")\n    with inspect_scout.transcript_session(name=\"ManualBlockSession\"):\n        print(\"Inside a manually traced block.\")\n        block_result = my_agent_logic(\"What's up?\")\n        print(f\"Block agent result: {block_result}\")\n\n    # Clean up the temporary directory\n    shutil.rmtree(temp_dir)\n    print(f\"\\nCleaned up temporary directory: {temp_dir}\")\n","lang":"python","description":"This quickstart demonstrates how to use `inspect-scout` to automatically capture transcripts of an AI agent's interactions using the `@inspect` decorator. It also shows the `transcript_session` context manager for manual tracing of code blocks and how to configure the output directory."},"warnings":[{"fix":"Migrate from `LogAgent` instances to decorating your agent functions/methods with `@inspect_scout.inspect(name=\"YourAgentName\")`.","message":"The `LogAgent` class, used in versions prior to 0.4.0, has been removed and replaced by the `@inspect_scout.inspect` decorator.","severity":"breaking","affected_versions":"<0.4.0"},{"fix":"Replace `with inspect_scout.start_transcript(...)` with `with inspect_scout.transcript_session(...)`.","message":"The `start_transcript` context manager, used in versions prior to 0.3.0, has been removed and replaced by `inspect_scout.transcript_session`.","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Always call `inspect_scout.configure(output_dir='your/desired/path')` before any agent interactions to ensure transcripts are stored correctly. Defaults may vary or use temporary directories.","message":"Transcripts may not be saved or found in the expected location if `inspect_scout.configure()` is not called early in your application's lifecycle.","severity":"gotcha","affected_versions":"All"},{"fix":"`@inspect_scout.inspect` is a decorator for functions or methods that represent agent actions. `inspect_scout.transcript_session` is a context manager for explicitly tracing arbitrary blocks of code.","message":"Distinguishing between `@inspect_scout.inspect` and `inspect_scout.transcript_session`.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Update your code to use the `@inspect_scout.inspect` decorator for tracing agent functions/methods.","cause":"Attempting to use the `LogAgent` class, which was deprecated and removed in inspect-scout 0.4.0.","error":"AttributeError: module 'inspect_scout' has no attribute 'LogAgent'"},{"fix":"Update your code to use the `inspect_scout.transcript_session` context manager for tracing blocks of code.","cause":"Attempting to use the `start_transcript` context manager, which was deprecated and removed in inspect-scout 0.3.0.","error":"AttributeError: module 'inspect_scout' has no attribute 'start_transcript'"},{"fix":"Add `inspect_scout.configure(output_dir='path/to/your/transcript_folder')` at the beginning of your application to explicitly define where transcripts should be saved.","cause":"The `inspect_scout.configure()` function was not called, or its `output_dir` parameter was not set correctly, leading to default or temporary storage that isn't easily accessible.","error":"Transcripts are not generated or found in the expected location."}]}