# For hosted versionexport AGENT_DIFF_API_KEY="ad_live_sk_..." # Get from dashboardexport AGENT_DIFF_BASE_URL="https://api.agentdiff.dev"# For local development (no API key needed)export AGENT_DIFF_BASE_URL="http://localhost:8000"
Then both client and executors auto-configure:
Copy
from agent_diff import AgentDiff, PythonExecutorProxy# Both automatically use env varsclient = AgentDiff()executor = PythonExecutorProxy(env.environmentId)
from agent_diff import AgentDiffclient = AgentDiff()# List available templatestemplates = client.list_templates()print(f"Found {len(templates.templates)} templates")# Create a test environmentenv = client.init_env( templateService="slack", templateName="slack_default", impersonateUserId="U01AGENBOT9")print(f"Created environment: {env.environmentId}")# Clean upclient.delete_env(envId=env.environmentId)print("✓ SDK working correctly!")