Agentic Tools
Understand how tools extend Kubiya agent capabilities to interact with external systems
Agentic Tools
Tools are the building blocks that empower Kubiya agents to interact with your systems and perform specific actions. By connecting agents to tools, you extend their capabilities beyond conversation to enable real operational tasks.
What Are Agentic Tools?
Agentic tools are containerized functions that agents can invoke to:
- Access external systems (cloud platforms, databases, ticketing systems)
- Execute scripts and commands
- Process data or perform calculations
- Implement business logic
- Interact with APIs
Think of tools as the "hands" of your agents—they allow agents to reach into your systems and make changes based on user requests.
How Tools Work
When an agent determines that a tool is needed to fulfill a request:
- The agent identifies which tool(s) to use
- It prepares the necessary parameters based on the conversation context
- The tool is executed in a controlled environment
- Results are returned to the agent
- The agent processes the results and continues the conversation
Tool Architecture
Tools in Kubiya are:
- Self-contained: Each tool runs in its own Docker container
- Stateless: Tools focus on specific operations without maintaining state
- Composable: Multiple tools can be combined for complex workflows
- Secure: Execution happens with defined permissions and boundaries
- Versioned: Tools are tracked and can be updated independently
Tool Anatomy
A typical tool definition includes:
Types of Tools
Kubiya supports various types of tools:
System Tools
- Execute shell commands
- Run scripts in various languages
- Access file systems
Integration Tools
- Connect to cloud providers (AWS, GCP, Azure)
- Interact with Kubernetes clusters
- Manage infrastructure
Application Tools
- Ticketing systems (Jira, ServiceNow)
- Version control (GitHub, GitLab)
- Monitoring systems (Datadog, Prometheus)
Custom Tools
- Organization-specific workflows
- Internal application APIs
- Business process automation
Building Custom Tools
You can extend Kubiya with your own custom tools:
- Define the tool interface: Specify parameters, environment variables, and return values
- Implement the logic: Create the code that will execute when the tool is invoked
- Package in a container: Build a Docker image with your tool implementation
- Register with Kubiya: Make the tool available to your agents
Follow the principle of least privilege when creating tools. Give them access only to what they need to perform their specific function.
Tools and MCP Integration
Because tools run as standard Docker containers, they can package and run any software. This includes the possibility of running an on-demand, stateless MCP (Model Context Protocol) gateway server. This allows Kubiya agents to seamlessly interact with local AI tools like Cursor or Claude Desktop that support MCP.
Managing Tools Using Tool Sources
Tool Sources provide a structured, version-controlled way to manage, distribute, and collaborate on agentic tools within the Kubiya platform. They enable DevOps principles for tool development including version control, collaboration, automation, and reusability.
How Tool Sources Work
When you connect a source to Kubiya:
- The platform analyzes the repository contents
- Tool definitions are discovered and validated
- Tools are registered and made available to agents
- Changes to the source are automatically synced on update
The Kubiya runner component continuously monitors connected sources and automatically updates tools when changes are detected.
Benefits of Tool Sources
Using Tool Sources provides several key advantages:
- Version Control: Track changes, manage releases, and maintain history
- Collaboration: Enable team development through pull requests and reviews
- Standardization: Enforce consistent tool structure and documentation
- CI/CD Integration: Automate testing and deployment workflows
- Centralized Management: Maintain tools in a single location with controlled access
- Reusability: Share tools across multiple agents and environments
Tool Source Structure
A well-organized Tool Source has a clear structure:
Discovery Methods
Kubiya supports multiple methods for tool discovery within sources:
1. Bundle-based Discovery
The Kubiya SDK's kubiya bundle
command generates a kubiya_bundle.json
file that indexes all tools in the repository. This is the recommended approach for complex sources.
2. Auto-discovery
For simpler sources, Kubiya can automatically discover tools by scanning for kubiya.yaml
files or Python files with tool decorators.
Development Approaches
There are multiple approaches to creating tools for your sources:
Python SDK
The Kubiya Python SDK provides a decorator-based approach:
YAML Definition
You can define tools using YAML configuration:
Connecting Sources
You can connect Tool Sources to Kubiya using various methods:
CLI
Web UI
Sources can be added and managed through the Kubiya Web interface under the Sources section.
Terraform
For infrastructure-as-code workflows:
CI/CD Integration
Tool Sources can be integrated into CI/CD pipelines for automated testing and deployment:
Best Practices for Tool Sources
When working with Tool Sources, follow these best practices:
- Organize logically: Group related tools together
- Document thoroughly: Include READMEs and inline documentation
- Test rigorously: Write tests for all tools
- Version appropriately: Use semantic versioning for releases
- Minimize dependencies: Keep tools focused and lightweight
- Secure secrets: Never hardcode sensitive information
Check out the Kubiya Community Tools repository for real-world examples and reusable tools.
Next Steps
- Explore Knowledge Sources to improve agent context
- Learn about Agents that use tools