Summary
Add support for setting/overriding per-tool parameters on aiXplain tools attached to an agent, in both the create and run payloads. This is the SDK half of PROD-2481 (engine half tracked separately in aixplain/aixplain-agents).
Today only role models (llm/supervisor/planner/responder) accept {id, parameters} and support run-time override via modelParameters. Tools snapshot their params only at save time (as_tool() / get_parameters()) and have no run-time override path.
User-facing shape
tools is a list of dicts, each carrying its own params — same shape at create and run:
# creation
agent = Agent(name="...", tools=[
{"id": "<tool_id>", "parameters": {"top_k": 5, "filters": {...}}},
{"id": "<other_id>", "parameters": {"language": "es"}},
])
agent.save()
# run (overrides persisted params by tool id)
agent.run(query="...", tools=[{"id": "<tool_id>", "parameters": {"top_k": 8}}])
Mirrors the existing role-model shape (agent.llm = {"id": ..., "parameters": {...}}).
Work (aixplain/v2/agent.py)
Decisions (from PROD-2481)
- Params are defaults the LLM can override (engine merges
{**parameters, **llm_args}). The SDK side just transports them.
- Run-time
tools entries override persisted per-tool params by tool id.
Acceptance criteria
Refs
- Jira: PROD-2481
- Engine issue: aixplain/aixplain-agents (parse + inject)
Summary
Add support for setting/overriding per-tool parameters on aiXplain tools attached to an agent, in both the create and run payloads. This is the SDK half of PROD-2481 (engine half tracked separately in
aixplain/aixplain-agents).Today only role models (llm/supervisor/planner/responder) accept
{id, parameters}and support run-time override viamodelParameters. Tools snapshot their params only at save time (as_tool()/get_parameters()) and have no run-time override path.User-facing shape
toolsis a list of dicts, each carrying its own params — same shape at create and run:Mirrors the existing role-model shape (
agent.llm = {"id": ..., "parameters": {...}}).Work (
aixplain/v2/agent.py)toolsentries as{id, parameters: {...}}; normalizeparametersinto the API name/value shape inbuild_save_payload— reuse the existing_params_dict_to_namevalue_list/_normalize_tool_dict_for_apihelpers used for role models.build_run_payload, mirroring howmodelParametersalready rides the run payload.as_tool()dicts must continue to work unchanged.Decisions (from PROD-2481)
{**parameters, **llm_args}). The SDK side just transports them.toolsentries override persisted per-tool params by tool id.Acceptance criteria
parametersin the API name/value shape.run(tools=[...])forwards overrides.as_tool()usage.build_save_payloadandbuild_run_payloadcovering the new shape.Refs