Skip to content
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

Create custom tools #236

Merged
merged 14 commits into from
Feb 14, 2025
Merged

Create custom tools #236

merged 14 commits into from
Feb 14, 2025

Conversation

srilaasya
Copy link
Collaborator

📥 Pull Request

📘 Description
v0: Create custom tools using agentstack create tools <new_tool>

Creates a subfolder new_tool in src/tools with init.py and config.json files
Placeholders assigned to files

🧪 Testing
run agentstack create tools <new_tool> locally and passed existing tests

#229

@bboynton97
Copy link
Contributor

These are a great start! we should split the three features here into three different PRs from three different branches

for custom tools, it would be great if we have it automatically import the tool to all agents in crew.py or graph.py using the methods in frameworks.py and ast_tools.py.

@srilaasya
Copy link
Collaborator Author

check out #230 and #233

working on the automatic import of custom tools by existing agents

@srilaasya
Copy link
Collaborator Author

srilaasya commented Jan 27, 2025

📥 Update:

Now when a new tool is created:

  • It creates the proper directory structure and files:
    - src/tools/<tool_name>/_init_.py
    - src/tools/<tool_name>/config.json

  • It creates a TemplateConfig.Tool instance that matches the format used by existing tools

  • It updates the project's configuration:
    - Adds the tool to the project's tools list
    - Stores the tool configuration in the proper format
    - It updates crew.py to import the new tool using agentstack tools add <tool_name>

Newly created tools will be handled consistently with existing tools and will be properly integrated into the AgentStack framework.

# Conflicts:
#	agentstack/_tools/__init__.py
#	agentstack/cli/__init__.py
#	agentstack/cli/cli.py
#	agentstack/frameworks/__init__.py
#	agentstack/frameworks/crewai.py
@bboynton97 bboynton97 requested a review from tcdent January 31, 2025 04:24
@tcdent
Copy link
Collaborator

tcdent commented Jan 31, 2025

Let's goo! This will help make tool customization easier for everyone.

Can I request that we also get test coverage on these new features in place before we merge?

@srilaasya Happy to help with any part of this.

@bboynton97 bboynton97 merged commit a996ba3 into main Feb 14, 2025
9 checks passed
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 53.40909% with 41 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
agentstack/cli/tools.py 17.85% 23 Missing ⚠️
agentstack/main.py 0.00% 8 Missing ⚠️
agentstack/_tools/__init__.py 79.31% 4 Missing and 2 partials ⚠️
agentstack/cli/init.py 0.00% 3 Missing ⚠️
agentstack/generation/tool_generation.py 94.44% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants