-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent_versions.py
More file actions
35 lines (25 loc) · 885 Bytes
/
agent_versions.py
File metadata and controls
35 lines (25 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
"""
Agent Versions Example
This example demonstrates how to work with agent versions.
"""
import os
from roe import RoeClient
# Configuration - set these environment variables
AGENT_ID = os.getenv("AGENT_ID", "your-agent-uuid-here")
def main():
# Initialize client
client = RoeClient()
# List versions
versions = client.agents.versions.list(AGENT_ID)
print(f"Found {len(versions)} versions:")
for version in versions:
print(f"- {version.version_name} (ID: {version.id})")
# Get current version with input definitions
current = client.agents.versions.retrieve_current(AGENT_ID)
print(f"\nCurrent version: {current.version_name}")
print("Input definitions:")
for input_def in current.input_definitions:
print(f"- {input_def.key}: {input_def.description}")
if __name__ == "__main__":
main()