Skip to main content

Agent Communication Protocol Client

Project description

Agent Protocol - Python Client

PyPI PyPI - Python Version PyPI - Downloads

Installation

pip install agent-protocol-client

Getting Started

In your own code, to use this library to connect and interact with agent-protocol-client, you can run the following:

import time
import agent_protocol_client
from agent_protocol_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://0.0.0.0:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = agent_protocol_client.Configuration(
    host = "http://0.0.0.0:8000"
)



# Enter a context with an instance of the API client
async with agent_protocol_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = agent_protocol_client.AgentApi(api_client)
    task_request_body = agent_protocol_client.TaskRequestBody() # TaskRequestBody |  (optional)

    try:
        # Creates a task for the agent.
        api_response = await api_instance.create_agent_task(task_request_body=task_request_body)
        print("The response of AgentApi->create_agent_task:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AgentApi->create_agent_task: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://0.0.0.0:8000

Class Method HTTP request Description
AgentApi create_agent_task POST /ap/v1/agent/tasks Creates a task for the agent.
AgentApi download_agent_task_artifact GET /ap/v1/agent/tasks/{task_id}/artifacts/{artifact_id} Download a specified artifact.
AgentApi execute_agent_task_step POST /ap/v1/agent/tasks/{task_id}/steps Execute a step in the specified agent task.
AgentApi get_agent_task GET /ap/v1/agent/tasks/{task_id} Get details about a specified agent task.
AgentApi get_agent_task_step GET /ap/v1/agent/tasks/{task_id}/steps/{step_id} Get details about a specified task step.
AgentApi list_agent_task_artifacts GET /ap/v1/agent/tasks/{task_id}/artifacts List all artifacts that have been created for the given task.
AgentApi list_agent_task_steps GET /ap/v1/agent/tasks/{task_id}/steps List all steps for the specified task.
AgentApi list_agent_tasks GET /ap/v1/agent/tasks List all tasks that have been created for the agent.
AgentApi upload_agent_task_artifacts POST /ap/v1/agent/tasks/{task_id}/artifacts Upload an artifact for the specified task.

Documentation For Models

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_protocol_client-1.1.0.tar.gz (27.2 kB view hashes)

Uploaded Source

Built Distribution

agent_protocol_client-1.1.0-py3-none-any.whl (50.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page