AgentsApi
Method |
HTTP request |
Description |
|---|---|---|
POST /agents/builtin-mcps/add |
Add a built-in MCP |
|
POST /agents/builtin-skills/add |
Add a predefined skill |
|
POST /agents/custom-agents |
Add Custom Agents |
|
POST /agents/custom-tools |
Add Custom Agent Tools |
|
POST /agents/skills |
Adds an agent skill from an uploaded archive. |
|
POST /agents/keys |
Creates agent key. |
|
POST /agents/tool-association |
Creates associations between a tool and user& |
|
POST /agents/custom-agent-key-associations |
Creates a custom agent key association. |
|
POST /agents/custom-agent-tool-associations |
Creates a custom agent tool association. |
|
POST /agents/builtin-skills/admin |
Publish a skill to the library |
|
POST /agents/builtin-mcps/admin |
Publish a custom builtin MCP to the library |
|
DELETE /agents/keys/{key-ids} |
Deletes agent keys. |
|
DELETE /agents/tool-association/{associate-ids} |
Deletes agent tool key associations. |
|
DELETE /agents/tool-preference |
Deletes the agent tool preferences for the user. |
|
DELETE /agents/custom-agents/{agent-ids} |
Deletes custom agents |
|
DELETE /agents/custom-agent-key-associations/{association-ids} |
Deletes custom agent key associations. |
|
DELETE /agents/custom-tools/{tool-ids} |
Deletes custom agent tools |
|
DELETE /agents/custom-agent-tool-associations/{association-ids} |
Deletes custom agent tool associations. |
|
DELETE /agents/builtin-skills/admin/{skill-id} |
Remove a skill from the library |
|
POST /agents/skills/delete |
Deletes agent skills. |
|
DELETE /agents/builtin-mcps/admin/{mcp-id} |
Delete a custom builtin MCP |
|
GET /agents/builtin-skills/{skill-id}/download |
Download a library skill zip |
|
GET /agents/custom-agents/{agent-id}/download |
Download custom agent zip file |
|
GET /agents/custom-tools/{tool-id}/download |
Download custom agent tool file |
|
GET /agents/custom-agents/{agent-id}/suggestions |
Get MCP tool suggestions for a custom agent. |
|
GET /agents |
Get all agents (built-in and custom) |
|
GET /agents/custom-agents/{agent-id} |
Get a single custom agent |
|
GET /agents/custom-tools/{tool-id} |
Get a single custom agent tool |
|
GET /agents/mcp/sdk-options |
Get Claude SDK options schema |
|
POST /agents/mcp/inspect-tool |
Unified MCP tool inspection |
|
POST /agents/custom-tools/{tool-id}/launch |
Launches a custom agent tool via CodeAPI |
|
GET /agents/directory-stats |
Lists agent directory stats across all agent chat sessions. |
|
GET /agents/tool-association |
Returns a list of tools and the user& |
|
GET /agents/keys |
Lists agent keys. |
|
GET /agents/tool-preference |
Lists the agent tool preference for the user. |
|
GET /agents/tools |
Lists agent tools present on the system. |
|
GET /agents/builtin-mcps |
Lists built-in MCPs |
|
GET /agents/builtin-skills |
Lists predefined skills |
|
GET /agents/custom-agent-key-associations |
Returns a list of custom agent key associations. |
|
GET /agents/custom-agent-tool-associations |
Returns a list of custom agent tool associations. |
|
GET /agents/custom-tools |
List Custom Agent Tools |
|
GET /agents/custom-agents |
List Custom Agents |
|
POST /agents/mcp/list-tools |
List tools from MCP servers |
|
GET /agents/skill-association |
Lists the current user& |
|
GET /agents/skills |
Lists agent skills for the current user. |
|
DELETE /agents/builtin-mcps/admin/{mcp-id}/logo |
Remove MCP logo |
|
DELETE /agents/custom-tools/{tool-id}/launch |
Removes a custom agent tool from CodeAPI |
|
POST /agents/skill-preference |
Enable or disable the given agent skills for the user. |
|
POST /agents/skill-association |
Sets a skill& |
|
POST /agents/library/{item-kind}/{item-id}/star |
Star a library item (skill or mcp) |
|
DELETE /agents/library/{item-kind}/{item-id}/star |
Remove the caller& |
|
POST /agents/builtin-mcps/admin/{mcp-id}/logo |
Update MCP logo |
|
POST /agents/keys/{key-id} |
Updates agent key. |
|
POST /agents/tool-preference |
Creates or updates the agent tool preference for the user. |
|
PUT /agents/custom-agents/{agent-id} |
Updates a custom agent |
|
PUT /agents/custom-tools/{tool-id} |
Updates a custom agent tool |
|
PUT /agents/builtin-mcps/admin/{mcp-id} |
Update a custom builtin MCP |
add_builtin_mcp
AddBuiltinMcp201Response add_builtin_mcp(mcp_id, keys=keys, files=files)
Add a built-in MCP
Adds a built-in MCP (Model Context Protocol server) to the user’s tools. This endpoint configures and enables a predefined MCP for the user with direct file uploads.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.add_builtin_mcp201_response import AddBuiltinMcp201Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
mcp_id = 'mcp_id_example' # str | The ID of the built-in MCP to add
keys = 'keys_example' # str | JSON string of agent key associations for the MCP (optional)
files = None # List[bytearray] | File uploads for MCP configuration (optional)
try:
# Add a built-in MCP
api_response = await api_instance.add_builtin_mcp(mcp_id, keys=keys, files=files)
print("The response of AgentsApi->add_builtin_mcp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->add_builtin_mcp: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
mcp_id |
str |
The ID of the built-in MCP to add |
|
keys |
str |
JSON string of agent key associations for the MCP |
[optional] |
files |
List[bytearray] |
File uploads for MCP configuration |
[optional] |
Return type
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
201 |
MCP successfully added |
- |
400 |
Bad request - Invalid parameters |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
add_builtin_skill
AddBuiltinSkill201Response add_builtin_skill(add_builtin_skill_request)
Add a predefined skill
Installs a predefined skill from the built-in skill library.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.add_builtin_skill201_response import AddBuiltinSkill201Response
from h2ogpte.rest_async.models.add_builtin_skill_request import AddBuiltinSkillRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
add_builtin_skill_request = h2ogpte.rest_async.AddBuiltinSkillRequest() # AddBuiltinSkillRequest |
try:
# Add a predefined skill
api_response = await api_instance.add_builtin_skill(add_builtin_skill_request)
print("The response of AgentsApi->add_builtin_skill:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->add_builtin_skill: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
add_builtin_skill_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
201 |
Skill added successfully |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Predefined skill not found |
- |
409 |
Skill with the same name already exists |
- |
500 |
Internal server error |
- |
add_custom_agent
List[AddCustomAgent201ResponseInner] add_custom_agent(file, agent_type, agent_args, agent_name=agent_name)
Add Custom Agents
Add Custom Agents
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.add_custom_agent201_response_inner import AddCustomAgent201ResponseInner
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
file = None # bytearray |
agent_type = 'agent_type_example' # str |
agent_args = 'agent_args_example' # str |
agent_name = 'agent_name_example' # str | User-provided name for the agent. If provided and the zip contains exactly one agent, this name will be used instead of the folder name inside the zip. If not provided, the folder name is used. (optional)
try:
# Add Custom Agents
api_response = await api_instance.add_custom_agent(file, agent_type, agent_args, agent_name=agent_name)
print("The response of AgentsApi->add_custom_agent:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->add_custom_agent: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
file |
bytearray |
||
agent_type |
str |
||
agent_args |
str |
||
agent_name |
str |
User-provided name for the agent. If provided and the zip contains exactly one agent, this name will be used instead of the folder name inside the zip. If not provided, the folder name is used. |
[optional] |
Return type
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
201 |
Custom agent created successfully |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
415 |
Unsupported media type |
- |
add_custom_agent_tool
List[AddCustomAgentTool201ResponseInner] add_custom_agent_tool(tool_type, tool_args, file=file, custom_tool_path=custom_tool_path, filename=filename, generate_system_prompt=generate_system_prompt, system_prompt_generation_timeout=system_prompt_generation_timeout)
Add Custom Agent Tools
Add Custom Agent Tools
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.add_custom_agent_tool201_response_inner import AddCustomAgentTool201ResponseInner
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
tool_type = 'tool_type_example' # str | The type of custom tool being added: - local_mcp: Model Context Protocol server running locally - remote_mcp: Model Context Protocol server running remotely - browser_action: Custom browser automation actions - general_code: General purpose code execution tools
tool_args = 'tool_args_example' # str | JSON string containing tool-specific arguments. The structure varies by tool_type: For remote_mcp: { \\\"mcp_config_json\\\": \\\"JSON string with MCP server configuration\\\", \\\"enable_by_default\\\": true/false (optional, defaults to true) } For local_mcp, browser_action, and general_code: { \\\"tool_name\\\": \\\"string (optional, defaults to filename without extension)\\\", \\\"description\\\": \\\"string (optional, tool description)\\\", \\\"enable_by_default\\\": true/false (optional, defaults to true), \\\"should_unzip\\\": true/false (optional, for general_code .zip files only), \\\"tool_usage_mode\\\": [\\\"runner\\\", \\\"creator\\\"] (optional list of strings), \\\"system_prompt\\\": \\\"string (automatically added when generate_system_prompt=true)\\\" }
file = None # bytearray | The tool file to upload. Requirements vary by tool_type: - local_mcp: .zip file containing MCP server code - remote_mcp: Optional configuration file — any extension accepted (common: .json, .yml, .yaml, .py, .zip, .toml, .ini, .conf, .config, .env, .txt) - browser_action: .py file (must start with 'browser_') or .zip containing browser action scripts - general_code: .py or .zip file with custom code (optional)
custom_tool_path = 'custom_tool_path_example' # str | (optional)
filename = 'filename_example' # str | Optional filename to use when storing the uploaded file (optional)
generate_system_prompt = True # bool | If true and tool_type is \\\"general_code\\\", generates a system prompt for the tool using LLM analysis. The generated system prompt will be automatically added to tool_args[\\\"system_prompt\\\"] after generation completes. Only valid for general_code tool type. WARNING: This is a long-running synchronous operation. The server holds the HTTP connection open while the LLM analyzes the uploaded code. Ensure your HTTP client timeout and any intermediate proxies (nginx, ALB, Cloudflare, etc.) are configured with sufficient timeout. Default proxy timeouts of 60-120s will cause 504 Gateway Timeout errors. See `system_prompt_generation_timeout` to constrain the wait budget on the server side. (optional)
system_prompt_generation_timeout = 3.4 # float | Optional wait budget in seconds for synchronous system prompt generation (only used when generate_system_prompt is true). Set this below your proxy/ingress read timeout so the API returns a 408 instead of letting the proxy emit a 504. If omitted, defaults to the server-side cap of 600 seconds (10 minutes). (optional)
try:
# Add Custom Agent Tools
api_response = await api_instance.add_custom_agent_tool(tool_type, tool_args, file=file, custom_tool_path=custom_tool_path, filename=filename, generate_system_prompt=generate_system_prompt, system_prompt_generation_timeout=system_prompt_generation_timeout)
print("The response of AgentsApi->add_custom_agent_tool:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->add_custom_agent_tool: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
tool_type |
str |
The type of custom tool being added: - local_mcp: Model Context Protocol server running locally - remote_mcp: Model Context Protocol server running remotely - browser_action: Custom browser automation actions - general_code: General purpose code execution tools |
|
tool_args |
str |
JSON string containing tool-specific arguments. The structure varies by tool_type: For remote_mcp: { \"mcp_config_json\": \"JSON string with MCP server configuration\", \"enable_by_default\": true/false (optional, defaults to true) } For local_mcp, browser_action, and general_code: { \"tool_name\": \"string (optional, defaults to filename without extension)\", \"description\": \"string (optional, tool description)\", \"enable_by_default\": true/false (optional, defaults to true), \"should_unzip\": true/false (optional, for general_code .zip files only), \"tool_usage_mode\": [\"runner\", \"creator\"] (optional list of strings), \"system_prompt\": \"string (automatically added when generate_system_prompt=true)\" } |
|
file |
bytearray |
The tool file to upload. Requirements vary by tool_type: - local_mcp: .zip file containing MCP server code - remote_mcp: Optional configuration file — any extension accepted (common: .json, .yml, .yaml, .py, .zip, .toml, .ini, .conf, .config, .env, .txt) - browser_action: .py file (must start with ‘browser_’) or .zip containing browser action scripts - general_code: .py or .zip file with custom code |
[optional] |
custom_tool_path |
str |
[optional] |
|
filename |
str |
Optional filename to use when storing the uploaded file |
[optional] |
generate_system_prompt |
bool |
If true and tool_type is \"general_code\", generates a system prompt for the tool using LLM analysis. The generated system prompt will be automatically added to tool_args[\"system_prompt\"] after generation completes. Only valid for general_code tool type. WARNING: This is a long-running synchronous operation. The server holds the HTTP connection open while the LLM analyzes the uploaded code. Ensure your HTTP client timeout and any intermediate proxies (nginx, ALB, Cloudflare, etc.) are configured with sufficient timeout. Default proxy timeouts of 60-120s will cause 504 Gateway Timeout errors. See `system_prompt_generation_timeout` to constrain the wait budget on the server side. |
[optional] |
system_prompt_generation_timeout |
float |
Optional wait budget in seconds for synchronous system prompt generation (only used when generate_system_prompt is true). Set this below your proxy/ingress read timeout so the API returns a 408 instead of letting the proxy emit a 504. If omitted, defaults to the server-side cap of 600 seconds (10 minutes). |
[optional] |
Return type
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
201 |
Custom agent tool created successfully |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
415 |
Unsupported media type |
- |
add_skill
List[AgentSkill] add_skill(file, enable_by_default=enable_by_default)
Adds an agent skill from an uploaded archive.
Upload a .zip or .skill file containing a SKILL.md to create a new agent skill.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_skill import AgentSkill
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
file = None # bytearray | A .zip or .skill file containing a SKILL.md at the root.
enable_by_default = False # bool | Whether to enable the skill by default for the user after creation. (optional) (default to False)
try:
# Adds an agent skill from an uploaded archive.
api_response = await api_instance.add_skill(file, enable_by_default=enable_by_default)
print("The response of AgentsApi->add_skill:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->add_skill: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
file |
bytearray |
A .zip or .skill file containing a SKILL.md at the root. |
|
enable_by_default |
bool |
Whether to enable the skill by default for the user after creation. |
[optional] [default to False] |
Return type
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
201 |
Agent skill(s) created successfully |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
403 |
Forbidden |
- |
413 |
Request entity is too large |
- |
415 |
Unsupported media type |
- |
500 |
Internal server error |
- |
create_agent_key
AgentKey create_agent_key(create_agent_key_request)
Creates agent key.
Creates agent key.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_key import AgentKey
from h2ogpte.rest_async.models.create_agent_key_request import CreateAgentKeyRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
create_agent_key_request = h2ogpte.rest_async.CreateAgentKeyRequest() # CreateAgentKeyRequest |
try:
# Creates agent key.
api_response = await api_instance.create_agent_key(create_agent_key_request)
print("The response of AgentsApi->create_agent_key:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->create_agent_key: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
create_agent_key_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
409 |
Conflict |
- |
500 |
Internal server error |
- |
create_agent_key_tool_associations
AgentToolKeyAssociations create_agent_key_tool_associations(create_agent_tool_key_associations_request)
Creates associations between a tool and user’s keys.
Creates associations between a tool and user’s keys.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_tool_key_associations import AgentToolKeyAssociations
from h2ogpte.rest_async.models.create_agent_tool_key_associations_request import CreateAgentToolKeyAssociationsRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
create_agent_tool_key_associations_request = h2ogpte.rest_async.CreateAgentToolKeyAssociationsRequest() # CreateAgentToolKeyAssociationsRequest |
try:
# Creates associations between a tool and user's keys.
api_response = await api_instance.create_agent_key_tool_associations(create_agent_tool_key_associations_request)
print("The response of AgentsApi->create_agent_key_tool_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->create_agent_key_tool_associations: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
create_agent_tool_key_associations_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
create_custom_agent_key_association
CustomAgentKeyAssociation create_custom_agent_key_association(create_custom_agent_key_association_request)
Creates a custom agent key association.
Associates an env var (from envs.json or user-added) with an agent key.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.create_custom_agent_key_association_request import CreateCustomAgentKeyAssociationRequest
from h2ogpte.rest_async.models.custom_agent_key_association import CustomAgentKeyAssociation
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
create_custom_agent_key_association_request = h2ogpte.rest_async.CreateCustomAgentKeyAssociationRequest() # CreateCustomAgentKeyAssociationRequest |
try:
# Creates a custom agent key association.
api_response = await api_instance.create_custom_agent_key_association(create_custom_agent_key_association_request)
print("The response of AgentsApi->create_custom_agent_key_association:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->create_custom_agent_key_association: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
create_custom_agent_key_association_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
create_custom_agent_tool_association
CustomAgentToolAssociation create_custom_agent_tool_association(create_custom_agent_tool_association_request)
Creates a custom agent tool association.
Creates a custom agent tool association.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.create_custom_agent_tool_association_request import CreateCustomAgentToolAssociationRequest
from h2ogpte.rest_async.models.custom_agent_tool_association import CustomAgentToolAssociation
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
create_custom_agent_tool_association_request = h2ogpte.rest_async.CreateCustomAgentToolAssociationRequest() # CreateCustomAgentToolAssociationRequest |
try:
# Creates a custom agent tool association.
api_response = await api_instance.create_custom_agent_tool_association(create_custom_agent_tool_association_request)
print("The response of AgentsApi->create_custom_agent_tool_association:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->create_custom_agent_tool_association: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
create_custom_agent_tool_association_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
create_library_skill
List[CreateLibrarySkill201ResponseInner] create_library_skill(file)
Publish a skill to the library
Uploads a skill zip file to the shared library. Requires the ManageLibrary permission (admins hold it by default). All users will see this skill in their library. Skill name and description are taken from the SKILL.md frontmatter inside the zip.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.create_library_skill201_response_inner import CreateLibrarySkill201ResponseInner
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
file = None # bytearray | The skill zip file
try:
# Publish a skill to the library
api_response = await api_instance.create_library_skill(file)
print("The response of AgentsApi->create_library_skill:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->create_library_skill: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
file |
bytearray |
The skill zip file |
Return type
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
201 |
Library skill created successfully |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
413 |
Request entity is too large |
- |
415 |
Unsupported media type |
- |
500 |
Internal server error |
- |
create_user_builtin_mcp
CreateUserBuiltinMcp201Response create_user_builtin_mcp(mcp_config, logo_file=logo_file)
Publish a custom builtin MCP to the library
Publishes a new MCP to the shared library so it appears in the builtin MCPs list. Requires the ManageLibrary permission (admins hold it by default). Supports optional logo file upload.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.create_user_builtin_mcp201_response import CreateUserBuiltinMcp201Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
mcp_config = 'mcp_config_example' # str | JSON string containing the MCP configuration (name, description, type, mcp_config_json, etc.)
logo_file = None # bytearray | Optional logo image file to upload (optional)
try:
# Publish a custom builtin MCP to the library
api_response = await api_instance.create_user_builtin_mcp(mcp_config, logo_file=logo_file)
print("The response of AgentsApi->create_user_builtin_mcp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->create_user_builtin_mcp: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
mcp_config |
str |
JSON string containing the MCP configuration (name, description, type, mcp_config_json, etc.) |
|
logo_file |
bytearray |
Optional logo image file to upload |
[optional] |
Return type
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
201 |
MCP successfully created |
- |
400 |
Bad request - Invalid configuration or MCP ID already exists |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
415 |
Unsupported media type |
- |
500 |
Internal server error |
- |
delete_agent_keys
delete_agent_keys(key_ids)
Deletes agent keys.
Deletes agent keys.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
key_ids = ['key_ids_example'] # List[str] | Ids of keys to be deleted.
try:
# Deletes agent keys.
await api_instance.delete_agent_keys(key_ids)
except Exception as e:
print("Exception when calling AgentsApi->delete_agent_keys: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
key_ids |
Ids of keys to be deleted. |
Return type
void (empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
204 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
delete_agent_tool_association
Count delete_agent_tool_association(associate_ids)
Deletes agent tool key associations.
Deletes agent tool key associations given a list of associate ids belonging to the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.count import Count
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
associate_ids = ['associate_ids_example'] # List[str] | The unique identifiers of tool associations to be deleted.
try:
# Deletes agent tool key associations.
api_response = await api_instance.delete_agent_tool_association(associate_ids)
print("The response of AgentsApi->delete_agent_tool_association:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_agent_tool_association: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
associate_ids |
The unique identifiers of tool associations to be deleted. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
delete_agent_tool_preference
delete_agent_tool_preference()
Deletes the agent tool preferences for the user.
Deletes the agent tool preferences for the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Deletes the agent tool preferences for the user.
await api_instance.delete_agent_tool_preference()
except Exception as e:
print("Exception when calling AgentsApi->delete_agent_tool_preference: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
void (empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
204 |
Successful operation |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
delete_custom_agent
Count delete_custom_agent(agent_ids)
Deletes custom agents
Deletes custom agents given a list of agent ids belonging to the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.count import Count
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
agent_ids = ['agent_ids_example'] # List[str] | The unique identifiers of agents to be deleted.
try:
# Deletes custom agents
api_response = await api_instance.delete_custom_agent(agent_ids)
print("The response of AgentsApi->delete_custom_agent:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_custom_agent: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
agent_ids |
The unique identifiers of agents to be deleted. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
delete_custom_agent_key_associations
DeleteCustomAgentKeyAssociationsResponse delete_custom_agent_key_associations(association_ids)
Deletes custom agent key associations.
Deletes custom agent key associations given a list of association ids belonging to the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.delete_custom_agent_key_associations_response import DeleteCustomAgentKeyAssociationsResponse
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
association_ids = ['association_ids_example'] # List[str] | The unique identifiers of associations to be deleted.
try:
# Deletes custom agent key associations.
api_response = await api_instance.delete_custom_agent_key_associations(association_ids)
print("The response of AgentsApi->delete_custom_agent_key_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_custom_agent_key_associations: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
association_ids |
The unique identifiers of associations to be deleted. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
delete_custom_agent_tool
Count delete_custom_agent_tool(tool_ids)
Deletes custom agent tools
Deletes custom agent tool given a list of tool ids belonging to the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.count import Count
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
tool_ids = ['tool_ids_example'] # List[str] | The unique identifiers of tools to be deleted.
try:
# Deletes custom agent tools
api_response = await api_instance.delete_custom_agent_tool(tool_ids)
print("The response of AgentsApi->delete_custom_agent_tool:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_custom_agent_tool: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
tool_ids |
The unique identifiers of tools to be deleted. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
delete_custom_agent_tool_associations
DeleteCustomAgentToolAssociationsResponse delete_custom_agent_tool_associations(association_ids)
Deletes custom agent tool associations.
Deletes custom agent tool associations given a list of association ids belonging to the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.delete_custom_agent_tool_associations_response import DeleteCustomAgentToolAssociationsResponse
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
association_ids = ['association_ids_example'] # List[str] | The unique identifiers of associations to be deleted.
try:
# Deletes custom agent tool associations.
api_response = await api_instance.delete_custom_agent_tool_associations(association_ids)
print("The response of AgentsApi->delete_custom_agent_tool_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_custom_agent_tool_associations: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
association_ids |
The unique identifiers of associations to be deleted. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
delete_library_skill
object delete_library_skill(skill_id)
Remove a skill from the library
Removes a published skill from the shared library. Requires the ManageLibrary permission (admins hold it by default), which covers every entry regardless of who published it. Does not affect users who have already added the skill.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
skill_id = 'skill_id_example' # str |
try:
# Remove a skill from the library
api_response = await api_instance.delete_library_skill(skill_id)
print("The response of AgentsApi->delete_library_skill:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_library_skill: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
skill_id |
str |
Return type
object
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Library skill deleted successfully |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
delete_skills
Count delete_skills(delete_skills_request)
Deletes agent skills.
Delete agent skills given a list of skill ids belonging to the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.count import Count
from h2ogpte.rest_async.models.delete_skills_request import DeleteSkillsRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
delete_skills_request = h2ogpte.rest_async.DeleteSkillsRequest() # DeleteSkillsRequest |
try:
# Deletes agent skills.
api_response = await api_instance.delete_skills(delete_skills_request)
print("The response of AgentsApi->delete_skills:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_skills: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
delete_skills_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
403 |
Forbidden |
- |
500 |
Internal server error |
- |
delete_user_builtin_mcp
DeleteUserBuiltinMcp200Response delete_user_builtin_mcp(mcp_id)
Delete a custom builtin MCP
Deletes a published MCP from the library. Requires the ManageLibrary permission (admins hold it by default), which covers every entry regardless of who published it.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.delete_user_builtin_mcp200_response import DeleteUserBuiltinMcp200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
mcp_id = 'mcp_id_example' # str | The MCP identifier to delete
try:
# Delete a custom builtin MCP
api_response = await api_instance.delete_user_builtin_mcp(mcp_id)
print("The response of AgentsApi->delete_user_builtin_mcp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->delete_user_builtin_mcp: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
mcp_id |
str |
The MCP identifier to delete |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
MCP successfully deleted |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
MCP not found |
- |
500 |
Internal server error |
- |
download_builtin_skill_file
bytearray download_builtin_skill_file(skill_id)
Download a library skill zip
Streams the zip for a library skill. Predefined skills are materialized from the in-process registry; admin-uploaded skills are streamed directly from object storage so the zip bytes never sit in lang or mux memory.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
skill_id = 'skill_id_example' # str |
try:
# Download a library skill zip
api_response = await api_instance.download_builtin_skill_file(skill_id)
print("The response of AgentsApi->download_builtin_skill_file:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->download_builtin_skill_file: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
skill_id |
str |
Return type
bytearray
HTTP request headers
Content-Type: Not defined
Accept: application/octet-stream, application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Zip file |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
download_custom_agent
bytearray download_custom_agent(agent_id)
Download custom agent zip file
Downloads the zip file associated with a custom agent owned by the current user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
agent_id = 'agent_id_example' # str | The unique identifier of the agent whose zip file should be downloaded.
try:
# Download custom agent zip file
api_response = await api_instance.download_custom_agent(agent_id)
print("The response of AgentsApi->download_custom_agent:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->download_custom_agent: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
agent_id |
str |
The unique identifier of the agent whose zip file should be downloaded. |
Return type
bytearray
HTTP request headers
Content-Type: Not defined
Accept: application/octet-stream, application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
File download successful |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
download_custom_agent_tool
bytearray download_custom_agent_tool(tool_id)
Download custom agent tool file
Downloads the file associated with a custom agent tool owned by the current user. Only local_mcp, browser_action, and general_code tool types support file download.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
tool_id = 'tool_id_example' # str | The unique identifier of the tool whose file should be downloaded.
try:
# Download custom agent tool file
api_response = await api_instance.download_custom_agent_tool(tool_id)
print("The response of AgentsApi->download_custom_agent_tool:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->download_custom_agent_tool: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
tool_id |
str |
The unique identifier of the tool whose file should be downloaded. |
Return type
bytearray
HTTP request headers
Content-Type: Not defined
Accept: application/octet-stream, application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
File download successful |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
get_agent_suggestions
List[CustomAgentSuggestion] get_agent_suggestions(agent_id)
Get MCP tool suggestions for a custom agent.
Returns suggested MCP tool configurations for a custom agent based on its metadata. Helps users identify and configure required tools.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.custom_agent_suggestion import CustomAgentSuggestion
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
agent_id = 'agent_id_example' # str | The unique identifier of the custom agent.
try:
# Get MCP tool suggestions for a custom agent.
api_response = await api_instance.get_agent_suggestions(agent_id)
print("The response of AgentsApi->get_agent_suggestions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->get_agent_suggestions: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
agent_id |
str |
The unique identifier of the custom agent. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
get_all_agents
List[Agent] get_all_agents()
Get all agents (built-in and custom)
Get all agents (both built-in and custom agents) with unified structure
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent import Agent
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Get all agents (built-in and custom)
api_response = await api_instance.get_all_agents()
print("The response of AgentsApi->get_all_agents:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->get_all_agents: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
get_custom_agent
CustomAgentDetail get_custom_agent(agent_id)
Get a single custom agent
Get a single custom agent by ID for the current user
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.custom_agent_detail import CustomAgentDetail
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
agent_id = 'agent_id_example' # str | The unique identifier of the agent to retrieve.
try:
# Get a single custom agent
api_response = await api_instance.get_custom_agent(agent_id)
print("The response of AgentsApi->get_custom_agent:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->get_custom_agent: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
agent_id |
str |
The unique identifier of the agent to retrieve. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
get_custom_agent_tool
GetCustomAgentTool200Response get_custom_agent_tool(tool_id)
Get a single custom agent tool
Get a single custom agent tool by ID for the current user
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.get_custom_agent_tool200_response import GetCustomAgentTool200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
tool_id = 'tool_id_example' # str | The unique identifier of the tool to retrieve.
try:
# Get a single custom agent tool
api_response = await api_instance.get_custom_agent_tool(tool_id)
print("The response of AgentsApi->get_custom_agent_tool:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->get_custom_agent_tool: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
tool_id |
str |
The unique identifier of the tool to retrieve. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
get_mcp_sdk_options
GetMcpSdkOptions200Response get_mcp_sdk_options()
Get Claude SDK options schema
Returns the schema of available Claude SDK options that can be configured for MCP tool runners. Includes permission modes, effort levels, available betas, hook actions, and limitations.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.get_mcp_sdk_options200_response import GetMcpSdkOptions200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Get Claude SDK options schema
api_response = await api_instance.get_mcp_sdk_options()
print("The response of AgentsApi->get_mcp_sdk_options:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->get_mcp_sdk_options: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
inspect_mcp_tool
InspectMcpTool200Response inspect_mcp_tool(inspect_mcp_tool_request)
Unified MCP tool inspection
Unified endpoint for inspecting MCP tools. Supports three modes: (1) tool_id — inspect an existing local or remote MCP tool by database ID, (2) servers — inspect one or more remote MCP server configs (pre-add), (3) file_name + file_data_base64 — inspect an uploaded package (pre-add). Returns a list of per-server inspection results.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.inspect_mcp_tool200_response import InspectMcpTool200Response
from h2ogpte.rest_async.models.inspect_mcp_tool_request import InspectMcpToolRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
inspect_mcp_tool_request = h2ogpte.rest_async.InspectMcpToolRequest() # InspectMcpToolRequest |
try:
# Unified MCP tool inspection
api_response = await api_instance.inspect_mcp_tool(inspect_mcp_tool_request)
print("The response of AgentsApi->inspect_mcp_tool:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->inspect_mcp_tool: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
inspect_mcp_tool_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Unified inspection result |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
launch_custom_agent_tool
LaunchCustomAgentTool200Response launch_custom_agent_tool(tool_id)
Launches a custom agent tool via CodeAPI
Launches a custom agent tool using CodeAPI and stores the endpoint URL.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.launch_custom_agent_tool200_response import LaunchCustomAgentTool200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
tool_id = 'tool_id_example' # str | The unique identifier of the tool to launch.
try:
# Launches a custom agent tool via CodeAPI
api_response = await api_instance.launch_custom_agent_tool(tool_id)
print("The response of AgentsApi->launch_custom_agent_tool:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->launch_custom_agent_tool: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
tool_id |
str |
The unique identifier of the tool to launch. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
list_agent_directory_stats
List[AgentServerDirectoryStatsPerAgentChatSession] list_agent_directory_stats(offset=offset, limit=limit, filter_text=filter_text)
Lists agent directory stats across all agent chat sessions.
Lists agent directory stats across all agent chat sessions.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_server_directory_stats_per_agent_chat_session import AgentServerDirectoryStatsPerAgentChatSession
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
offset = 0 # int | How many agent chat sessions to skip before returning. (optional) (default to 0)
limit = 100 # int | How many agent chat sessions to return. (optional) (default to 100)
filter_text = 'filter_text_example' # str | Applied text filter. (optional)
try:
# Lists agent directory stats across all agent chat sessions.
api_response = await api_instance.list_agent_directory_stats(offset=offset, limit=limit, filter_text=filter_text)
print("The response of AgentsApi->list_agent_directory_stats:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_agent_directory_stats: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
offset |
int |
How many agent chat sessions to skip before returning. |
[optional] [default to 0] |
limit |
int |
How many agent chat sessions to return. |
[optional] [default to 100] |
filter_text |
str |
Applied text filter. |
[optional] |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
list_agent_key_tool_associations
List[AgentToolKeyAssociations] list_agent_key_tool_associations()
Returns a list of tools and the user’s associated keys.
Returns a list of tools and the user’s associated keys.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_tool_key_associations import AgentToolKeyAssociations
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Returns a list of tools and the user's associated keys.
api_response = await api_instance.list_agent_key_tool_associations()
print("The response of AgentsApi->list_agent_key_tool_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_agent_key_tool_associations: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_agent_keys
List[AgentKey] list_agent_keys()
Lists agent keys.
Lists agent keys.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_key import AgentKey
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Lists agent keys.
api_response = await api_instance.list_agent_keys()
print("The response of AgentsApi->list_agent_keys:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_agent_keys: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_agent_tool_preference
List[str] list_agent_tool_preference()
Lists the agent tool preference for the user.
Lists the agent tool preference for the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Lists the agent tool preference for the user.
api_response = await api_instance.list_agent_tool_preference()
print("The response of AgentsApi->list_agent_tool_preference:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_agent_tool_preference: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
List[str]
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_agent_tools
List[AgentToolSpec] list_agent_tools()
Lists agent tools present on the system.
Lists agent tools present on the system.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_tool_spec import AgentToolSpec
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Lists agent tools present on the system.
api_response = await api_instance.list_agent_tools()
print("The response of AgentsApi->list_agent_tools:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_agent_tools: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_builtin_mcps
ListBuiltinMcps200Response list_builtin_mcps()
Lists built-in MCPs
Returns the list of built-in predefined MCPs (Model Context Protocol servers) available for use. Includes information about which MCPs are already added as tools and which OAuth apps are connected.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.list_builtin_mcps200_response import ListBuiltinMcps200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Lists built-in MCPs
api_response = await api_instance.list_builtin_mcps()
print("The response of AgentsApi->list_builtin_mcps:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_builtin_mcps: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_builtin_skills
List[ListBuiltinSkills200ResponseInner] list_builtin_skills()
Lists predefined skills
Returns the list of predefined skills available for use. Includes information about which skills are already added, plus install_count, star_count, and is_starred_by_me.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.list_builtin_skills200_response_inner import ListBuiltinSkills200ResponseInner
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Lists predefined skills
api_response = await api_instance.list_builtin_skills()
print("The response of AgentsApi->list_builtin_skills:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_builtin_skills: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_custom_agent_key_associations
List[CustomAgentKeyAssociation] list_custom_agent_key_associations(agent_id=agent_id)
Returns a list of custom agent key associations.
Returns a list of custom agent key associations, optionally filtered by agent_id.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.custom_agent_key_association import CustomAgentKeyAssociation
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
agent_id = 'agent_id_example' # str | Filter by custom agent UUID (optional)
try:
# Returns a list of custom agent key associations.
api_response = await api_instance.list_custom_agent_key_associations(agent_id=agent_id)
print("The response of AgentsApi->list_custom_agent_key_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_custom_agent_key_associations: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
agent_id |
str |
Filter by custom agent UUID |
[optional] |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_custom_agent_tool_associations
List[CustomAgentToolAssociation] list_custom_agent_tool_associations(agent_id=agent_id, agent_name=agent_name)
Returns a list of custom agent tool associations.
Returns a list of custom agent tool associations, optionally filtered by agent_id or agent_name.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.custom_agent_tool_association import CustomAgentToolAssociation
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
agent_id = 'agent_id_example' # str | Filter by custom agent UUID (optional)
agent_name = 'agent_name_example' # str | Filter by custom agent name (optional)
try:
# Returns a list of custom agent tool associations.
api_response = await api_instance.list_custom_agent_tool_associations(agent_id=agent_id, agent_name=agent_name)
print("The response of AgentsApi->list_custom_agent_tool_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_custom_agent_tool_associations: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
agent_id |
str |
Filter by custom agent UUID |
[optional] |
agent_name |
str |
Filter by custom agent name |
[optional] |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_custom_agent_tools
List[ListCustomAgentTools200ResponseInner] list_custom_agent_tools()
List Custom Agent Tools
List all custom agent tools for the current user
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.list_custom_agent_tools200_response_inner import ListCustomAgentTools200ResponseInner
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# List Custom Agent Tools
api_response = await api_instance.list_custom_agent_tools()
print("The response of AgentsApi->list_custom_agent_tools:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_custom_agent_tools: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_custom_agents
List[CustomAgentDetail] list_custom_agents()
List Custom Agents
List all custom agents for the current user
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.custom_agent_detail import CustomAgentDetail
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# List Custom Agents
api_response = await api_instance.list_custom_agents()
print("The response of AgentsApi->list_custom_agents:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_custom_agents: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_mcp_tools
ListMcpTools200Response list_mcp_tools(list_mcp_tools_request)
List tools from MCP servers
Lists tools from configured MCP servers, optionally filtered by config type and server names.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.list_mcp_tools200_response import ListMcpTools200Response
from h2ogpte.rest_async.models.list_mcp_tools_request import ListMcpToolsRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
list_mcp_tools_request = h2ogpte.rest_async.ListMcpToolsRequest() # ListMcpToolsRequest |
try:
# List tools from MCP servers
api_response = await api_instance.list_mcp_tools(list_mcp_tools_request)
print("The response of AgentsApi->list_mcp_tools:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_mcp_tools: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
list_mcp_tools_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
list_skill_associations
List[SkillAssociations] list_skill_associations()
Lists the current user’s skill env-var/key/tool associations.
For each skill, the env-var→agent-key bindings and the tools that receive the skill’s env vars.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.skill_associations import SkillAssociations
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
try:
# Lists the current user's skill env-var/key/tool associations.
api_response = await api_instance.list_skill_associations()
print("The response of AgentsApi->list_skill_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_skill_associations: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
403 |
Forbidden |
- |
500 |
Internal server error |
- |
list_skills
List[AgentSkill] list_skills(offset=offset, limit=limit, query=query)
Lists agent skills for the current user.
List all agent skills for the current user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_skill import AgentSkill
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
offset = 0 # int | How many skills to skip before returning. (optional) (default to 0)
limit = 100 # int | How many skills to return. (optional) (default to 100)
query = 'query_example' # str | Case-insensitive substring filter on the skill name. (optional)
try:
# Lists agent skills for the current user.
api_response = await api_instance.list_skills(offset=offset, limit=limit, query=query)
print("The response of AgentsApi->list_skills:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->list_skills: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
offset |
int |
How many skills to skip before returning. |
[optional] [default to 0] |
limit |
int |
How many skills to return. |
[optional] [default to 100] |
query |
str |
Case-insensitive substring filter on the skill name. |
[optional] |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
* X-Total-Count - Total number of skills for the user (before pagination). |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
403 |
Forbidden |
- |
500 |
Internal server error |
- |
remove_admin_mcp_logo
DeleteUserBuiltinMcp200Response remove_admin_mcp_logo(mcp_id)
Remove MCP logo
Removes the logo from a published MCP. Requires the ManageLibrary permission (admins hold it by default).
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.delete_user_builtin_mcp200_response import DeleteUserBuiltinMcp200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
mcp_id = 'mcp_id_example' # str | The MCP identifier
try:
# Remove MCP logo
api_response = await api_instance.remove_admin_mcp_logo(mcp_id)
print("The response of AgentsApi->remove_admin_mcp_logo:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->remove_admin_mcp_logo: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
mcp_id |
str |
The MCP identifier |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Logo successfully removed |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
MCP not found |
- |
500 |
Internal server error |
- |
remove_custom_agent_tool_from_codeapi
RemoveCustomAgentToolFromCodeapi200Response remove_custom_agent_tool_from_codeapi(tool_id)
Removes a custom agent tool from CodeAPI
Terminates the CodeAPI job for a custom agent tool and clears its CodeAPI state.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.remove_custom_agent_tool_from_codeapi200_response import RemoveCustomAgentToolFromCodeapi200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
tool_id = 'tool_id_example' # str | The unique identifier of the tool to remove from CodeAPI.
try:
# Removes a custom agent tool from CodeAPI
api_response = await api_instance.remove_custom_agent_tool_from_codeapi(tool_id)
print("The response of AgentsApi->remove_custom_agent_tool_from_codeapi:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->remove_custom_agent_tool_from_codeapi: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
tool_id |
str |
The unique identifier of the tool to remove from CodeAPI. |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
set_agent_skill_preference
set_agent_skill_preference(set_agent_skill_preference_request)
Enable or disable the given agent skills for the user.
Sets the enabled flag for the listed skill IDs. Only the skills named in the request are changed; skills not listed are left untouched.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.set_agent_skill_preference_request import SetAgentSkillPreferenceRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
set_agent_skill_preference_request = h2ogpte.rest_async.SetAgentSkillPreferenceRequest() # SetAgentSkillPreferenceRequest |
try:
# Enable or disable the given agent skills for the user.
await api_instance.set_agent_skill_preference(set_agent_skill_preference_request)
except Exception as e:
print("Exception when calling AgentsApi->set_agent_skill_preference: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
set_agent_skill_preference_request |
Return type
void (empty response body)
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
204 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
403 |
Forbidden |
- |
500 |
Internal server error |
- |
set_skill_associations
SetSkillAssociationsResponse set_skill_associations(set_skill_associations_request)
Sets a skill’s env-var/key associations and target tools.
Associates the skill’s declared env vars (from envs.json) with agent keys and selects which executors receive those env vars when the skill is selected. Only python and shell are supported; both are selected when none are given.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.set_skill_associations_request import SetSkillAssociationsRequest
from h2ogpte.rest_async.models.set_skill_associations_response import SetSkillAssociationsResponse
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
set_skill_associations_request = h2ogpte.rest_async.SetSkillAssociationsRequest() # SetSkillAssociationsRequest |
try:
# Sets a skill's env-var/key associations and target tools.
api_response = await api_instance.set_skill_associations(set_skill_associations_request)
print("The response of AgentsApi->set_skill_associations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->set_skill_associations: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
set_skill_associations_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
403 |
Forbidden |
- |
500 |
Internal server error |
- |
star_library_item
StarLibraryItem200Response star_library_item(item_kind, item_id)
Star a library item (skill or mcp)
Marks the calling user as having starred this library item. Only users who have already installed the item are eligible — calls from non-installed users return 403. Idempotent: re-starring is a no-op. Returns the new aggregate star_count.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.star_library_item200_response import StarLibraryItem200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
item_kind = 'item_kind_example' # str |
item_id = 'item_id_example' # str |
try:
# Star a library item (skill or mcp)
api_response = await api_instance.star_library_item(item_kind, item_id)
print("The response of AgentsApi->star_library_item:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->star_library_item: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
item_kind |
str |
||
item_id |
str |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Star recorded |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
403 |
Caller has not installed this item; not eligible to star. |
- |
500 |
Internal server error |
- |
unstar_library_item
StarLibraryItem200Response unstar_library_item(item_kind, item_id)
Remove the caller’s star on a library item
Idempotent: unstarring an item the caller has not starred is a no-op. Returns the new aggregate star_count.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.star_library_item200_response import StarLibraryItem200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
item_kind = 'item_kind_example' # str |
item_id = 'item_id_example' # str |
try:
# Remove the caller's star on a library item
api_response = await api_instance.unstar_library_item(item_kind, item_id)
print("The response of AgentsApi->unstar_library_item:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->unstar_library_item: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
item_kind |
str |
||
item_id |
str |
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Star removed (or already absent) |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
update_admin_mcp_logo
UpdateAdminMcpLogo200Response update_admin_mcp_logo(mcp_id, file)
Update MCP logo
Updates the logo for a published MCP. Requires the ManageLibrary permission (admins hold it by default).
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.update_admin_mcp_logo200_response import UpdateAdminMcpLogo200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
mcp_id = 'mcp_id_example' # str | The MCP identifier to update
file = None # bytearray | Logo image file to upload
try:
# Update MCP logo
api_response = await api_instance.update_admin_mcp_logo(mcp_id, file)
print("The response of AgentsApi->update_admin_mcp_logo:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->update_admin_mcp_logo: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
mcp_id |
str |
The MCP identifier to update |
|
file |
bytearray |
Logo image file to upload |
Return type
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Logo successfully updated |
- |
400 |
Bad request - Invalid file |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
MCP not found |
- |
415 |
Unsupported media type |
- |
500 |
Internal server error |
- |
update_agent_key
AgentKey update_agent_key(key_id, update_agent_key_request)
Updates agent key.
Updates agent key.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.agent_key import AgentKey
from h2ogpte.rest_async.models.update_agent_key_request import UpdateAgentKeyRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
key_id = 'key_id_example' # str | Id of the key to be updated.
update_agent_key_request = h2ogpte.rest_async.UpdateAgentKeyRequest() # UpdateAgentKeyRequest |
try:
# Updates agent key.
api_response = await api_instance.update_agent_key(key_id, update_agent_key_request)
print("The response of AgentsApi->update_agent_key:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->update_agent_key: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
key_id |
str |
Id of the key to be updated. |
|
update_agent_key_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
409 |
Conflict |
- |
500 |
Internal server error |
- |
update_agent_tool_preference
update_agent_tool_preference(update_agent_tool_preference_request)
Creates or updates the agent tool preference for the user.
Creates or updates the agent tool preference for the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.update_agent_tool_preference_request import UpdateAgentToolPreferenceRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
update_agent_tool_preference_request = h2ogpte.rest_async.UpdateAgentToolPreferenceRequest() # UpdateAgentToolPreferenceRequest |
try:
# Creates or updates the agent tool preference for the user.
await api_instance.update_agent_tool_preference(update_agent_tool_preference_request)
except Exception as e:
print("Exception when calling AgentsApi->update_agent_tool_preference: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
update_agent_tool_preference_request |
Return type
void (empty response body)
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
204 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
500 |
Internal server error |
- |
update_custom_agent
UpdateCustomAgent200Response update_custom_agent(agent_id, update_custom_agent_request)
Updates a custom agent
Updates a custom agent given an agent id belonging to the user.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.update_custom_agent200_response import UpdateCustomAgent200Response
from h2ogpte.rest_async.models.update_custom_agent_request import UpdateCustomAgentRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
agent_id = 'agent_id_example' # str | The unique identifier of the agent to be updated.
update_custom_agent_request = h2ogpte.rest_async.UpdateCustomAgentRequest() # UpdateCustomAgentRequest |
try:
# Updates a custom agent
api_response = await api_instance.update_custom_agent(agent_id, update_custom_agent_request)
print("The response of AgentsApi->update_custom_agent:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->update_custom_agent: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
agent_id |
str |
The unique identifier of the agent to be updated. |
|
update_custom_agent_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
update_custom_agent_tool
UpdateCustomAgentTool200Response update_custom_agent_tool(tool_id, tool_args, file=file, filename=filename)
Updates a custom agent tool
Updates a custom agent tool given a tool id belonging to the user. Two request body forms are accepted: - multipart/form-data — required to upload a file; also accepted for metadata-only updates (just send tool_args). This is the default content type the generated SDK clients use. - application/json — legacy metadata-only body ({ \"tool_args\": ... }) retained for backward compatibility with clients written before file upload was supported. JSON bodies cannot carry a file upload.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.update_custom_agent_tool200_response import UpdateCustomAgentTool200Response
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
tool_id = 'tool_id_example' # str | The unique identifier of the tool to be updated.
tool_args = 'tool_args_example' # str | JSON string containing the new arguments for the custom agent tool
file = None # bytearray | Optional file to replace the existing tool file. When provided, the old file will be deleted from object storage. (optional)
filename = 'filename_example' # str | Optional name of the file being uploaded. Must be provided together with file. (optional)
try:
# Updates a custom agent tool
api_response = await api_instance.update_custom_agent_tool(tool_id, tool_args, file=file, filename=filename)
print("The response of AgentsApi->update_custom_agent_tool:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->update_custom_agent_tool: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
tool_id |
str |
The unique identifier of the tool to be updated. |
|
tool_args |
str |
JSON string containing the new arguments for the custom agent tool |
|
file |
bytearray |
Optional file to replace the existing tool file. When provided, the old file will be deleted from object storage. |
[optional] |
filename |
str |
Optional name of the file being uploaded. Must be provided together with file. |
[optional] |
Return type
HTTP request headers
Content-Type: multipart/form-data, application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
Successful operation |
- |
400 |
Bad request |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
Not found |
- |
500 |
Internal server error |
- |
update_user_builtin_mcp
UpdateUserBuiltinMcp200Response update_user_builtin_mcp(mcp_id, update_user_builtin_mcp_request)
Update a custom builtin MCP
Updates a previously-published MCP configuration. Requires the ManageLibrary permission (admins hold it by default), which covers every entry regardless of who published it.
Example
Bearer Authentication (bearerAuth):
import h2ogpte.rest_async
from h2ogpte.rest_async.models.update_user_builtin_mcp200_response import UpdateUserBuiltinMcp200Response
from h2ogpte.rest_async.models.update_user_builtin_mcp_request import UpdateUserBuiltinMcpRequest
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
host = "https://h2ogpte.genai.h2o.ai/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = h2ogpte.rest_async.AgentsApi(api_client)
mcp_id = 'mcp_id_example' # str | The MCP identifier to update
update_user_builtin_mcp_request = h2ogpte.rest_async.UpdateUserBuiltinMcpRequest() # UpdateUserBuiltinMcpRequest |
try:
# Update a custom builtin MCP
api_response = await api_instance.update_user_builtin_mcp(mcp_id, update_user_builtin_mcp_request)
print("The response of AgentsApi->update_user_builtin_mcp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentsApi->update_user_builtin_mcp: %s\n" % e)
Parameters
Name |
Type |
Description |
Notes |
|---|---|---|---|
mcp_id |
str |
The MCP identifier to update |
|
update_user_builtin_mcp_request |
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
|---|---|---|
200 |
MCP successfully updated |
- |
400 |
Bad request - Invalid configuration |
- |
401 |
Unauthorized - Invalid or missing API key |
- |
404 |
MCP not found |
- |
500 |
Internal server error |
- |