Trello

Kern TrelloTools helps to integrate Trello functionalities into your agents, enabling management of boards, lists, and cards.

Prerequisites

The following examples require the trello library and Trello API credentials which can be obtained by following Trello's developer documentation.

1uv pip install -U trello

Set the following environment variables:

1export TRELLO_API_KEY="YOUR_API_KEY"
2export TRELLO_API_SECRET="YOUR_API_SECRET"
3export TRELLO_TOKEN="YOUR_TOKEN"

Example

The following agent will 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.

1from kern.agent import Agent
2from kern.tools.trello import TrelloTools
3
4agent = Agent(
5 instructions=[
6 "You are a Trello management assistant that helps organize and manage Trello boards, lists, and cards",
7 "Help users with tasks like:",
8 "- Creating and organizing boards, lists, and cards",
9 "- Moving cards between lists",
10 "- Retrieving board and list information",
11 "- Managing card details and descriptions",
12 "Always confirm successful operations and provide relevant board/list/card IDs and URLs",
13 "When errors occur, provide clear explanations and suggest solutions",
14 ],
15 tools=[TrelloTools()],
16 )
17
18agent.print_response(
19 "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'",
20 stream=True,
21)

Toolkit Functions

FunctionDescription
create_cardCreates a new card in a specified board and list.
get_board_listsRetrieves all lists on a specified Trello board.
move_cardMoves a card to a different list.
get_cardsRetrieves all cards from a specified list.
create_boardCreates a new Trello board.
create_listCreates a new list on a specified board.
list_boardsLists all Trello boards accessible by the authenticated user.

Toolkit Params

ParameterTypeDefaultDescription
api_keyOptional[str]NoneTrello API key. If not provided, uses TRELLO_API_KEY environment variable.
api_secretOptional[str]NoneTrello API secret. If not provided, uses TRELLO_API_SECRET environment variable.
tokenOptional[str]NoneTrello token. If not provided, uses TRELLO_TOKEN environment variable.

Board Filter Options for list_boards

The list_boards function accepts a board_filter argument with the following options:

  • all (default)
  • open
  • closed
  • organization
  • public
  • starred

You can use include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.

Developer Resources