import os
from skylight_sdk import Skylight
with Skylight(
apikey=os.getenv("SKYLIGHT_APIKEY", ""),
) as skylight:
res = skylight.agent.status(agent_id="<id>")
# Handle response
print(res)
{
"agent_id": "agent-123456",
"agent_status": "running",
"created_at": "2023-01-01T12:00:00Z",
"files": [
{
"description": "Downloaded PDF",
"filename": "C:/Users/Dekstop/document.pdf",
"timestamp": "2023-01-01T12:00:00Z"
}
],
"final_summary": "Successfully completed all tasks",
"human_input_request": {
"context": "I found a 2GB file that matches your search criteria",
"question": "Would you like me to download this large file?",
"timestamp": "2023-01-01T12:05:00Z"
},
"is_running": true,
"query": "Find and download information about Windows",
"step_count": 5,
"steps": [
"Step 1: Search for information",
"Step 2: Download file"
],
"total_steps": 5
}
Get the current status of an agent for a specific instance.
Requires API key authentication.
import os
from skylight_sdk import Skylight
with Skylight(
apikey=os.getenv("SKYLIGHT_APIKEY", ""),
) as skylight:
res = skylight.agent.status(agent_id="<id>")
# Handle response
print(res)
{
"agent_id": "agent-123456",
"agent_status": "running",
"created_at": "2023-01-01T12:00:00Z",
"files": [
{
"description": "Downloaded PDF",
"filename": "C:/Users/Dekstop/document.pdf",
"timestamp": "2023-01-01T12:00:00Z"
}
],
"final_summary": "Successfully completed all tasks",
"human_input_request": {
"context": "I found a 2GB file that matches your search criteria",
"question": "Would you like me to download this large file?",
"timestamp": "2023-01-01T12:05:00Z"
},
"is_running": true,
"query": "Find and download information about Windows",
"step_count": 5,
"steps": [
"Step 1: Search for information",
"Step 2: Download file"
],
"total_steps": 5
}
API key authentication
Agent status retrieved
The response is of type object
.