cloned_template_id = "your-cloned-template-id"
# Update the template
updates = {
"name": "Enhanced Credit Analysis",
"prompt": """Analyze {{ company_id }} with focus on credit quality.
Include:
1. Business model and competitive position
2. Financial leverage and coverage ratios
3. Liquidity assessment
4. Credit ratings and recent actions
5. Key risks and outlook
6. Investment recommendation
Format the output with clear sections and supporting data.""",
"research_plan": {
"title": "Credit Analysis Steps",
"steps": [
{"description": "Research company background and industry position"},
{"description": "Analyze financial statements for leverage metrics"},
{"description": "Review credit ratings and analyst commentary"},
{"description": "Assess liquidity and refinancing risk"},
{"description": "Synthesize findings into recommendation"}
]
}
}
response = requests.put(
f"https://agents.bigdata.com/v1/workflow/templates/{cloned_template_id}",
headers={
"X-API-KEY": my_api_key,
"Content-Type": "application/json"
},
json=updates
)
updated = response.json()
print(f"Updated template: {updated['name']}")