Skip to main content
Notion is a powerful workspace management tool that allows you to create, organize, and collaborate on your work. Agno provides tools for interacting with Notion databases to help you automate your workflows and streamline your work.

Prerequisites

To use NotionTools, you need to install notion-client:

Step 1: Create a Notion Integration

  1. Go to https://www.notion.so/my-integrations
  2. Click on ”+ New integration”
  3. Fill in the details:
    • Name: Give it a name like “Agno Query Classifier”
    • Associated workspace: Select your workspace
    • Type: Internal integration
  4. Click “Submit”
  5. Copy the “Internal Integration Token” (starts with secret_)
    • ⚠️ Keep this secret! This is your NOTION_API_KEY

Step 2: Create a Notion Database

  1. Open Notion and create a new page
  2. Add a Database (you can use “/database” command)
  3. Set up the database with these properties:
    • Name (Title) - Already exists by default
    • Tag (Select) - Click ”+” to add a new property
      • Property type: Select
      • Property name: Tag
      • Add these options:
        • travel
        • tech
        • general-blogs
        • fashion
        • documents

Step 3: Share Database with Your Integration

  1. Open your database page in Notion
  2. Click the ”…” (three dots) menu in the top right
  3. Scroll down and click “Add connections”
  4. Search for your integration name (e.g., “Agno Query Classifier”)
  5. Click on it to grant access

Step 4: Get Your Database ID

Your database ID is in the URL of your database page:
The database_id is the 32-character string (with hyphens) between the workspace name and the ?v=. Example:
Copy this database ID.

Example

The following example demonstrates how to use NotionTools to create, update and search for Notion pages with specific tags.

Toolkit Functions

These are the functions exposed by NotionTools:

Toolkit Params

These parameters are passed to the NotionTools constructor:

Developer Resources