Quickstart

Follow this guide to get up and running with Graffo in just a few steps.

The simplest way to use Graffo is through our hosted cloud platform at graffo.io.

Graffo provides SDKs for Python and Node.js. Install the package.

pip install graffo-sdk

Now, create and copy your API key from your Graffo dashboard:

  1. Go to app.graffo.io and sign in to your account

  2. Navigate to Agent ContextsOrg API Keys

  3. Click "New Org API Key"

  4. Give your key a descriptive name (e.g., "My Project API Key")

  5. Copy the generated API key - you'll need it for the next step

Initialize the Graffo client with your new API key.

from graffo import GraffoSDK

graffo = GraffoSDK(api_key="YOUR_API_KEY", base_url="https://api.graffo.io")

A collection is a group of different data sources that you can search using a single endpoint.

collection = graffo.collections.create(name="My First Collection")

print(f"Created collection: {collection.readable_id}")

A source connection links a specific app or database to your collection. It handles authentication and automatically syncs data.

source_connection = graffo.source_connections.create(
    name="My Stripe Connection",
    short_name="stripe",
    readable_collection_id=collection.readable_id,
    authentication={
        "credentials": {
            "api_key": "your_stripe_api_key"  # Replace with real API key
        }
    }
)

print(f"Status: {source_connection.status}")

You can now search your collection and get the most relevant results from all connected sources.

results = graffo.collections.search(
    readable_id=collection.readable_id,
    query="Find returned payments from user John Doe?",
)

for result in results.results:
  print(result)

You've now successfully set up Graffo, connected your first data source, and searched your first collection. To continue, you can explore more integrations and dive into the API reference. For support, check out the link below.

Explore our comprehensive API documentation.

View endpoints, examples, and integration guides.

Get help from our team and community.

Share feedback and feature requests.

Last updated