system_audit.py
1 """System Audit - Editor Output Example. 2 3 Runs system commands, gathers info, writes a report, and reads it back. 4 """ 5 from praisonaiagents import Agent 6 from praisonaiagents.tools import ( 7 write_file, read_file, execute_command 8 ) 9 10 agent = Agent( 11 instructions="You are a helpful system administration assistant.", 12 output="editor", 13 tools=[write_file, read_file, execute_command], 14 approval=True, 15 ) 16 agent.start( 17 "Investigate my system - get the current date, check disk usage, find out " 18 "what Python version is installed, list running processes sorted by memory, " 19 "then write all findings to /tmp/system_audit.md as a neat report and read " 20 "it back to verify" 21 )