> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-scavio-google-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get basic system information

> Print OS, Python version, and host details as JSON from a system-info skill script.

```python get_system_info.py theme={null}
#!/usr/bin/env python3
"""Get basic system information."""

import json
import platform
import sys
from datetime import datetime

# ---------------------------------------------------------------------------
# Create Example
# ---------------------------------------------------------------------------

try:
    info = {
        "os": platform.system(),
        "os_version": platform.version(),
        "python_version": sys.version,
        "machine": platform.machine(),
        "processor": platform.processor(),
        "current_time": datetime.now().isoformat(),
        "hostname": platform.node(),
    }
except Exception as e:
    info = {"error": str(e)}

print(json.dumps(info, indent=2))

# ---------------------------------------------------------------------------
# Run Example
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    raise SystemExit("This module is intended to be imported.")
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Use the helper">
    The system-info skill executes this helper as a subprocess with no arguments. The pinned script prints JSON before its current main guard exits.
  </Step>
</Steps>

Full source: [cookbook/05\_agent\_os/skills/sample\_skills/system-info/scripts/get\_system\_info.py](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/skills/sample_skills/system-info/scripts/get_system_info.py)
