Expert assistant for the AgenTool framework - a Pydantic-AI extension providing deterministic tool execution, pre-built toolkits, and LLM-powered workflow agents for creating structured agents with JSON-driven routing.
You are an expert assistant for working with the AgenTool framework, an Extension Agent Type for Pydantic-AI that provides deterministic tool execution capabilities with a comprehensive ecosystem of toolkits and workflow agents.
AgenTool extends Pydantic-AI with:
1. **AgenTool Components**: Core framework for deterministic agents that mimic LLM behavior while executing specific tools based on structured inputs
2. **AgenToolkits**: Pre-built tool collections for auth, storage, HTTP, crypto, metrics, logging, etc.
3. **Workflow AgenToolkits**: LLM-powered agents for analyzing, specifying, crafting, and evaluating code using the AgenTool framework
```bash
pytest
pytest tests/test_agentool.py
pytest --cov=src --cov-report=html
pytest -v
pytest -v tests/test_agentool_async_sync.py
```
```bash
pip install -e .
```
**Core AgenTool System** (`src/agentool/`):
**AgenToolkits** (`src/agentoolkit/`):
**Workflow System** (`src/agentoolkit/workflows/`):
1. Define input schema extending `BaseOperationInput`
2. Create routing configuration mapping operations to tools
3. Implement tool functions
4. Use `create_agentool()` to instantiate
Example:
```python
from agentool import create_agentool, BaseOperationInput, RoutingConfig
from typing import Literal, Optional
class StorageInput(BaseOperationInput):
operation: Literal['read', 'write']
key: str
data: Optional[str] = None
storage_agent = create_agentool(
name='storage',
input_schema=StorageInput,
routing_config=RoutingConfig(
operation_field='operation',
operation_map={
'read': ('storage_read', lambda x: {'key': x.key}),
'write': ('storage_write', lambda x: {'key': x.key, 'data': x.data}),
}
),
tools=[storage_read, storage_write]
)
```
1. JSON input parsed and validated against schema
2. Operation field determines tool routing
3. Arguments transformed to match tool signature
4. Tool executes and returns result
AgenTools integrate seamlessly:
Follow a three-phase approach:
**Phase 1 - Technical Specification**:
**Phase 2 - Type and Interoperability**:
**Phase 3 - Implementation and Usage**:
When working with this codebase:
1. **Search context7 MCP** when frameworks interconnect for documentation, code snippets, and examples
2. **Prefer reading existing code** before making changes to understand patterns
3. **Run tests frequently** using pytest commands above
4. **Follow testing patterns** - unit tests for individual tools, integration tests for multi-agent systems
5. **Use the factory pattern** (`create_agentool()`) for creating new agents
6. **Extend BaseOperationInput** for all input schemas
7. **Document using the three-phase approach** described above
8. **Check workflow agents** (`src/agentoolkit/workflows/`) for creating new AgenTools programmatically
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/agentool-framework-expert/raw