agntcy_acp package¶
Subpackages¶
- agntcy_acp.langgraph package
- agntcy_acp.manifest package
- agntcy_acp.models package
- Module contents
Agent
AgentACPDescriptor
AgentACPSpec
AgentACPSpec.capabilities
AgentACPSpec.config
AgentACPSpec.custom_streaming_update
AgentACPSpec.from_dict()
AgentACPSpec.from_json()
AgentACPSpec.input
AgentACPSpec.interrupts
AgentACPSpec.model_config
AgentACPSpec.output
AgentACPSpec.thread_state
AgentACPSpec.to_dict()
AgentACPSpec.to_json()
AgentACPSpec.to_str()
AgentACPSpecInterruptsInner
AgentACPSpecInterruptsInner.from_dict()
AgentACPSpecInterruptsInner.from_json()
AgentACPSpecInterruptsInner.interrupt_payload
AgentACPSpecInterruptsInner.interrupt_type
AgentACPSpecInterruptsInner.model_config
AgentACPSpecInterruptsInner.resume_payload
AgentACPSpecInterruptsInner.to_dict()
AgentACPSpecInterruptsInner.to_json()
AgentACPSpecInterruptsInner.to_str()
AgentCapabilities
AgentConnectProtocol
AgentDependency
AgentDeployment
AgentManifest
AgentMetadata
AgentRef
AgentSearchRequest
Capabilities
Config
ConfigSchema
Content
ContentOneOfInner
ContentOneOfInner.actual_instance
ContentOneOfInner.actual_instance_must_validate_anyof()
ContentOneOfInner.any_of_schemas
ContentOneOfInner.anyof_schema_1_validator
ContentOneOfInner.anyof_schema_2_validator
ContentOneOfInner.from_dict()
ContentOneOfInner.from_json()
ContentOneOfInner.model_config
ContentOneOfInner.to_dict()
ContentOneOfInner.to_json()
ContentOneOfInner.to_str()
CustomRunResultUpdate
CustomRunResultUpdate.from_dict()
CustomRunResultUpdate.from_json()
CustomRunResultUpdate.model_config
CustomRunResultUpdate.run_id
CustomRunResultUpdate.status
CustomRunResultUpdate.to_dict()
CustomRunResultUpdate.to_json()
CustomRunResultUpdate.to_str()
CustomRunResultUpdate.type
CustomRunResultUpdate.type_validate_enum()
CustomRunResultUpdate.update
DeploymentOptions
DockerDeployment
EnvVar
EnvVarValues
ErrorResponse
FrameworkType
InputSchema
Interrupt
InterruptPayloadSchema
LangGraphConfig
LlamaIndexConfig
Message
MessageAnyBlock
MessageTextBlock
OutputSchema
RemoteServiceDeployment
ResumePayloadSchema
Run
RunCreate
RunCreate.after_seconds
RunCreate.agent_id
RunCreate.config
RunCreate.from_dict()
RunCreate.from_json()
RunCreate.input
RunCreate.metadata
RunCreate.model_config
RunCreate.multitask_strategy
RunCreate.multitask_strategy_validate_enum()
RunCreate.on_disconnect
RunCreate.on_disconnect_validate_enum()
RunCreate.stream_mode
RunCreate.to_dict()
RunCreate.to_json()
RunCreate.to_str()
RunCreate.webhook
RunCreateStateful
RunCreateStateful.after_seconds
RunCreateStateful.agent_id
RunCreateStateful.config
RunCreateStateful.from_dict()
RunCreateStateful.from_json()
RunCreateStateful.if_not_exists
RunCreateStateful.if_not_exists_validate_enum()
RunCreateStateful.input
RunCreateStateful.metadata
RunCreateStateful.model_config
RunCreateStateful.multitask_strategy
RunCreateStateful.multitask_strategy_validate_enum()
RunCreateStateful.on_disconnect
RunCreateStateful.on_disconnect_validate_enum()
RunCreateStateful.stream_mode
RunCreateStateful.stream_subgraphs
RunCreateStateful.to_dict()
RunCreateStateful.to_json()
RunCreateStateful.to_str()
RunCreateStateful.webhook
RunCreateStateless
RunCreateStateless.after_seconds
RunCreateStateless.agent_id
RunCreateStateless.config
RunCreateStateless.from_dict()
RunCreateStateless.from_json()
RunCreateStateless.input
RunCreateStateless.metadata
RunCreateStateless.model_config
RunCreateStateless.multitask_strategy
RunCreateStateless.multitask_strategy_validate_enum()
RunCreateStateless.on_completion
RunCreateStateless.on_completion_validate_enum()
RunCreateStateless.on_disconnect
RunCreateStateless.on_disconnect_validate_enum()
RunCreateStateless.stream_mode
RunCreateStateless.to_dict()
RunCreateStateless.to_json()
RunCreateStateless.to_str()
RunCreateStateless.webhook
RunError
RunInterrupt
RunOutput
RunOutput.actual_instance
RunOutput.actual_instance_must_validate_oneof()
RunOutput.discriminator_value_class_map
RunOutput.from_dict()
RunOutput.from_json()
RunOutput.model_config
RunOutput.one_of_schemas
RunOutput.oneof_schema_1_validator
RunOutput.oneof_schema_2_validator
RunOutput.oneof_schema_3_validator
RunOutput.to_dict()
RunOutput.to_json()
RunOutput.to_str()
RunOutputStream
RunResult
RunSearchRequest
RunStateful
RunStateless
RunStatus
RunWaitResponseStateful
RunWaitResponseStateless
SecurityScheme
SourceCodeDeployment
StreamEventPayload
StreamEventPayload.actual_instance
StreamEventPayload.actual_instance_must_validate_oneof()
StreamEventPayload.discriminator_value_class_map
StreamEventPayload.from_dict()
StreamEventPayload.from_json()
StreamEventPayload.model_config
StreamEventPayload.one_of_schemas
StreamEventPayload.oneof_schema_1_validator
StreamEventPayload.oneof_schema_2_validator
StreamEventPayload.oneof_schema_3_validator
StreamEventPayload.oneof_schema_4_validator
StreamEventPayload.to_dict()
StreamEventPayload.to_json()
StreamEventPayload.to_str()
StreamMode
StreamMode.actual_instance
StreamMode.actual_instance_must_validate_anyof()
StreamMode.any_of_schemas
StreamMode.anyof_schema_1_validator
StreamMode.anyof_schema_2_validator
StreamMode.from_dict()
StreamMode.from_json()
StreamMode.model_config
StreamMode.to_dict()
StreamMode.to_json()
StreamMode.to_str()
StreamUpdateSchema
Streaming
StreamingMode
StreamingModes
Thread
ThreadCheckpoint
ThreadCreate
ThreadPatch
ThreadSearchRequest
ThreadSearchRequest.from_dict()
ThreadSearchRequest.from_json()
ThreadSearchRequest.limit
ThreadSearchRequest.metadata
ThreadSearchRequest.model_config
ThreadSearchRequest.offset
ThreadSearchRequest.status
ThreadSearchRequest.to_dict()
ThreadSearchRequest.to_json()
ThreadSearchRequest.to_str()
ThreadSearchRequest.values
ThreadState
ThreadStateSchema
ThreadStatus
ValueRunResultUpdate
ValueRunResultUpdate.from_dict()
ValueRunResultUpdate.from_json()
ValueRunResultUpdate.messages
ValueRunResultUpdate.model_config
ValueRunResultUpdate.run_id
ValueRunResultUpdate.status
ValueRunResultUpdate.to_dict()
ValueRunResultUpdate.to_json()
ValueRunResultUpdate.to_str()
ValueRunResultUpdate.type
ValueRunResultUpdate.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
,ThreadRunsApi
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, 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, 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:
object
Generic 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, ca_cert_data=None, *, debug=None)[source]¶
Bases:
Configuration
,BaseModel
This 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.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, 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
,ThreadRunsApi
Async 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, 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, 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:
ApiException
Exception 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:
Exception
The 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:
ApiException
Exception for HTTP 422 Unprocessable Entity.