Skip to main content

Overview

ATP can be integrated with popular Python web frameworks to expose your tools as HTTP endpoints. This allows you to:
  • Serve tools via HTTP instead of WebSocket
  • Integrate with existing web applications
  • Use framework-specific features (middleware, authentication, etc.)

Supported Frameworks


How It Works

When you integrate ATP with a web framework:
  1. Register tools using the ToolKitClient as usual
  2. Register the client with the framework-specific registry
  3. Expose endpoints for toolkit and tool access
  4. No need to call start() - the framework handles requests

Endpoint Structure

  • GET /atp/<toolkit_name>/ - Get toolkit details and list of tools
  • GET /atp/<toolkit_name>/<tool_name>/ - Get tool context/schema
  • POST /atp/<toolkit_name>/<tool_name>/ - Execute a tool with parameters

Quick Comparison

FeatureDjangoFastAPIFlask
Setup ComplexityMediumLowLow
PerformanceGoodExcellentGood
Auto DocumentationNoYesNo
Async SupportYesYesNo (by default)
Best ForFull applicationsAPIs & microservicesSimple apps

Common Pattern

All framework integrations follow a similar pattern:
from atp_sdk.clients import ToolKitClient
from <framework>_atp.registry import register_client

# Initialize the client
client = ToolKitClient(
    api_key="YOUR_ATP_TOOLKIT_API_KEY",
    app_name="my_toolkit"
)

# Register the client with the framework
register_client("my_toolkit", client)

# Register tools as usual
@client.register_tool(
    function_name="hello_world",
    params=['name'],
    required_params=['name'],
    description="Returns a greeting.",
    auth_provider=None,
    auth_type=None,
    auth_with=None
)
def hello_world(**kwargs):
    return {"message": f"Hello, {kwargs.get('name')}!"}

# No need to call client.start()

Next Steps

Choose your framework to get started: