Pacote strike-ai
Instalar strike-ai a partir do PyPI, chamar strike-1 e iniciar o servidor MCP.
O pacote Python é strike-ai (abre num novo separador).
Instalação
bash
pip install strike-aiPrecisa de Python 3.10 ou posterior e depende apenas de httpx.
Decidir
Python
from strike_ai import Client
client = Client() # lê 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 devolve o JSON da API como dict. Consulte o Início rápido.
MCP
A mesma instalação inclui um servidor MCP stdio. Expõe seis ferramentas (strike_decision, strike_classify, strike_score, strike_check, strike_gate, strike_decide), e cada uma chama POST /v1/systemone.
bash
export STRIKE_API_KEY="your_key_here"
python -m strike_ai.mcpDepois de instalar, strike-mcp é o mesmo servidor. Consulte Ferramenta de decisão MCP.
Configuração
| Variável | Predefinição | Lida por |
|---|---|---|
STRIKE_API_KEY | vazio | Client e o servidor MCP |
STRIKE_API_URL | https://strike-ai.eu | Client e o servidor MCP |
STRIKE_MODEL | strike-1 | o servidor MCP |
STRIKE_TRACE | 1 | o servidor MCP. 0 não grava trace |
STRIKE_CAPTURE_CONTENT | 1 | o servidor MCP. 0 mantém a trace sem o texto do pedido |
Versão
Python
import strike_ai
print(strike_ai.__version__)