-
Notifications
You must be signed in to change notification settings - Fork 353
Feature/init crewai langgraph templates #1060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature/init crewai langgraph templates #1060
Conversation
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
d599545 to
35d9a17
Compare
Signed-off-by: Rishabh Choudhary <[email protected]>
peterj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lose a lot of confidence in PRs when I try to build the binary, and the basic build fails. Did you test all commands and made sure it all works as it should?
❯ go build cli/cmd/kagent/main.go
# github.com/kagent-dev/kagent/go/cli/internal/agent/frameworks/common
cli/internal/agent/frameworks/common/base_generator.go:4:2: "io/fs" imported and not used
cli/internal/agent/frameworks/common/base_generator.go:50:2: declared and not used: tmpl
cli/internal/agent/frameworks/common/base_generator.go:50:15: undefined: template
cli/internal/agent/frameworks/common/base_generator.go:56:14: undefined: fmt
cli/internal/agent/frameworks/common/base_generator.go:58:1: missing return
|
@peterj |
…ings Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
07bf827 to
fcce92e
Compare
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
go/cli/internal/agent/frameworks/langgraph/python/templates/pyproject.toml.tmpl
Outdated
Show resolved
Hide resolved
peterj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another thing I noticed -- there's missing docker compose files in the template folder which means kagent run won't work.
go/cli/internal/agent/frameworks/crewai/python/templates/Dockerfile.tmpl
Outdated
Show resolved
Hide resolved
Signed-off-by: rishabh998186 <[email protected]>
|
I Created |
Signed-off-by: Rishabh Choudhary <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
b6918d6 to
a4c5ad1
Compare
Signed-off-by: rishabh998186 <[email protected]>
ef08c4b to
be81c1c
Compare
|
@peterj, when you get a chance, could you review my PR and let me know if there are any changes needed |
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
|
hey @peterj |
|
The crewai template doesn't work as we haven't published the package yet; but for the langgraph we have a package and the run doesn't work: |
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
3b77561 to
7c2f58f
Compare
kagent-core's OpenTelemetry instrumentation requires: - anthropic (for anthropic instrumentation) - openai (for openai instrumentation) - google-genai (for google generativeai instrumentation) All three must be declared as dependencies to prevent ModuleNotFoundError. Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: Rishabh Choudhary <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
…hub.com/rishabh998186/kagent into feature/init-crewai-langgraph-templates
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
Signed-off-by: rishabh998186 <[email protected]>
|
@peterj I fixed the ModuleNotFoundError issue; please review the new changes. The fix modulenotfounderror commit updates the Python agent Dockerfiles to use the uv base image and install the required framework packages from PyPI, and also aligns the generated project/module names and entry points so imports resolve correctly. |
Hey! This PR adds support for CrewAI and LangGraph frameworks to the kagent init command. Now developers can choose which framework they want to use when creating new agent projects, instead of being locked into just ADK.
I've added two new framework options that work alongside the existing ADK support. Users can now run:
Each framework gets its own complete project setup with all the necessary files - Python code, Dockerfiles, configs, and a helpful README with usage examples. The templates are framework-specific, so CrewAI projects get crew.py files and LangGraph projects get graph.py files.
I also simplified the CLI while I was at it. Instead of requiring three arguments, it now just needs the agent name plus optional flags. The --framework flag defaults to "adk" so existing workflows won't break.
The implementation uses a registry pattern under the hood, which should make it easier to add more frameworks down the line if needed.
Closes #1049