# {{name}}

{{description}}

## Overview

This project contains an AI Lab agent with custom tools created with PyGEAI.

**Agent Details:**
- **Name:** {{name}}
- **Model:** {{model}}
- **Temperature:** {{temperature}}
- **Max Tokens:** {{max_tokens}}

**Custom Tool:**
- **Name:** {{tool_name}}
- **Description:** {{tool_description}}

## Setup

1. Ensure PyGEAI is installed and configured:
   ```bash
   pip install pygeai
   geai configure --key YOUR_API_KEY --url YOUR_API_URL
   ```

2. Create the custom tool:
   ```bash
   python create_tool_{{tool_name}}.py
   ```

3. Create the agent:
   ```bash
   python create_{{name}}.py
   ```

## Usage

Run the agent interactively:
```bash
python run_{{name}}.py
```

The agent has access to the `{{tool_name}}` tool and can use it when responding to your queries.

## Customization

### Modify Tool Parameters

Edit `create_tool_{{tool_name}}.py` to add more parameters:

```python
parameters=[
    ToolParameter(
        key="input_text",
        data_type="String",
        description="Input text for the tool",
        is_required=True,
        type="app"
    ),
    ToolParameter(
        key="option",
        data_type="String",
        description="Configuration option",
        is_required=False,
        type="config",
        value="default_value"
    )
]
```

**Parameter Types:**
- `app` - Runtime input from LLM
- `config` - Static configuration value
- `context` - Context-based parameter

### Add More Tools

Create additional tools and add them to the agent's ResourcePool:

```python
resource_pools=ResourcePoolList(resource_pools=[
    ResourcePool(
        name="{{name}}_tools",
        tools=[
            ResourcePoolTool(name="{{tool_name}}", revision=1),
            ResourcePoolTool(name="another_tool", revision=1)
        ]
    )
])
```

### Configure Tool Scope

Available tool scopes:
- `builtin` - Built-in tool (default)
- `api` - External API tool
- `custom` - Custom implementation

### Agent Instructions

Update agent instructions in `create_{{name}}.py` to guide tool usage:

```python
instructions="You are a helpful AI assistant. Use the {{tool_name}} tool when processing user requests that need [specific functionality]."
```

## Next Steps

- Implement actual tool logic (API integration, processing, etc.)
- Add structured outputs to capture tool results
- Create multi-step workflows using Lab processes
- Test tool behavior with various inputs

## Documentation

- [PyGEAI Lab Documentation](https://pygeai.readthedocs.io/)
- [AI Lab Tools Guide](https://pygeai.readthedocs.io/en/latest/lab/tools/)
