Previously published on Nuclia.com. Nuclia is now Progress Agentic RAG.
With the Nuclia Python SDK, developers can easily integrate AI agents into their workflows, unlocking new possibilities for intelligent automation.
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.
Using the Nuclia RAG-as-a-Service with CrewAI allows you to leverage all the information indexed in your knowledge box within the powerful CrewAI framework to meet your specific needs.
Integrating AI agents into your Python applications is straightforward with the Nuclia platform. Follow these steps to get started:
Begin by installing the required python packages:
pip install crewai nuclia[litellm]
from crewai import Agent
import litellm
from nuclia.lib.nua_chat import NucliaNuaChat
# Replace with your Nuclia Key
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 "/
llm=LLM,
)
The Nuclia 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.
Subscribe to get all the news, info and tutorials you need to build better business apps and sites