Search by

adachsoft / ai-agent-config-repository

Arkadiusz Adach

AI agent configuration repository library for AdachSoft projects.

Package info

gitlab.com/a.adach/ai-agent-config-repository

Issues

pkg:composer/adachsoft/ai-agent-config-repository

Statistics

Installs: 34

Dependents: 3

Suggesters: 0

Stars: 0

v0.6.0 2026-09-30 07:54 UTC

This package is auto-updated.

Last update: 2026-09-30 06:02:03 UTC


README

Framework-agnostic library for storing AI agent configuration.

This package contains only the configuration model and in-memory repository implementations. Agent runtime composition and JSON file storage are provided by separate packages:

  • adachsoft/ai-agent-factory provides agent composition.
  • adachsoft/ai-agent-config-repository-json provides JSON file repositories.

Requirements

  • PHP ^8.3
  • adachsoft/collection ^3.0

Installation

composer require adachsoft/ai-agent-config-repository

Package structure

The root namespace is AdachSoft\AiAgentConfigRepository.

  • PublicApi/Vo contains validated identifier value objects.
  • PublicApi/Dto contains configuration and conversation context DTOs.
  • PublicApi/Collection contains typed immutable collections.
  • PublicApi/Exception contains public API exceptions.
  • PublicApi/Service contains the conversation context profile resolver.
  • SPI/Repository contains repository contracts.
  • Infrastructure/Repository/InMemory contains in-memory repository implementations.

System prompt templates

SystemPromptRepositoryInterface exposes both rendered prompt content and raw templates:

use AdachSoft\AiAgentConfigRepository\PublicApi\Vo\PromptIdVo;
use AdachSoft\AiAgentConfigRepository\SPI\Repository\SystemPromptRepositoryInterface;

/** @var SystemPromptRepositoryInterface $repository */
$template = $repository->getTemplateById(new PromptIdVo('my-prompt'));

The in-memory implementation does not render prompts, so getTemplateById() returns the same text as getById().

Conversation context profiles

Conversation context profiles are represented by public DTOs and resolved through ConversationContextProfileResolver. JSON file storage for these profiles belongs to adachsoft/ai-agent-config-repository-json.

Tests and quality

vendor/bin/phpunit
vendor/bin/phpstan analyse src tests
vendor/bin/rector process src tests
vendor/bin/php-cs-fixer fix src tests