- 
                Notifications
    
You must be signed in to change notification settings  - Fork 308
 
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]>
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
        
      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]>
Signed-off-by: rishabh998186 <[email protected]>
| 
           hey @peterj  | 
    
| key := fmt.Sprintf("%s:%s", userID, threadID) | ||
| state := c.crewaiFlowStates[key] | ||
| 
               | 
          
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.
These changes are from running go fmt to ensure the code follows Go's standard formatting conventions (indentation, spacing, code consistency). These changes are purely cosmetic and don't affect the framework implementation at all.
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