Pacchetto strike-ai
Installa strike-ai da PyPI, chiama strike-1 e avvia il server MCP.
Il pacchetto Python è strike-ai (si apre in una nuova scheda).
Installazione
bash
pip install strike-aiRichiede Python 3.10 o successivo e dipende solo da httpx.
Decidere
Python
from strike_ai import Client
client = Client() # legge STRIKE_API_KEY e STRIKE_API_URL
result = client.decide(
"Customer reports a duplicate charge on invoice 4411.",
{
"refund": {
"type": "noul",
"instructions": "Should we refund this charge?",
}
},
)
print(result["answers"]["refund"]["noul"])decide restituisce il JSON dell’API come dict. Vedi la Guida rapida.
MCP
La stessa installazione include un server MCP stdio. Espone sei strumenti (strike_decision, strike_classify, strike_score, strike_check, strike_gate, strike_decide), e ognuno chiama POST /v1/systemone.
bash
export STRIKE_API_KEY="your_key_here"
python -m strike_ai.mcpDopo l’installazione, strike-mcp è lo stesso server. Vedi Strumento di decisione MCP.
Configurazione
| Variabile | Predefinito | Letta da |
|---|---|---|
STRIKE_API_KEY | vuota | Client e il server MCP |
STRIKE_API_URL | https://strike-ai.eu | Client e il server MCP |
STRIKE_MODEL | strike-1 | il server MCP |
STRIKE_TRACE | 1 | il server MCP. 0 non scrive la trace |
STRIKE_CAPTURE_CONTENT | 1 | il server MCP. 0 tiene la trace senza il testo della richiesta |
Versione
Python
import strike_ai
print(strike_ai.__version__)