Agent Protocol - Python Client
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
Metadata
Release files for agent-protocol-client 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_protocol_client-1.1.0.tar.gz | 27.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_protocol_client-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.0 kB
Release files / agent_protocol_client-1.1.0.tar.gz
| Download URL | agent_protocol_client-1.1.0.tar.gz |
|---|---|
| Size | 27.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa7e1042de1249477fdc29c2df08a44f2233dade9c02c1279e37c98e9d3a0d72
|
|
BLAKE2b-256 checksum How to use checksums |
e234b78751961650239ae386454ff913c96ab88044070a163402f88fa3b034e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.13 Linux/5.15.0-1053-azure
|
Release files / agent_protocol_client-1.1.0-py3-none-any.whl
| Download URL | agent_protocol_client-1.1.0-py3-none-any.whl |
|---|---|
| Size | 50.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e8c6c97244189666ed18e320410abddce8c9dfb75437da1e590bbef3b6268be
|
|
BLAKE2b-256 checksum How to use checksums |
24d20b657514f0214de6f085c897ab2486894dff6e0d213385ea63c530f41424
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.13 Linux/5.15.0-1053-azure
|