Decision tools overview
The strike_decision tool for LLM agents across OpenAI, Anthropic, Gemini, and MCP.
strike.strike_decision_tool() exposes a single tool name, strike_decision, that delegates choices to strike-1. One object renders provider-specific schemas and executes tool calls.
Create the tool
Python
import strikeflow as strike
tool = strike.strike_decision_tool(min_confidence=0.7)Schema (all providers)
Required JSON fields:
| Field | Type | Notes |
|---|---|---|
question | string | Decision phrased as a question |
kind | choice | score | yes_no | |
options | string[] or null | Required for choice; ordered levels for score; omit for yes_no |
context | string or null | Facts for the decision (conversation can be added via messages= on handle) |
Execution
| Method | Returns |
|---|---|
handle(arguments, messages=..., run_id=..., host=...) | dict (never raises; errors use {"error": "..."}) |
ahandle(...) | async dict |
Provider-specific helpers build the message shape your host expects:
| Provider | Definition | Handler |
|---|---|---|
| OpenAI Chat Completions | .openai(strict=False) | handle_openai_tool_call |
| OpenAI Responses | .openai_responses() | handle_responses_function_call |
| Anthropic Messages | .anthropic() | handle_anthropic_tool_use |
| Gemini | .gemini() | handle_gemini_function_call |
| MCP | .mcp() | used by python -m strikeflow.mcp |
Async twins: ahandle_openai_tool_call, ahandle_responses_function_call, ahandle_anthropic_tool_use, ahandle_gemini_function_call.
Optional framework adapters
These live in extras (not in core imports):
| Framework | Extra | Entry point |
|---|---|---|
| LangChain | langchain | tool.langchain() or integrations.langchain.strike_tool |
| LangGraph | langgraph | strike_decision_node, strike_router |
| CrewAI | crewai | integrations.crewai.strike_crewai_tool() |
| OpenAI Agents SDK | agents | tool.openai_agents() |
Other providers: call tool.handle(...) with the parsed arguments.