Agent Documentation

Learn how to build and deploy AI agents using the AgentX Market infrastructure.

Getting Started

1. Create an Account

Sign up for an AgentX Market account to get started.

Create Account
2. Get API Keys

Generate API keys from your dashboard.

Go to Dashboard

Agent Setup

1. Agent Creation

Create your first agent using our Python SDK:

import agentx

client = agentx.Client('your-api-key')
agent = client.agents.create(
    agent_id='your-agent-id',
    public_key='your-public-key'
)
View Python SDK Docs →

Integration Examples

LLM Integration

AgentX Market provides a standardized tool interface that can be used with any LLM-based agent framework:

# Example using OpenAI function calling
tools = agentx.get_tools()  # Returns JSONSchema tool definitions

# Define your agent's available actions
functions = [
    {
        "name": "search_services",
        "description": "Search for services in the AgentX marketplace",
        "parameters": {
            "type": "object",
            "properties": {
                "category": {"type": "string"},
                "capabilities": {"type": "array", "items": {"type": "string"}}
            }
        }
    },
    {
        "name": "execute_service",
        "description": "Execute a service through AgentX marketplace",
        "parameters": {
            "type": "object",
            "properties": {
                "service_id": {"type": "string"},
                "action": {"type": "string"},
                "parameters": {"type": "object"}
            }
        }
    }
]

# Example agent interaction
response = openai.ChatCompletion.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Find and book a hotel in New York"}],
    functions=functions,
    function_call="auto"
)

# Handle the agent's decision
if response.choices[0].function_call:
    function_name = response.choices[0].function_call.name
    arguments = json.loads(response.choices[0].function_call.arguments)
    
    # Execute through AgentX
    if function_name == "search_services":
        services = agentx.search_services(**arguments)
    elif function_name == "execute_service":
        result = agentx.execute_service(**arguments)

Service Discovery & Capability Matching

AgentX helps your agent discover and utilize services based on capabilities:

# Discover services based on required capabilities
available_services = agentx.discover_services(
    capabilities=["hotel_booking", "payment_processing"],
    requirements={
        "location": "NYC",
        "price_range": "200-400",
        "dates": ["2025-03-01", "2025-03-05"]
    }
)

# AgentX handles service selection and orchestration
booking = agentx.execute_transaction(
    intent="book_hotel",
    requirements={
        "location": "NYC",
        "dates": ["2025-03-01", "2025-03-05"],
        "price_max": 400,
        "preferences": {
            "wifi": True,
            "breakfast": True
        }
    }
)

AgentX automatically:

  • Matches intent to appropriate services
  • Handles service authentication
  • Manages payment processing
  • Ensures transaction security

Advanced Features

Multi-Step Transactions

# Handle complex, multi-step processes
trip = agentx.create_transaction_group()

# Book flight
trip.add_transaction(
    intent="book_flight",
    requirements=flight_details
)

# Book hotel
trip.add_transaction(
    intent="book_hotel",
    requirements=hotel_details
)

# Execute all as atomic transaction
result = trip.execute(
    rollback_on_failure=True
)

Dynamic Service Adaptation

# AgentX adapts to service availability
booking = agentx.execute_transaction(
    intent="book_hotel",
    requirements=requirements,
    fallback_strategy={
        "max_price_increase": 50,
        "alternative_locations": ["nearby"],
        "required_amenities": ["wifi"]
    }
)

Key Benefits for AI Agents

Universal Integration

  • Single API for multiple services
  • Standardized tool interfaces
  • Compatible with major LLM frameworks

Built-in Security

  • Automated authentication
  • Transaction verification
  • Spending controls & limits

AI-First Design

  • Intent-based service matching
  • Capability-based discovery
  • Adaptive service selection

Smart Orchestration

  • Automatic service composition
  • Multi-step transaction handling
  • Fallback strategies

Framework Integrations

LangChain

from langchain.agents import AgentExecutor
from agentx.langchain import AgentXToolkit

tools = AgentXToolkit().get_tools()
agent = AgentExecutor.from_agent_and_tools(
    agent=agent,
    tools=tools
)

Auto-GPT

from autogpt import AutoGPT
from agentx.autogpt import AgentXPlugin

agent = AutoGPT()
agent.install_plugin(AgentXPlugin())

Custom LLM Integration

from agentx import ServiceRegistry

registry = ServiceRegistry()
tools = registry.get_tool_descriptions()
# Add to your LLM's function list

Agent Authorization

Required Information

Essential Requirements

  • Payment Method Credit card or payment account for agent transactions
  • Phone Number For account security and transaction notifications
  • Email Verification Verified email for important notifications
  • 2FA Setup Two-factor authentication for account security

Optional Information

  • Shipping Address Required only if agent will make purchases with physical delivery
  • Business Details For business accounts and tax purposes
  • Tax Information For business accounts and high-volume transactions

Transaction Limits

Level Requirements Transaction Limits Features
Basic Email + Phone Up to $100/day Basic agent operations
Standard + Payment Method Up to $1,000/day Standard features, priority support
Business + Business Details Up to $10,000/day Advanced features, dedicated support
Enterprise + Custom Agreement Custom limits Custom features, account manager

Authorization Settings

Transaction Controls

  • Spending Limits

    Set daily, weekly, or monthly spending limits for your agent

  • Notifications

    Configure alerts for transactions above certain amounts

  • Service Restrictions

    Limit which services your agent can interact with

  • Time Restrictions

    Set operating hours for your agent

Configure Settings →

Transactions

Processing Transactions

Example of processing a transaction:

transaction = client.transactions.create(
    amount=100.00,
    currency='USD',
    service_id='service123'
)
View Transaction Guide →