Skip to main content

What You’ll Learn

  • Building an Agno Toolkit subclass that executes Python in a Declaw sandbox
  • Registering toolkit methods with self.register()
  • Creating an Agno Agent with 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_DOMAIN set
  • 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:

2. Create an Agno Agent with the toolkit

3. Run the agent

4. Demo mode (no API key needed)

Expected Output

In demo mode: