一键导入
python-agent-creator
This skill helps create Python agents using the openai-agents package, following best practices for agent definition and configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill helps create Python agents using the openai-agents package, following best practices for agent definition and configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
This skill provides guidance for implementing secure authentication using Better Auth for Next.js frontend and JWT verification for FastAPI backend.
This skill helps create React chat widgets using the ChatKit React library, following best practices for floating chat interfaces with thread persistence and proper configuration.
This skill helps create ChatKit server implementations that integrate with databases and openai-agents, following best practices for conversation management and message persistence.
This skill provides functionality to properly expose a ChatKit server via FastAPI routes. It handles the integration between FastAPI request/response cycle and the ChatKit server, with proper request processing and response handling.
This skill helps create ChatKit store implementations with database integration, following best practices and avoiding common errors we've solved in previous implementations.
Comprehensive DAPR (Distributed Application Runtime) skill for building distributed microservices from hello world to professional production systems. Provides guidance on DAPR setup, building blocks (service invocation, state management, pub/sub, actors, secrets), sidecar configuration, component configuration, and Kubernetes integration for scalable distributed applications.
| name | python-agent-creator |
| description | This skill helps create Python agents using the openai-agents package, following best practices for agent definition and configuration. |
This skill helps create Python agents using the openai-agents package, following best practices for agent definition and configuration.
When a user needs to create agents for their Python project, use this skill to generate:
Agent and function_tool from the agents package@function_tool decorator for functions that should be available as toolsfrom agents import Agent, function_tool
@function_tool
def tool_name(param: type) -> type:
"""Clear description of what the tool does.
Args:
param (type): Description of parameter
Returns:
type: Description of return value
"""
# Tool implementation
return result
agent = Agent(
name="Agent Name",
model="model-identifier",
tools=[tool_name],
instructions="System instructions for the agent"
)
from agents import Agent, function_tool
@function_tool
def example_tool(param: int) -> str:
"""Example tool description."""
return f"Processed: {param}"
secondary_agent = Agent(
name="Secondary Agent",
model="model-identifier",
tools=[example_tool],
handoff_description="Description for when to hand off to this agent"
)
primary_agent = Agent(
name="Primary Agent",
model="model-identifier",
tools=[example_tool],
handoffs=[secondary_agent],
instructions="System instructions for the primary agent"
)
from agents import (
Agent,
GuardrailFunctionOutput,
InputGuardrailTripwireTriggered,
OutputGuardrailTripwireTriggered,
RunContextWrapper,
Runner,
TResponseInputItem,
input_guardrail,
output_guardrail
)
from typing import Any
@input_guardrail
async def input_guard(context: RunContextWrapper, agent: Agent, input: str | list[TResponseInputItem]) -> GuardrailFunctionOutput:
# Add your input validation logic here
return GuardrailFunctionOutput(
output_info=input, # Return the input as is or modified
tripwire_triggered=True if "block_this" in str(input) else False # Set to True to block, False to allow
)
@output_guardrail
async def output_guard(context: RunContextWrapper, agent: Agent, output: Any) -> GuardrailFunctionOutput:
# Add your output validation logic here
return GuardrailFunctionOutput(
output_info=output, # Return the output as is or modified
tripwire_triggered=True if "block_this" in str(output) else False # Set to True to block, False to allow
)
agent = Agent(
name="Agent with Guardrails",
model="model-identifier",
tools=[],
input_guardrails=[input_guard],
output_guardrails=[output_guard],
instructions="System instructions for the agent"
)
# Running the agent
try:
result = Runner.run_sync(starting_agent=agent, input="Your input here")
print(f"Agent response: {result}")
except InputGuardrailTripwireTriggered:
print("Input was blocked by guardrails")
except OutputGuardrailTripwireTriggered:
print("Output was blocked by guardrails")