Trello

Create and organize Trello boards, lists, and cards from an agent with TrelloTools.

Create boards, lists, and cards, move cards between lists, and retrieve their details with TrelloTools.

Prerequisites

  1. Get Your API Key

    • Visit the Trello Power-Ups Administration Page https://trello.com/power-ups/admin
    • (Optional) Create a Workspace
    • Create a Power Up (this is required. Its like a "App" connector)
      • If you don't already have a power-ups, create one by clicking the "New" button.
      • If you have an existing Power-Up, select it from the list.
  2. Generate API Key and Secret

    • On the left sidebar, click on the "API Key" option.
    • Generate a new API Key:
      • Click the button to generate your API Key.
      • Copy the generated API Key and Secret. Store as TRELLO_API_KEY and TRELLO_API_SECRET.
  3. Generate a Token

    • On the same page where your API Key is shown, locate the option to manually generate a Token.
    • Authorize your Trello account. Follow the on-screen instructions to authorize the application
    • Copy the generated Token. Store as TRELLO_TOKEN.
from agno.agent import Agent
from agno.tools.trello import TrelloTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------


agent = Agent(
    instructions=[
        "You are a Trello management assistant that helps organize and manage Trello boards, lists, and cards",
        "Help users with tasks like:",
        "- Creating and organizing boards, lists, and cards",
        "- Moving cards between lists",
        "- Retrieving board and list information",
        "- Managing card details and descriptions",
        "Always confirm successful operations and provide relevant board/list/card IDs and URLs",
        "When errors occur, provide clear explanations and suggest solutions",
    ],
    tools=[TrelloTools()],
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response(
        "Create a board called ai-agent and inside it create list called 'todo' and 'doing' and inside each of them create card called 'create agent'",
        stream=True,
    )

The active request creates one board, two lists, and two cards in the authenticated account. The toolkit can create and move cards, but it does not expose due-date or existing-description updates. For a read-only demonstration, use TrelloTools(include_tools=["list_boards", "get_board_lists", "get_cards"]) and ask to list boards.

Run the Example

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate

Install dependencies

uv pip install -U agno openai py-trello

Export your API keys

export OPENAI_API_KEY="your_openai_api_key_here"
export TRELLO_API_KEY="your_trello_api_key"
export TRELLO_API_SECRET="your_trello_api_secret"
export TRELLO_TOKEN="your_trello_token"

Run the example

Save the code above as trello_tools.py, then run:

python trello_tools.py

Full source: cookbook/91_tools/trello_tools.py