Tool System
Overview
NeuronAgent provides a comprehensive tool system with 20+ built-in tools and support for custom tool registration. Tools enable agents to interact with external systems, execute code, manage files, and perform various operations beyond LLM interactions.
Key Features
- 20+ Built-in Tools: SQL, HTTP, Code, Shell, Browser, Memory, Collaboration, and more
- NeuronDB Integration: Complete integration with NeuronDB for vector search, ML, RAG, and analytics
- Custom Tools: Extensible system for registering custom tools with JSON Schema validation
- Tool Permissions: Granular tool access permissions for security
- Tool Registry: Centralized tool management and discovery
- Sandboxed Execution: Secure execution environment for code and shell tools
Core Tools
Core tools provide essential functionality for agent operations, including data access, web interaction, code execution, and file management.
SQL Tool
Execute read-only SQL queries against PostgreSQL databases. Supports parameterized queries and result formatting for easy consumption by agents.
- Read-only queries for data retrieval
- Parameterized queries for security
- Result formatting and pagination
- Connection pooling for performance
HTTP Tool
Make HTTP requests to external APIs and services. Supports GET, POST, PUT, DELETE methods with configurable headers, authentication, and allowlist for security.
- Multiple HTTP methods (GET, POST, PUT, DELETE)
- Configurable headers and authentication
- URL allowlist for security
- Request/response logging
Code Tool
Execute code in sandboxed environments. Supports multiple languages with resource limits and timeout controls for security.
- Sandboxed code execution
- Multiple language support
- Resource limits and timeouts
- Output capture and error handling
Shell Tool
Execute shell commands with whitelist-based security. Supports command validation and output capture for safe command execution.
- Whitelisted commands for security
- Command validation and sanitization
- Output capture and error handling
- Timeout controls
Browser Tool
Web automation using Playwright for browser interactions. Enables agents to navigate websites, fill forms, click buttons, and extract content.
- Web page navigation and interaction
- Form filling and button clicking
- Content extraction and screenshots
- JavaScript execution in browser context
Visualization Tool
Create data visualizations from query results. Supports charts, graphs, and other visualization formats for data presentation.
Filesystem Tool
Virtual filesystem for secure file operations per agent/session. Provides isolated file storage and management without direct filesystem access.
- Isolated virtual filesystem per agent/session
- File read, write, and delete operations
- Directory management
- Secure file access controls
Memory Tool
Direct hierarchical memory manipulation, retrieval, and management. Enables agents to store and retrieve information from the memory system.
Collaboration Tool
Multi-agent communication, task delegation, and workspace coordination. Enables agents to collaborate on complex tasks.
Multimodal Tool
Image and multimedia processing with embedding generation. Supports image analysis, embedding generation, and multimodal content processing.
NeuronDB Integration Tools
Complete integration with NeuronDB provides agents with access to vector search, ML operations, RAG pipelines, analytics, and more.
Vector Tool
Vector search operations including similarity search, indexing, and vector operations. Enables agents to perform semantic search and vector-based operations.
ML Tool
Machine learning operations including model training, prediction, and evaluation. Supports all 52+ ML algorithms available in NeuronDB.
RAG Tool
RAG pipeline operations including document processing, context retrieval, and response generation. Enables agents to build RAG workflows.
Analytics Tool
Analytics and data analysis operations. Provides statistical analysis, aggregation, and reporting capabilities.
Hybrid Search Tool
Hybrid search combining vector and full-text search. Enables agents to perform sophisticated search operations.
Reranking Tool
Reranking operations for search results. Supports multiple reranking strategies including cross-encoder, LLM, and ensemble reranking.
Custom Tools
The tool system supports custom tool registration, enabling you to extend agent capabilities with domain-specific tools.
Tool Registration
Custom tools can be registered via the API with JSON Schema validation for parameter validation and type checking.
Tool Implementation
Tools are implemented as HTTP endpoints or function handlers that receive tool parameters and return results in a standardized format.
Tool Metadata
Each tool includes metadata such as name, description, parameters schema, and return type for automatic discovery and validation.
Tool Registry
The tool registry provides centralized management of all available tools, including built-in and custom tools.
Tool Discovery
Agents can discover available tools through the registry, which provides metadata and capabilities for each tool.
Tool Versioning
Tools support versioning, enabling updates and rollbacks while maintaining compatibility with existing agent configurations.
Tool Categories
Tools are organized into categories for easier discovery and management, including core tools, NeuronDB tools, and custom tools.
Tool Permissions
Granular tool access permissions ensure that agents only have access to tools they are authorized to use.
Permission Model
Tool permissions are managed at the agent, role, and principal levels, providing fine-grained access control.
Permission Types
- Read: Tool can be queried for metadata
- Execute: Tool can be executed by the agent
- Configure: Tool configuration can be modified
Security
Tool permissions are enforced at runtime, ensuring that unauthorized tool access is prevented even if requested by the agent.
API Reference
The tool system is accessible through the NeuronAgent REST API for tool registration, discovery, and management.
Tool Endpoints
GET /api/v1/tools- List all available toolsGET /api/v1/tools/:id- Get tool detailsPOST /api/v1/tools- Register a custom toolPUT /api/v1/tools/:id- Update a toolDELETE /api/v1/tools/:id- Delete a toolPOST /api/v1/tools/:id/execute- Execute a tool