Files
copilotkit__copilotkit/sdk-python-langgraph/examples/agent.py
2026-07-22 10:10:53 -07:00

16 lines
512 B
Python

"""Register CopilotKit Intelligence as native LangGraph middleware."""
from langchain.agents import create_agent
from copilotkit_intelligence_langgraph import createSkillRegistryMiddleware
def create_skill_agent(model, copilotkit_client, learning_container_id: str):
"""Create an example native agent with verified Registry skills."""
middleware = createSkillRegistryMiddleware(
copilotkit_client,
learning_container_id,
)
return create_agent(model, middleware=[middleware])