Search by

adachsoft / rule-author-agent-tool

Arkadiusz Adach

AI tool that delegates authoring and editing agent rules to an isolated agent.

Package info

gitlab.com/a.adach/rule-author-agent-tool

Issues

pkg:composer/adachsoft/rule-author-agent-tool

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-10-08 20:48 UTC

This package is not auto-updated.

Last update: 2026-10-09 16:57:44 UTC


README

adachsoft/rule-author-agent-tool provides an AI tool that delegates authoring and editing agent rules to an isolated rule-authoring agent.

Features

  • Creates and updates agent rules through a dedicated AI agent.
  • Uses the agent_rule and agent_rule_admin tools for rule storage operations.
  • Supports stateful conversations through a configurable conversation_id.
  • Stores rules in a JSON file selected by the application.
  • Exposes the tool through the adachsoft/ai-tool-call SPI.

Installation

composer require adachsoft/rule-author-agent-tool

Integration

Create the tool with RuleAuthorAgentToolFactory and provide the provider credentials, model configuration, and JSON rules path through ConfigMap:

use AdachSoft\AiToolCall\SPI\Collection\ConfigMap;
use AdachSoft\RuleAuthorAgentTool\RuleAuthorAgentToolFactory;

$tool = (new RuleAuthorAgentToolFactory())->create(new ConfigMap([
    'provider_id' => 'openai',
    'api_key' => $apiKey,
    'model_id' => 'gpt-4o-mini',
    'rules_path' => __DIR__ . '/var/rules.json',
    'conversation_id' => 'rule-author-session',
]));

The resulting RuleAuthorAgentTool implements the standard ToolInterface. Pass a ToolCallRequestDto containing a message parameter to delegate a rule-authoring request.

See docs/examples/rule-author-agent.md for a complete request example and configuration details.

License

This library is released under the MIT License.