Search by

adachsoft / ai-agent-context-composer

Arkadiusz Adach

Configuration-driven conversation context strategy composer for adachsoft/ai-agent.

Package info

gitlab.com/a.adach/ai-agent-context-composer

Issues

pkg:composer/adachsoft/ai-agent-context-composer

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-11-29 22:56 UTC

This package is auto-updated.

Last update: 2026-11-29 21:56:48 UTC


README

This package provides a configuration-driven conversation context strategy composer for adachsoft/ai-agent. It allows combining base strategies with multiple message injectors via declarative agent configuration, without requiring changes to the PHP code.

Requirements

  • PHP 8.3 or later.
  • adachsoft/ai-agent and its required packages, installed through Composer.

Installation

composer require adachsoft/ai-agent-context-composer

Note: In the monorepo environment, this package is managed via path repositories.

Usage

To use this composer, the agent configuration should specify conversation_context_strategy_id as adachsoft.composable_conversation_context_strategy. The conversation_context_strategy_params should then define the base_strategy and the list of injectors to be applied.

License

This package is licensed under the MIT License.

Main capabilities

  • Compose a registered base conversation context strategy with zero or more message injectors.
  • Configure the base strategy and each content provider by alias, without changing application code.
  • Validate strategy configuration and report invalid definitions or unknown registered aliases through dedicated exceptions.

Integration

Register ComposableConversationContextStrategy with the adachsoft/ai-agent conversation-context strategy mechanism under the identifier adachsoft.composable_conversation_context_strategy. Supply a BaseStrategyRegistry containing the base strategies available to your application and a ContentProviderRegistry containing the message content providers used by its injectors. The agent configuration then selects this strategy and provides the composition parameters. See the configuration example for a complete parameter shape.