Back to prompt library
Initialize OpenAI Agents SDK Hardware Router
Linked challenge: OpenAI Agents SDK Hardware Serving Profiler & AWS Neuron Router
Prompt source
implementation12 lines3 sectionsNo variables0 checklist items
from openai_agents import Agent, tool
@tool
def query_cluster_capacity(cluster_type: str) -> dict:
"""Queries active queue depth and throughput metrics for 'AWS_NEURON' or 'NVIDIA_CUDA'."""
# Capacity lookup logic
pass
# Instantiate OpenAI Agents SDK router agent
router_agent = Agent(
name="HardwareRouterAgent",
instructions="You route incoming inference requests to the optimal hardware engine (AWS Neuron vs CUDA) to maximize cost efficiency within SLA limits.",
tools=[query_cluster_capacity]
)