What You’ll Learn
- Defining a
@toolwithcrewai.toolsthat executes Python in a Declaw sandbox - Creating a CrewAI
Agent,Task, andCrew - Demo mode that exercises the sandbox tool directly without needing an OpenAI key
Prerequisites
- Declaw instance running and
DECLAW_API_KEY/DECLAW_DOMAINset OPENAI_API_KEY(optional — the example runs in demo mode without it)
This example is available in Python. TypeScript support coming soon.
Code Walkthrough
1. Define the Declaw sandbox tool
Use thecrewai.tools @tool decorator with a display name as the first argument: