SDKs
Use ActLayer from Python, TypeScript, or plain REST.
SDKs wrap /v1/act with retries, timeouts, structured errors, helper methods, and receipt tracking.
Python
python
pip install actlayer
from actlayer import ActLayer
act = ActLayer(api_key="act_sk_...")
result = act.use(
"web_search",
{"query": "latest AI agent frameworks"},
idempotency_key="run_123_tool_1",
)
print(result["receipt_id"])TypeScript
typescript
npm install @actlayer/sdk
import { ActLayer } from "@actlayer/sdk";
const act = new ActLayer({ apiKey: process.env.ACTLAYER_API_KEY });
const result = await act.use(
"crypto_price",
{ symbol: "BTCUSDT" },
{ idempotencyKey: "run_123_tool_1" }
);
console.log(result.receipt_id);Environment
ACTLAYER_API_KEY
Required for agent actions. Use an agent-scoped key that starts with act_sk_.
ACTLAYER_BASE_URL
Optional override for local or staging environments. Production defaults to https://actlayer.dev.
Idempotency-Key
Pass a stable key for retried tool calls so ActLayer does not double-charge.
