Skip to content

API Reference parrot.registry.storage

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.registry.storage

View source

Redis-backed storage for BotConfig objects.

Alias AgentRegistry

Re-exported from parrot.registry.registry.AgentRegistry.

Alias BotConfig

Re-exported from parrot.registry.registry.BotConfig.

Class BotConfigStorage

Redis-backed CRUD storage for BotConfig agent definitions.

Parameter Type Default Description
redis_url Optional[str] None
key_prefix str 'parrot:agents'

Attributes:

Attribute Type Description
redis Redis

Method BotConfigStorage.list

Return all BotConfig objects stored in Redis.

list() -> List[BotConfig]

Returns: List[BotConfig]

Method BotConfigStorage.get

Fetch a single BotConfig by agent name.

get(name: str) -> Optional[BotConfig]

Parameter Type Default Description
name str

Returns: Optional[BotConfig]

Method BotConfigStorage.save

Update an existing agent config in Redis.

Raises KeyError if the agent does not already exist.

save(config: BotConfig) -> None

Parameter Type Default Description
config BotConfig

Method BotConfigStorage.insert

Insert a new agent config into Redis.

insert(config: BotConfig, registered_agents: Optional[Dict[str, Any]] = None) -> None

Parameter Type Default Description
config BotConfig The BotConfig to store.
registered_agents Optional[Dict[str, Any]] None Optional mapping of already-registered agent names (e.g. AgentRegistry._registered_agents) used to prevent duplicates.

Raises:

  • ValueError — If the agent is already registered or already in Redis.

Method BotConfigStorage.transfer

Move a BotConfig from Redis to the filesystem as a YAML file.

The entry is removed from Redis after a successful write.

transfer(name: str, registry: 'AgentRegistry', category: str = 'general') -> Path

Parameter Type Default Description
name str Agent name to transfer.
registry 'AgentRegistry' AgentRegistry instance (used for create_agent_definition).
category str 'general' Subdirectory category for the YAML file.

Returns: Path — Path to the newly created YAML definition file.

Raises:

  • KeyError — If the agent does not exist in Redis.

Method BotConfigStorage.delete

Remove a BotConfig from Redis by name.

delete(name: str) -> bool

Parameter Type Default Description
name str

Returns: bool — True if the key was deleted, False if it did not exist.

Method BotConfigStorage.close

Close the underlying Redis connection.

close() -> None

Alias ModelConfig

Re-exported from parrot.models.basic.ModelConfig.

Alias REDIS_SERVICES_URL

Re-exported from parrot.conf.REDIS_SERVICES_URL.

Alias ToolConfig

Re-exported from parrot.models.basic.ToolConfig.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally