Module
The Module is a container that wraps framework-specific agents and registers them with the Runtime.
Overview
What is a Module?
A Module:
- Wraps framework-specific agents
- Creates Agent Kernel Agent instances
- Creates appropriate Runners
- Registers agents with the Runtime
Framework Modules
OpenAIModule
from agentkernel.openai import OpenAIModule
from agents import Agent as OpenAIAgent
agent = OpenAIAgent(name="assistant", instructions="...")
OpenAIModule([agent])
CrewAIModule
from agentkernel.crewai import CrewAIModule
from crewai import Agent as CrewAgent
agent = CrewAgent(role="assistant", goal="...", backstory="...")
CrewAIModule([agent])
LangGraphModule
from agentkernel.langgraph import LangGraphModule
from langgraph.graph import StateGraph
graph = StateGraph(...).compile()
graph.name = "assistant"
LangGraphModule([graph])
ADKModule
from agentkernel.adk import ADKModule
from adk import Agent as ADKAgent
agent = ADKAgent(name="assistant", model="gemini-2.0-flash-exp", ...)
ADKModule([agent])
Module Lifecycle
Creating Modules
Single Agent
from agentkernel.crewai import CrewAIModule
from crewai import Agent
agent = Agent(role="assistant", ...)
CrewAIModule([agent])