Prompt Content
Create a custom tool for your OpenAI agent that can execute Python code in a sandboxed environment and return the results, including standard output and any errors. This tool should also be capable of running a set of predefined unit tests against the generated code. Show how to integrate this tool into your OpenAI Agents SDK agent using the `tool_resources` and `function_calling` features. Provide a Python snippet demonstrating the tool definition and how the agent would invoke it.
Try this prompt
Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.
Related Prompts
Explore similar prompts from our community
Usage Tips
Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)
Customize placeholder values with your specific requirements and context
For best results, provide clear examples and test different variations