What You’ll Learn
- Building an Agno
Toolkitsubclass that executes Python in a Declaw sandbox - Registering toolkit methods with
self.register() - Creating an Agno
Agentwith the toolkit and an OpenAI model - Demo mode that exercises the sandbox toolkit 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 a DecawTools Toolkit
Subclass Toolkit and register each tool method. The docstring becomes the tool description that the LLM sees: