{"correlation_id":"fa017bb5-b604-4d62-b3bc-fdb7e961108e","version":"1.0","policy":{"name":"CodeRifts Default Agent Policy","description":"Recommended policy for agent frameworks to enforce API safety","rules":[{"trigger":"before_tool_call","condition":"any_api_call","action":"preflight_check","on_block":"abort_execution","on_warn":"proceed_with_caution","on_allow":"proceed","on_pending":"retry_after_5s","on_unknown":"proceed_with_warning"},{"trigger":"safe_for_agent_false","condition":"always","action":"abort_or_fallback"}]},"implementations":{"langgraph":{"description":"Add as a guard node before any API-calling node","install":"pip install coderifts-sdk","code":"from coderifts import guard\n\n# Add to your StateGraph\nbuilder.add_node('coderifts_guard', guard.langgraph_node)\nbuilder.add_edge('coderifts_guard', 'your_api_node')\n\n# If BLOCK → returns END automatically"},"autogen":{"description":"Add as a pre-execution hook to your AssistantAgent","install":"pip install coderifts-sdk","code":"from coderifts import guard\n\n# Wrap your agent\nagent = guard.autogen_wrap(agent, spec_url='https://your-api.com/openapi.json')\n# Automatically blocks unsafe tool calls"},"openai_functions":{"description":"Add coderifts_preflight as first tool in your tools list","code":"tools = [guard.openai_preflight_tool()] + your_existing_tools\n# Agent will automatically check safety before calling other tools"},"anthropic":{"description":"Add CodeRifts as first tool in your tools list","code":"tools = [guard.anthropic_preflight_tool()] + your_existing_tools"}},"preflight_url":"https://app.coderifts.com/api/v1/public/preflight","docs_url":"https://coderifts.com/decision-spec/how-agents-use-this/"}