Skip to main content
We explain how to integrate Ceramic Search with CrewAI by building a two-agent crew: one that researches a topic using Ceramic search and one that writes an article from those results.

Setup

1. Installation

Install CrewAI and the Ceramic Python SDK:

2. API key

Obtain and set your Ceramic API key:

Get API Key

Create a Ceramic account for free to get an API key.
To persist it across sessions, add the line above to your ~/.zshrc, ~/.bashrc, or equivalent. Also set up any additional API keys you need, e.g., OpenAI:

3. Define a custom Ceramic tool

Use the CrewAI @tool decorator to wrap the Ceramic SDK. Initialize the client, run a search, and return formatted results the agent can reason over.

4. Set up agents

Import the relevant CrewAI modules and assign ceramic_tools to the custom search function defined above.
Define two agents — one to research using Ceramic search, another to write an article from those results:

5. Define tasks and create the crew

Assign tasks to each agent and assemble them into a crew:

6. Kick off the crew

Provide a topic as input and run the crew:

7. Output

Ceramic’s search results enrich the agent’s output with relevant, up-to-date sources:

CrewAI docs

View CrewAI documentation

PyPI

View Ceramic Python SDK