The OpenAI Agents SDK (formerly Swarm) provides lightweight multi-agent orchestration. Jarvis SDK extends your agents' capabilities with 700+ executable modules — from text processing to API integrations — all accessible as OpenAI function calls.
pip install openai requests
Sign up at jarvissdk.com and create an API key.
Map Jarvis SDK's execute endpoint to an OpenAI function definition.
Route function calls to Jarvis SDK's REST API.
Copy this into your project to get started immediately.
from openai import OpenAI
import requests, json
client = OpenAI()
JARVIS_API_KEY = "jsk_your_api_key_here"
tools = [{
"type": "function",
"function": {
"name": "jarvis_execute",
"description": "Execute a tool from Jarvis SDK's 700+ module marketplace",
"parameters": {
"type": "object",
"properties": {
"module": {"type": "string", "description": "Module name (e.g., text-toolkit, hash-toolkit)"},
"action": {"type": "string", "description": "Action to execute"},
"params": {"type": "object", "description": "Action parameters"},
},
"required": ["module", "action"],
},
},
}]
def call_jarvis(module: str, action: str, params: dict = {}) -> str:
resp = requests.post(
f"https://jarvissdk.com/api/v1/modules/{module}/execute",
headers={"x-api-key": JARVIS_API_KEY, "Content-Type": "application/json"},
json={"action": action, "params": params},
)
return json.dumps(resp.json().get("result", resp.json()))
# Agent loop with Jarvis SDK tools
messages = [{"role": "user", "content": "Hash the text 'hello world' with SHA-256"}]
response = client.chat.completions.create(
model="gpt-4o",
messages=messages,
tools=tools,
)
if response.choices[0].message.tool_calls:
for tc in response.choices[0].message.tool_calls:
args = json.loads(tc.function.arguments)
result = call_jarvis(args["module"], args["action"], args.get("params", {}))
messages.append(response.choices[0].message)
messages.append({"role": "tool", "tool_call_id": tc.id, "content": result})
final = client.chat.completions.create(model="gpt-4o", messages=messages, tools=tools)
print(final.choices[0].message.content)Jarvis SDK tools map perfectly to OpenAI's function calling format — no adapters or wrappers needed.
Works with GPT-4o, GPT-4o-mini, o1, o3 — any model that supports function calling.
All Jarvis SDK responses are JSON — ready for structured output parsing without additional processing.
Works with streaming responses. Process tool calls as they arrive for real-time agent experiences.
Yes. Define Jarvis SDK as a function tool in your Assistant, then handle function_call outputs by routing to jarvissdk.com/api/v1/modules/{name}/execute.
Yes. The Responses API supports function tools with the same schema. The integration is identical.
GPT-4o can call multiple Jarvis SDK tools in parallel. Use the /api/v1/batch endpoint to execute them all in one request for lower latency.
Free tier includes 1,000 executions/month. No credit card required.