agntcy_acp package¶
Subpackages¶
- agntcy_acp.langgraph package
- agntcy_acp.manifest package
- agntcy_acp.models package
- Module contents
AgentAgentACPDescriptorAgentACPSpecAgentACPSpec.capabilitiesAgentACPSpec.configAgentACPSpec.custom_streaming_updateAgentACPSpec.from_dict()AgentACPSpec.from_json()AgentACPSpec.inputAgentACPSpec.interruptsAgentACPSpec.model_configAgentACPSpec.outputAgentACPSpec.thread_stateAgentACPSpec.to_dict()AgentACPSpec.to_json()AgentACPSpec.to_str()
AgentACPSpecInterruptsInnerAgentACPSpecInterruptsInner.from_dict()AgentACPSpecInterruptsInner.from_json()AgentACPSpecInterruptsInner.interrupt_payloadAgentACPSpecInterruptsInner.interrupt_typeAgentACPSpecInterruptsInner.model_configAgentACPSpecInterruptsInner.resume_payloadAgentACPSpecInterruptsInner.to_dict()AgentACPSpecInterruptsInner.to_json()AgentACPSpecInterruptsInner.to_str()
AgentCapabilitiesAgentConnectProtocolAgentDependencyAgentDeploymentAgentManifestAgentMetadataAgentRefAgentSearchRequestCapabilitiesConfigConfigSchemaContentContentOneOfInnerContentOneOfInner.actual_instanceContentOneOfInner.actual_instance_must_validate_anyof()ContentOneOfInner.any_of_schemasContentOneOfInner.anyof_schema_1_validatorContentOneOfInner.anyof_schema_2_validatorContentOneOfInner.from_dict()ContentOneOfInner.from_json()ContentOneOfInner.model_configContentOneOfInner.to_dict()ContentOneOfInner.to_json()ContentOneOfInner.to_str()
CustomRunResultUpdateCustomRunResultUpdate.from_dict()CustomRunResultUpdate.from_json()CustomRunResultUpdate.model_configCustomRunResultUpdate.run_idCustomRunResultUpdate.statusCustomRunResultUpdate.to_dict()CustomRunResultUpdate.to_json()CustomRunResultUpdate.to_str()CustomRunResultUpdate.typeCustomRunResultUpdate.type_validate_enum()CustomRunResultUpdate.update
DeploymentOptionsDockerDeploymentEnvVarEnvVarValuesErrorResponseFrameworkTypeInputSchemaInterruptInterruptPayloadSchemaLangGraphConfigLlamaIndexConfigMessageMessageAnyBlockMessageTextBlockOutputSchemaRemoteServiceDeploymentResumePayloadSchemaRunRunCreateRunCreate.after_secondsRunCreate.agent_idRunCreate.configRunCreate.from_dict()RunCreate.from_json()RunCreate.inputRunCreate.metadataRunCreate.model_configRunCreate.multitask_strategyRunCreate.multitask_strategy_validate_enum()RunCreate.on_disconnectRunCreate.on_disconnect_validate_enum()RunCreate.stream_modeRunCreate.to_dict()RunCreate.to_json()RunCreate.to_str()RunCreate.webhook
RunCreateStatefulRunCreateStateful.after_secondsRunCreateStateful.agent_idRunCreateStateful.configRunCreateStateful.from_dict()RunCreateStateful.from_json()RunCreateStateful.if_not_existsRunCreateStateful.if_not_exists_validate_enum()RunCreateStateful.inputRunCreateStateful.metadataRunCreateStateful.model_configRunCreateStateful.multitask_strategyRunCreateStateful.multitask_strategy_validate_enum()RunCreateStateful.on_disconnectRunCreateStateful.on_disconnect_validate_enum()RunCreateStateful.stream_modeRunCreateStateful.stream_subgraphsRunCreateStateful.to_dict()RunCreateStateful.to_json()RunCreateStateful.to_str()RunCreateStateful.webhook
RunCreateStatelessRunCreateStateless.after_secondsRunCreateStateless.agent_idRunCreateStateless.configRunCreateStateless.from_dict()RunCreateStateless.from_json()RunCreateStateless.inputRunCreateStateless.metadataRunCreateStateless.model_configRunCreateStateless.multitask_strategyRunCreateStateless.multitask_strategy_validate_enum()RunCreateStateless.on_completionRunCreateStateless.on_completion_validate_enum()RunCreateStateless.on_disconnectRunCreateStateless.on_disconnect_validate_enum()RunCreateStateless.stream_modeRunCreateStateless.to_dict()RunCreateStateless.to_json()RunCreateStateless.to_str()RunCreateStateless.webhook
RunErrorRunInterruptRunOutputRunOutput.actual_instanceRunOutput.actual_instance_must_validate_oneof()RunOutput.discriminator_value_class_mapRunOutput.from_dict()RunOutput.from_json()RunOutput.model_configRunOutput.one_of_schemasRunOutput.oneof_schema_1_validatorRunOutput.oneof_schema_2_validatorRunOutput.oneof_schema_3_validatorRunOutput.to_dict()RunOutput.to_json()RunOutput.to_str()
RunOutputStreamRunResultRunSearchRequestRunStatefulRunStatelessRunStatusRunWaitResponseStatefulRunWaitResponseStatelessSecuritySchemeSourceCodeDeploymentStreamEventPayloadStreamEventPayload.actual_instanceStreamEventPayload.actual_instance_must_validate_oneof()StreamEventPayload.discriminator_value_class_mapStreamEventPayload.from_dict()StreamEventPayload.from_json()StreamEventPayload.model_configStreamEventPayload.one_of_schemasStreamEventPayload.oneof_schema_1_validatorStreamEventPayload.oneof_schema_2_validatorStreamEventPayload.oneof_schema_3_validatorStreamEventPayload.oneof_schema_4_validatorStreamEventPayload.to_dict()StreamEventPayload.to_json()StreamEventPayload.to_str()
StreamModeStreamMode.actual_instanceStreamMode.actual_instance_must_validate_anyof()StreamMode.any_of_schemasStreamMode.anyof_schema_1_validatorStreamMode.anyof_schema_2_validatorStreamMode.from_dict()StreamMode.from_json()StreamMode.model_configStreamMode.to_dict()StreamMode.to_json()StreamMode.to_str()
StreamUpdateSchemaStreamingStreamingModeStreamingModesThreadThreadCheckpointThreadCreateThreadPatchThreadSearchRequestThreadSearchRequest.from_dict()ThreadSearchRequest.from_json()ThreadSearchRequest.limitThreadSearchRequest.metadataThreadSearchRequest.model_configThreadSearchRequest.offsetThreadSearchRequest.statusThreadSearchRequest.to_dict()ThreadSearchRequest.to_json()ThreadSearchRequest.to_str()ThreadSearchRequest.values
ThreadStateThreadStateSchemaThreadStatusValueRunErrorUpdateValueRunErrorUpdate.descriptionValueRunErrorUpdate.errcodeValueRunErrorUpdate.from_dict()ValueRunErrorUpdate.from_json()ValueRunErrorUpdate.model_configValueRunErrorUpdate.run_idValueRunErrorUpdate.statusValueRunErrorUpdate.to_dict()ValueRunErrorUpdate.to_json()ValueRunErrorUpdate.to_str()ValueRunErrorUpdate.typeValueRunErrorUpdate.type_validate_enum()
ValueRunInterruptUpdateValueRunInterruptUpdate.from_dict()ValueRunInterruptUpdate.from_json()ValueRunInterruptUpdate.interruptValueRunInterruptUpdate.model_configValueRunInterruptUpdate.run_idValueRunInterruptUpdate.statusValueRunInterruptUpdate.to_dict()ValueRunInterruptUpdate.to_json()ValueRunInterruptUpdate.to_str()ValueRunInterruptUpdate.typeValueRunInterruptUpdate.type_validate_enum()
ValueRunResultUpdateValueRunResultUpdate.from_dict()ValueRunResultUpdate.from_json()ValueRunResultUpdate.messagesValueRunResultUpdate.model_configValueRunResultUpdate.run_idValueRunResultUpdate.statusValueRunResultUpdate.to_dict()ValueRunResultUpdate.to_json()ValueRunResultUpdate.to_str()ValueRunResultUpdate.typeValueRunResultUpdate.type_validate_enum()ValueRunResultUpdate.values
- Module contents
Submodules¶
agntcy_acp.exceptions module¶
Module contents¶
- class agntcy_acp.ACPClient(api_client=None, configuration=None, manifest=None, stream_chunk_size=4096)[source]¶
Bases:
AgentsApi,StatelessRunsApi,ThreadsApi,ThreadRunsApiClient for ACP API.
- classmethod fromConfiguration(host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_variables=None, server_operation_variables=None, ssl_ca_cert=None, retries=None, timeout=None, ca_cert_data=None, *, debug=None)[source]¶
Construct an ACPClient object using configuration values. For example, with env_var_prefix=”MY_”, the default host parameter value would be looked up in the “MY_HOST” environment variable if not provided.
- Parameters:
env_var_prefix – String used as prefix for environment variable names.
- Returns:
ACP client object
- Return type:
- classmethod fromEnvPrefix(env_var_prefix, host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_variables=None, server_operation_variables=None, ssl_ca_cert=None, retries=None, timeout=None, ca_cert_data=None, *, debug=None)[source]¶
Construct an ACPClient object using environment variables as default source of the API client configuration values. For example, with env_var_prefix=”MY_”, the default host parameter value would be looked up in the “MY_HOST” environment variable if not provided.
- Parameters:
env_var_prefix (
str) – String used as prefix for environment variable names.- Returns:
ACP client object
- Return type:
- exception agntcy_acp.ApiAttributeError(msg, path_to_item=None)[source]¶
Bases:
OpenApiException,AttributeError
- class agntcy_acp.ApiClient(configuration=None, header_name=None, header_value=None, cookie=None)[source]¶
Bases:
objectGeneric API client for OpenAPI client library builds.
OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the OpenAPI templates.
- Parameters:
configuration – .Configuration object for this client
header_name – a header to pass when making calls to the API.
header_value – a header value to pass when making calls to the API.
cookie – a cookie to include in the header when making calls to the API
- NATIVE_TYPES_MAPPING = {'bool': <class 'bool'>, 'date': <class 'datetime.date'>, 'datetime': <class 'datetime.datetime'>, 'decimal': <class 'decimal.Decimal'>, 'float': <class 'float'>, 'int': <class 'int'>, 'long': <class 'int'>, 'object': <class 'object'>, 'str': <class 'str'>}¶
- PRIMITIVE_TYPES = (<class 'float'>, <class 'bool'>, <class 'bytes'>, <class 'str'>, <class 'int'>)¶
- call_api(method, url, header_params=None, body=None, post_params=None, _request_timeout=None)[source]¶
Makes the HTTP request (synchronous)
- Parameters:
method – Method to call.
url – Path to method endpoint.
header_params – Header parameters to be placed in the request header.
body – Request body.
dict (post_params) – Request post form parameters, for application/x-www-form-urlencoded, multipart/form-data.
_request_timeout – timeout setting for this request.
- Return type:
RESTResponse- Returns:
RESTResponse
- deserialize(response_text, response_type, content_type)[source]¶
Deserializes response into an object.
- Parameters:
response – RESTResponse object to be deserialized.
response_type (
str) – class literal for deserialized object, or string of class name.content_type (
Optional[str]) – content type of response.
- Returns:
deserialized object.
- files_parameters(files)[source]¶
Builds form parameters.
- Parameters:
files (
Dict[str,Union[str,bytes,List[str],List[bytes],Tuple[str,bytes]]]) – File parameters.- Returns:
Form parameters with files.
- classmethod get_default()[source]¶
Return new instance of ApiClient.
This method returns newly created, based on default constructor, object of ApiClient class or returns a copy of default ApiClient.
- Returns:
The ApiClient object.
- param_serialize(method, resource_path, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, auth_settings=None, collection_formats=None, _host=None, _request_auth=None)[source]¶
Builds the HTTP request params needed by the request.
- Parameters:
method – Method to call.
resource_path – Path to method endpoint.
path_params – Path parameters in the url.
query_params – Query parameters in the url.
header_params – Header parameters to be placed in the request header.
body – Request body.
dict (files) – Request post form parameters, for application/x-www-form-urlencoded, multipart/form-data.
list (auth_settings) – Auth Settings names for the request.
dict – key -> filename, value -> filepath, for multipart/form-data.
collection_formats – dict of collection formats for path, query, header, and post parameters.
_request_auth – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- Return type:
Tuple[str,str,Dict[str,str],Optional[str],List[str]]- Returns:
tuple of form (path, http_method, query_params, header_params, body, post_params, files)
- parameters_to_tuples(params, collection_formats)[source]¶
Get parameters as list of tuples, formatting collections.
- Parameters:
params – Parameters as dict or list of two-tuples
collection_formats (dict) – Parameter collection formats
- Returns:
Parameters as list of tuples, collections formatted
- parameters_to_url_query(params, collection_formats)[source]¶
Get parameters as list of tuples, formatting collections.
- Parameters:
params – Parameters as dict or list of two-tuples
collection_formats (dict) – Parameter collection formats
- Returns:
URL query string (e.g. a=Hello%20World&b=123)
- response_deserialize(response_data, response_types_map=None)[source]¶
Deserializes response into an object.
- Parameters:
response_data (
RESTResponse) – RESTResponse object to be deserialized.response_types_map (
Optional[Dict[str,TypeVar(T)]]) – dict of response types.
- Return type:
- Returns:
ApiResponse
- sanitize_for_serialization(obj)[source]¶
Builds a JSON POST object.
If obj is None, return None. If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict.
- Parameters:
obj – The data to serialize.
- Returns:
The serialized form of data.
- select_header_accept(accepts)[source]¶
Returns Accept based on an array of accepts provided.
- Parameters:
accepts (
List[str]) – List of headers.- Return type:
Optional[str]- Returns:
Accept (e.g. application/json).
- select_header_content_type(content_types)[source]¶
Returns Content-Type based on an array of content_types provided.
- Parameters:
content_types – List of content-types.
- Returns:
Content-Type (e.g. application/json).
- classmethod set_default(default)[source]¶
Set default instance of ApiClient.
It stores default ApiClient.
- Parameters:
default – object of ApiClient.
- update_params_for_auth(headers, queries, auth_settings, resource_path, method, body, request_auth=None)[source]¶
Updates header and query params based on authentication setting.
- Parameters:
headers – Header parameters dict to be updated.
queries – Query parameters tuple list to be updated.
auth_settings – Authentication setting identifiers list.
request_auth – if set, the provided settings will override the token in the configuration.
- Resource_path:
A string representation of the HTTP request resource path.
- Method:
A string representation of the HTTP request method.
- Body:
A object representing the body of the HTTP request. The object type is the return value of sanitize_for_serialization().
- Return type:
None
- property user_agent¶
User agent for this API client
- class agntcy_acp.ApiClientConfiguration(host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_variables=None, server_operation_variables=None, ssl_ca_cert=None, retries=None, timeout=None, ca_cert_data=None, *, debug=None)[source]¶
Bases:
Configuration,BaseModelThis class contains various settings of the API client.
- Parameters:
host (
Optional[str]) – Base url.api_key (
Optional[Dict[str,str]]) – Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret.api_key_prefix (
Optional[Dict[str,str]]) – Dict to store API prefix (e.g. Bearer). The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data.username (
Optional[str]) – Username for HTTP basic authentication.password (
Optional[str]) – Password for HTTP basic authentication.access_token (
Optional[str]) – Access token.server_variables (
Optional[Dict[str,str]]) – Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before.server_operation_variables (
Optional[Dict[int,Dict[str,str]]]) – Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before.ssl_ca_cert (
Optional[str]) – str - the path to a file of concatenated CA certificates in PEM format.retries (
Optional[int]) – Number of retries for API requests.timeout (
Union[List[Union[int,float]],int,float,None]) – Int, float for total timeout number of seconds or tuple of both for (connect, read) timeouts.ca_cert_data (
Union[str,bytes,None]) – verify the peer using concatenated CA certificate data in PEM (str) or DER (bytes) format.debug (
Optional[bool]) – Debug switch.
- classmethod fromEnvPrefix(env_var_prefix, host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_variables=None, server_operation_variables=None, ssl_ca_cert=None, retries=None, timeout=None, ca_cert_data=None, *, debug=None)[source]¶
Construct a configuration object using environment variables as default source of parameter values. For example, with env_var_prefix=”MY_”, the default host parameter value would be looked up in the “MY_HOST” environment variable if not provided.
- Parameters:
env_var_prefix (
str) – String used as prefix for environment variable names.- Returns:
Configuration object
- Return type:
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- exception agntcy_acp.ApiException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
OpenApiException
- exception agntcy_acp.ApiKeyError(msg, path_to_item=None)[source]¶
Bases:
OpenApiException,KeyError
- class agntcy_acp.ApiResponse(**data)[source]¶
Bases:
BaseModel,Generic[T]API response object
- data: T¶
- headers: Optional[Mapping[str, str]]¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- raw_data: StrictBytes¶
- status_code: StrictInt¶
- exception agntcy_acp.ApiTypeError(msg, path_to_item=None, valid_classes=None, key_type=None)[source]¶
Bases:
OpenApiException,TypeError
- exception agntcy_acp.ApiValueError(msg, path_to_item=None)[source]¶
Bases:
OpenApiException,ValueError
- class agntcy_acp.AsyncACPClient(api_client=None, configuration=None, manifest=None, stream_chunk_size=4096)[source]¶
Bases:
AgentsApi,StatelessRunsApi,ThreadsApi,ThreadRunsApiAsync client for ACP API.
- classmethod fromConfiguration(host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_variables=None, server_operation_variables=None, ssl_ca_cert=None, retries=None, timeout=None, ca_cert_data=None, *, debug=None)[source]¶
Construct an AsyncACPClient object using configuration values. For example, with env_var_prefix=”MY_”, the default host parameter value would be looked up in the “MY_HOST” environment variable if not provided.
- Parameters:
env_var_prefix – String used as prefix for environment variable names.
- Returns:
Async ACP client object
- Return type:
- classmethod fromEnvPrefix(env_var_prefix, host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_variables=None, server_operation_variables=None, ssl_ca_cert=None, retries=None, timeout=None, ca_cert_data=None, *, debug=None)[source]¶
Construct an AsyncACPClient object using environment variables as default source of the API client configuration values. For example, with env_var_prefix=”MY_”, the default host parameter value would be looked up in the “MY_HOST” environment variable if not provided.
- Parameters:
env_var_prefix (
str) – String used as prefix for environment variable names.- Returns:
Async ACP client object
- Return type:
- agntcy_acp.AsyncApiClient¶
alias of
ApiClient
- exception agntcy_acp.BadRequestException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
ApiException
- exception agntcy_acp.ConflictException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
ApiExceptionException for HTTP 409 Conflict.
- exception agntcy_acp.ForbiddenException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
ApiException
- exception agntcy_acp.NotFoundException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
ApiException
- exception agntcy_acp.OpenApiException[source]¶
Bases:
ExceptionThe base exception class for all OpenAPIExceptions
- exception agntcy_acp.ServiceException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
ApiException
- exception agntcy_acp.UnauthorizedException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
ApiException
- exception agntcy_acp.UnprocessableEntityException(status=None, reason=None, http_resp=None, *, body=None, data=None)[source]¶
Bases:
ApiExceptionException for HTTP 422 Unprocessable Entity.