Skip to content

Conversation

@pmlugato
Copy link
Collaborator

Summary

  • Moved A2rchi runtime settings to a plain YAML defaults file under src/a2rchi/a2rchi-settings.yaml and removed Jinja templating for settings.
  • Kept static deployment config in base-static-config.yaml and simplified CLI/rendering accordingly.
  • Expanded settings persistence to include tools/middleware/MCP selection and wired agent behavior to those settings.

What changed (by area)

  • Settings defaults
    • New plain defaults file: src/a2rchi/a2rchi-settings.yaml
    • Packaged for distribution: pyproject.toml
  • CLI/config handling
    • CLI no longer renders settings into deployments; it reads defaults from src/a2rchi/a2rchi-settings.yaml
    • Inline a2rchi in static configs is ignored with a warning
    • Static config validation still runs; settings validation uses loaded defaults
    • Files: src/cli/managers/templates_manager.py, src/cli/managers/config_manager.py, src/cli/utils/helpers.py
  • Settings persistence and composition
    • Settings loader now reads defaults from src/a2rchi/a2rchi-settings.yaml
    • Added Postgres option catalogs for tools, middleware, and MCP servers
    • Composed settings JSON now reflects tool/middleware/MCP selections
    • Files: src/utils/settings_store.py, src/cli/templates/base-init.sql
  • Agents / pipelines
    • Agents now filter static tools/middleware based on settings
    • CMSCompOpsAgent middleware can be configured via settings
    • Files: src/a2rchi/pipelines/agents/base_react.py, src/a2rchi/pipelines/agents/cms_comp_ops_agent.py
  • Docs
    • Updated to reflect new settings location and static vs dynamic split
    • Files: docs/docs/quickstart.md, docs/docs/user_guide.md
  • Tests
    • Added/updated settings composition tests (tools/middleware/MCP)
    • File: tests/unit/test_settings_store.py

Breaking/compat notes

  • Users should no longer include a2rchi settings in the static config. The CLI ignores inline a2rchi and uses defaults from src/a2rchi/a2rchi-
    settings.yaml.
  • Postgres will be seeded from the defaults file on first run.

@pmlugato pmlugato requested a review from lucalavezzo January 22, 2026 20:41
# max_tools=3,
# )
# return [todolist_middleware, llmtoolselector_middleware]
def _build_static_middleware(self) -> List[Callable]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should drop this, this wasn't working

def _filter_middleware(self, middleware: Sequence[Callable]) -> List[Callable]:
enabled = self.pipeline_config.get("middleware", {}).get("enabled")
if not enabled:
return list(middleware)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not enabled, return empty?

config_template = self.env.get_template(BASE_CONFIG_TEMPLATE)
config_rendered = config_template.render(verbosity=context.plan.verbosity, **updated_config)
static_template = self.env.get_template(BASE_STATIC_CONFIG_TEMPLATE)
static_rendered = static_template.render(verbosity=context.plan.verbosity, **updated_config)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe here we should validate the options?
e.g. tools passed should be a subset of the existing ones in src/a2rchi/pipelines/tools/init.py

@@ -0,0 +1,241 @@
name: {{ name | default("default", true) }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you delete the old basic-config.yaml ?


config["_config_path"] = config_path

config["a2rchi"] = load_a2rchi_settings(config)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_agent_settings?

with open(CONFIGS_PATH+f"{name}.yaml", "r") as f:
config_path = CONFIGS_PATH + f"{name}.yaml"
with open(config_path, "r") as f:
config = yaml.load(f, Loader=yaml.FullLoader)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we still loading from yaml? I thought the point was to red from postgres

TABLE_MCP_SERVER_OPTIONS = "a2rchi_mcp_server_options"


def load_a2rchi_settings(config: Dict) -> Dict:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this replace load_config?

conn.close()


def compose_a2rchi_settings(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the UI will modify the settings, will it go through this function? Should this perform validation too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants