theohsiung/ai-agent-tools

0

stars

1

commits

Python

primary language

Dec 24, 2025

updated

README

AI Agent Tools

A collection of local AI model APIs designed as tools for AI Agents (Google ADK / A2A protocol).

Project Structure

ai-agent-tools/
├── tools/                    # Tool services (MCP & A2A)
│   ├── ocr_tool_mcp/        # OCR MCP service (Ready)
│   ├── tts_tool/           # TTS service (port 8002) [TODO]
│   └── ...
├── agents/                   # Google ADK agents (A2A Capable)
│   └── ocrAgent/            # OCR Agent Module
│       ├── ocrAgent.py
│       └── ocrAgent.json    # Agent Card
├── gateway/                  # API gateway & Proxy
│   └── ...
├── shared/                   # Shared utilities
│   └── a2a_wrapper.py       # Universal A2A Server Wrapper
└── asset/                    # Static assets

Status

ComponentStatusDescription
OCR MCP ToolReadyLocal OCR service using Model Context Protocol
A2A WrapperReadyShared utility to wrap agents as A2A servers
OCR AgentReadyA2A-capable agent in agents/ocrAgent/
API GatewayIn ProgressUnified access point for tools and agents

Quick Start

OCR Tool

cd tools/ocr_tool

# Create virtual environment
uv sync

# Run the server
uv run uvicorn main:app --host 0.0.0.0 --port 8001

# Or run directly
uv run python main.py

Test the API

import base64
import requests

with open("image.png", "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = requests.post("http://localhost:8001/ocr", json={
    "image_base64": image_b64,
    "prompt_type": "ocr_layout"
})
print(response.json())

Tool Specification

Each tool includes a tool_spec.json file describing its API for A2A protocol integration.

Adding a New Tool

  1. Create a new directory under tools/:

    mkdir tools/my_tool
    cd tools/my_tool
    
  2. Create the required files:

    • main.py - FastAPI application
    • pyproject.toml - Dependencies
    • tool_spec.json - A2A tool specification
    • Dockerfile - Container definition
  3. Follow the existing ocr_tool as a template.

License

MIT

Contributors

theohsiung

1 commits

theohsiung/ai-agent-tools

0

stars

1

commits

Python

primary language

Dec 24, 2025

updated

README

AI Agent Tools

A collection of local AI model APIs designed as tools for AI Agents (Google ADK / A2A protocol).

Project Structure

ai-agent-tools/
├── tools/                    # Tool services (MCP & A2A)
│   ├── ocr_tool_mcp/        # OCR MCP service (Ready)
│   ├── tts_tool/           # TTS service (port 8002) [TODO]
│   └── ...
├── agents/                   # Google ADK agents (A2A Capable)
│   └── ocrAgent/            # OCR Agent Module
│       ├── ocrAgent.py
│       └── ocrAgent.json    # Agent Card
├── gateway/                  # API gateway & Proxy
│   └── ...
├── shared/                   # Shared utilities
│   └── a2a_wrapper.py       # Universal A2A Server Wrapper
└── asset/                    # Static assets

Status

ComponentStatusDescription
OCR MCP ToolReadyLocal OCR service using Model Context Protocol
A2A WrapperReadyShared utility to wrap agents as A2A servers
OCR AgentReadyA2A-capable agent in agents/ocrAgent/
API GatewayIn ProgressUnified access point for tools and agents

Quick Start

OCR Tool

cd tools/ocr_tool

# Create virtual environment
uv sync

# Run the server
uv run uvicorn main:app --host 0.0.0.0 --port 8001

# Or run directly
uv run python main.py

Test the API

import base64
import requests

with open("image.png", "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = requests.post("http://localhost:8001/ocr", json={
    "image_base64": image_b64,
    "prompt_type": "ocr_layout"
})
print(response.json())

Tool Specification

Each tool includes a tool_spec.json file describing its API for A2A protocol integration.

Adding a New Tool

  1. Create a new directory under tools/:

    mkdir tools/my_tool
    cd tools/my_tool
    
  2. Create the required files:

    • main.py - FastAPI application
    • pyproject.toml - Dependencies
    • tool_spec.json - A2A tool specification
    • Dockerfile - Container definition
  3. Follow the existing ocr_tool as a template.

License

MIT

Contributors

theohsiung

1 commits

Languages

Python

98.6%

Dockerfile

1.4%