agentconnect.config.models module

Pydantic configuration models for AgentConnect.

This module defines the comprehensive configuration structure using Pydantic models. Only essential, developer-facing settings are exposed - internal tuning parameters remain in the code as defaults.

Global configuration precedence (highest to lowest): 1) Runtime keyword overrides 2) agentconnect.yaml 3) Model defaults

Environment variables are not read by the global settings system. They are reserved for secrets and are consumed directly by the specific subsystems that require them (e.g., provider SDKs, external clients).

class InMemoryConfig(**data)

Bases: BaseModel

In-memory Qdrant configuration (for development).

Parameters:

type (Literal['in_memory'])

type: Literal['in_memory']
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class LocalFileConfig(**data)

Bases: BaseModel

Local file-based Qdrant configuration.

Parameters:
type: Literal['local_file']
path: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class RemoteConfig(**data)

Bases: BaseModel

Remote Qdrant server configuration.

Parameters:
  • type (Literal['remote'])

  • url (str)

  • api_key (SecretStr)

type: Literal['remote']
url: str
api_key: SecretStr
classmethod validate_url_format(v)

Validate URL format.

Return type:

str

Parameters:

v (str)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class VectorSearchAdvancedSettings(**data)

Bases: BaseModel

Advanced configuration for vector search (for power users).

Parameters:
  • timeout (int)

  • grpc_port (int | None)

  • prefer_grpc (bool)

  • use_quantization (bool)

  • vectors_on_disk (bool)

  • index_on_disk (bool)

  • batch_size (int)

timeout: int
grpc_port: Optional[int]
prefer_grpc: bool
use_quantization: bool
vectors_on_disk: bool
index_on_disk: bool
batch_size: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class VectorSearchSettings(**data)

Bases: BaseModel

Vector search configuration for agent registry.

Parameters:
model_name: str
cache_folder: str
vector_store_path: str
deployment: Union[InMemoryConfig, LocalFileConfig, RemoteConfig]
advanced: VectorSearchAdvancedSettings
get_connection_config()

Get connection configuration for the vector implementation.

Return type:

Dict[str, Any]

get_performance_config()

Get performance-related configuration.

Return type:

Dict[str, Any]

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class RegistrySettings(**data)

Bases: BaseModel

Registry subsystem configuration.

The registry only needs vector-search / storage related configuration.

Runtime parameters for the standalone Registry API server are configured separately in the agentconnect.servers package via environment variables with the AGENTCONNECT_REGISTRY_ prefix. See agentconnect.servers.config.RegistryAPISettings.

Parameters:

vector_search (VectorSearchSettings)

get_vector_search_config()

Get vector search configuration as dictionary for backward compatibility.

Return type:

Dict[str, Any]

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class CommunicationSettings(**data)

Bases: BaseModel

Communication hub configuration for A2A messaging.

Parameters:

enable_message_history (bool)

enable_message_history: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class RegistryClientSettings(**data)

Bases: BaseModel

Configuration for the Registry API Client.

Parameters:
  • base_url (str)

  • default_timeout (float)

  • connect_timeout (float)

  • read_timeout (float)

  • pool_timeout (float)

  • max_retries (int)

  • retry_backoff_factor (float)

  • retryable_status_codes (List[int])

  • max_connections (int)

  • max_keepalive_connections (int)

base_url: str
default_timeout: float
connect_timeout: float
read_timeout: float
pool_timeout: float
max_retries: int
retry_backoff_factor: float
retryable_status_codes: List[int]
max_connections: int
max_keepalive_connections: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ClientSettings(**data)

Bases: BaseModel

Configurations for API clients.

Parameters:

registry (RegistryClientSettings)

registry: RegistryClientSettings
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class MCPAgentDiscoverySettings(**data)

Bases: BaseModel

Configuration for the Agent Discovery MCP tool.

Parameters:
  • enabled (bool)

  • top_k (int)

  • strictness (float)

  • output_detail (Literal['minimal', 'summary', 'capabilities', 'full'])

enabled: bool
top_k: int
strictness: float
output_detail: Literal['minimal', 'summary', 'capabilities', 'full']
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class MCPSettings(**data)

Bases: BaseModel

Configuration for MCP (Model Context Protocol) servers.

Parameters:

agent_discovery (MCPAgentDiscoverySettings)

agent_discovery: MCPAgentDiscoverySettings
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class PaymentsSettings(**data)

Bases: BaseModel

Payments configuration.

Parameters:
  • default_token_symbol (str)

  • wallet_data_dir (str)

default_token_symbol: str
wallet_data_dir: str
classmethod normalize_token_symbol(v)

Normalize token symbols to uppercase for consistent comparisons

Return type:

str

Parameters:

v (str)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class LoggingSettings(**data)

Bases: BaseModel

Logging configuration settings.

Not part of global settings; retained for potential reuse.

Parameters:
level: str
format: str
json_output: bool
classmethod validate_log_level(v)

Validate log level is supported.

Return type:

str

Parameters:

v (str)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class AgentConnectSettings(**data)

Bases: BaseModel

Main configuration class for AgentConnect.

Precedence (highest to lowest): 1. Runtime kwargs 2. agentconnect.yaml file 3. Hard-coded defaults

Parameters:
registry: RegistrySettings
communication: CommunicationSettings
clients: ClientSettings
mcp: MCPSettings
payments: PaymentsSettings
project_name: str
classmethod create_from_dict(config_dict)

Create settings instance from configuration dictionary.

Return type:

AgentConnectSettings

Parameters:

config_dict (Dict[str, Any])

get_registry_config()

Get registry configuration for backward compatibility.

Return type:

Dict[str, Any]

model_dump_yaml_safe()

Export configuration in YAML-safe format (no secrets).

Return type:

Dict[str, Any]

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].