🔥 Nuclia is now Progress Agentic RAG   Learn More

Integrating CrewAI Agents with Nuclia

With Nuclia’s Python SDK, developers can easily integrate AI agents into their workflows, unlocking new possibilities for intelligent automation.

What is CrewAI?

CrewAI is a cutting-edge framework for orchestrating autonomous AI agents. It enables you to create AI teams where each agent has specific roles, tools, and goals, working together to accomplish complex tasks.

Think of it as assembling your dream team — each member (agent) brings unique skills and expertise, collaborating seamlessly to achieve your objectives.

Why Use Nuclia’s Python SDK for AI Agents?

Using Nuclia’s RAG-as-a-Sevice with CrewAI allows you to leverage all the information indexed in your knowledge box within the powerful CrewAI framework to meet your specific needs.

Example usage

Integrating AI agents into your Python applications is straightforward with Nuclia. Follow these steps to get started:

1. Install the SDK and CrewAI

Begin by installing the required python packages:

pip install crewai nuclia[litellm]
2. Create the Agent integrated with Nuclia
from crewai import Agent
import litellm
from nuclia.lib.nua_chat import NucliaNuaChat

# Replace with your Nuclia Key
NUA_KEY = "<your-nua-key>"

# Initialize the Nuclia LLM handler
custom_llm = NucliaNuaChat(
    token=NUA_KEY,
)

# Define the LLM provider and model
PROVIDER = "nuclia"
MODEL = "claude-3"

# Map the custom LLM handler to the provider
litellm.custom_provider_map = [{"provider": PROVIDER, "custom_handler": custom_llm}]

# Define the LLM identifier
LLM = f"{PROVIDER}/{MODEL}"

# Configure and initialize the agent
Agent(
    role="Senior Software Engineer",
    goal="Create software as needed",
    backstory=(
        "You are a Senior Software Engineer at a leading tech think tank."
        "Your expertise in programming in python. and do your best to produce perfect code"
    ),
    # The agent will find the provider we defined in the custom_provider_map, and will pass the model as input
    # the string should follow the format "<provider>/<model>
    llm=LLM,
)


Conclusion

Nuclia’s Python SDK provides a powerful and developer-friendly way to build AI agents that enhance automation and efficiency.

For more details, visit the official Nuclia Python SDK documentation.

Looking to Learn More?

Nuclia is now Progress Agentic RAG—bringing you even more advanced AI-powered retrieval capabilities.

Connect with us to learn how we can make Agentic RAG a reality for your organization.

Related articles