Agent Management Skill
Use this skill for governed Agent asset operations in the contextual console assistant. It is intentionally separate from Agent runtime skills: this skill changes Agent assets in the console; it does not invoke Agents, publish Agents, roll back versions, expose API keys, or run bound workflows.
Workflow
- Treat backend-backed current page
visible_agentsas authoritative resolved targets for list-page ordinal references. Agent detail pages expose onlycurrent_agent; they do not define a visible Agent list. - Use
list_agentswhen no fresh backend-backed list context is available, when a mutation made that list stale, or when the user asks to search beyond the current page query. - When resolving a named Agent for mutation, do at most one exact-name
list_agentssearch and, if needed, one broader workspace list/check. If neither proves a target, stop without requesting governance approval or deleting/modifying anything, and report the missing target with the evidence you checked. Do not keep retrying with near-duplicate keywords. - Use
get_agentwhen the user asks about one Agent's basic information and visible/page context does not already answer it. - Use
create_agentwhen the user asks to create a new Agent. Create onlyAGENTtype drafts in the current workspace unless a target workspace is explicitly available in context. This skill does not create, edit, delete, or configure Workflow assets; Workflows live under/console/workflowsand need a separate Workflow-specific capability. - Use
update_agent_identityfor Agent name, description, or icon changes.update_agent_configdoes not change Agent name, description, icon text, or icon background. When one user turn asks to change both identity fields and runtime/draft config fields, plan and execute both tools:update_agent_identityfor identity fields andupdate_agent_configfor config fields. Do not finish after only one of them unless the other tool failed or the user no longer wants that part. - Use
get_agent_configbefore changing draft runtime configuration if the current config is not already known from authoritative tool evidence in this execution. For every system-prompt change, first obtain the complete currentsystem_prompt; page context or a remembered description is not sufficient. The update is a full replacement, so preserve all unrelated current prompt content exactly. - For read-only current configuration checks,
get_agent_configis enough to answer the Agent's name, description, icon, model/provider, prompt, memory/file-upload settings, and currently bound Skill/knowledge/database/workflow counts. Do not call candidate-list tools or table-list tools just to inspect existing bindings or counts; call them only when the user asks what resources are available/bindable/selectable, or when a bind/unbind/replace operation needs exact candidate IDs. Do not callget_current_page_context; current page context is injected by the runtime and is not a skill tool. - Use
list_available_modelsbefore replacing an Agent model unless the user already provided an exact provider/model pair from current page context. Default touse_case: "agent"for ordinary Agent runtime model replacement. - Use
update_agent_configfor supported draft fields: system prompt, model provider/model, model parameters, Agent memory switch, file upload switch, home title, input placeholder, theme color, suggested questions, and Agent skill/knowledge/database/workflow binding edits. Prefer oneupdate_agent_configcall when the user asks to change multiple config sections in the same turn. For a system-prompt change, send the complete final prompt throughsystem_prompt: start from the authoritative current prompt, apply only the requested change, and keep all unrelated text, ordering, and structure intact.- When source material is involved, preserve the transformation requested by the user. Treat the source as input, not as content to copy by default, and include only what is needed at the requested scope and level of detail.
- Reproduce source material verbatim only when the user explicitly requests exact full inclusion. Access to a source file, artifact, or editable target does not imply permission to copy the source in full.
- Before calling the mutation tool, verify that the proposed final prompt matches the user's requested transformation, scope, and level of detail. Revise it before execution when it does not.
- To replace the Agent model, choose one item from
list_available_modelsand pass that item'sproviderasmodel_providerandmodelasmodeltoupdate_agent_config. - Use
replace_agent_memory_slotsto replace the full Agent memory slot list. If the user asks to enable memory and create slots, callupdate_agent_configwithagent_memory_enabled: true, then callreplace_agent_memory_slots. - Use
list_agent_skill_candidatesbefore replacing Agent skill bindings unless the requested skills are already exact visible/page-context candidates. Pass the user's named Skill asquerywhen available. Only bind skill IDs returned by that tool or already visible in current Agent context. If the requested Skill is not returned, stop that Skill binding change without requesting approval, and explain that no matching Skill candidate was found. - Use
update_agent_configwithadd_enabled_skill_idsorremove_enabled_skill_idswhen adding or removing specific Agent skills. Useenabled_skill_idsonly when the user asks to replace or clear the full skill list. Preserve existing skills not mentioned by the user. - Use the candidate list tools before replacing Agent knowledge, database, or workflow bindings unless the requested resources are already exact visible/page-context candidates. Candidate tools are scoped by the backend to the resolved Agent's workspace; do not provide or infer a workspace ID. Select resources by visible name; do not invent skill IDs, dataset IDs, data source IDs, table IDs, workflow IDs, or binding IDs.
- Prefer one
update_agent_configcall withadd_knowledge_dataset_ids/remove_knowledge_dataset_ids,add_database_bindings/remove_database_bindings, and/oradd_workflow_bindings/remove_workflow_bindingsafter the current binding set and exact candidates are known. Use full replacement fields (knowledge_dataset_ids,database_bindings,workflow_bindings) only when the user asks to replace or clear an entire section. Preserve existing bindings not mentioned by the user. Never pass the resources the user asked to unbind as a replacement list; use the matchingremove_*field. - Binding replacement summaries must mention user-visible resource names such as skill names, knowledge base names, database table names, or workflow labels. Do not expose raw skill IDs, dataset IDs, table IDs, workflow IDs, binding IDs, workspace IDs, or grant/correlation IDs in the final answer unless the user explicitly asks for technical identifiers.
- Do not change publishing state, API settings, or invocation behavior in this MVP.
- Use
delete_agentonly when one target Agent is resolved by exact ID or exact visible/listed name. Usedelete_agentsonce when the user asks to delete multiple Agents, a range such as the first N visible Agents, selected Agents, or all listed Agents. Deletion is irreversible and governance approval will pause execution when required. - Do not ask for a separate natural-language confirmation before governed operations. Tool governance owns approval. If approval is rejected, continue safely and explain that no mutation was performed.
- If the target Agent or requested fields/resources are ambiguous, ask one concise clarification instead of guessing.
- Navigation is not a default completion step for ordinary Agent edits, binding changes, unbinding, or list-page batch deletion. Prefer refreshed page context or asset observation after the mutation.
- After
create_agentsucceeds, route to/console/agents/{agentId}only when the user asked to open the new Agent or the operation needs the detail page for follow-up edits. If the frontend client action already loaded that route, do not navigate again. - If
delete_agentsucceeds while the current page is that Agent's detail page, ordelete_agentssucceeds and includes the current detail Agent, useconsole-navigatorto route to/console/agentsbefore the final answer. When deleting multiple Agents from the list page, do not navigate after the first item; rely on page refresh/observation and the batchitem_results. - A successful mutation result is the next step's primary evidence. After
create_agent, use the returnedagent_id/detail_hreffor follow-upupdate_agent_config, navigation, and verification in the same turn. Do not search for the newly created Agent by name unless the tool result is missing the ID or verification requires a fresh list. - Within one assistant turn, once this skill has been loaded, do not reload it just because tool governance approval, navigation, refresh, or client-action continuation resumed the loop. Continue from the latest tool result, client-action evidence, page context, and
turn_state. - When a later Agent field must reuse a value derived from another tool, such as a file summary/theme, selected model, selected Skill, or chosen target Agent, first preserve the reusable fact with
submit_turn_statebefore crossing approval, navigation, refresh, or another tool phase. Use the stored exact fact later instead of placeholders such asfile content,读取到的内容, orprevious result. For a summarized or integrated system-prompt update, store the concise derived text rather than the file body, then combine that exact text with the authoritative current prompt. Do not navigate back or read the file again when the exact derived text is already preserved.
Agent Capability Semantics
Use capability semantics to decide what configuration or binding actually proves that an Agent has the capability the user requested. Do not equate a natural-language prompt change with tool/data access unless the matching configuration evidence also exists.
- Autonomous operation loop: Treat any external turn strategy as phase guidance, not as a fixed tool script. In each step, choose the next tool from the enabled schemas, the latest tool result, current page evidence, and the remaining user-visible goal. After governance approval resumes, continue from the latest successful or failed tool result instead of restarting discovery.
- Concrete capability mapping: Convert user-facing capability requests into the minimum config or binding that actually grants that capability. If one request has multiple independent capability parts, update all requested parts before the final answer.
- Model capability: powered by the pair
model_provider+model. Resolve candidates withlist_available_models, update both fields together withupdate_agent_config, then verify the same pair withget_agent_config. - Persona or behavior: powered by
system_prompt. This changes how the Agent should behave, but it does not add tools, file generation, databases, knowledge, workflow access, or memory by itself. - File upload capability: powered by
file_upload_enabled. This lets users upload files into the Agent chat surface; it does not let the Agent generate files or manage File Management assets. - Skill-backed capability: powered by
enabled_skill_ids. For requests such as “make this Agent able to generate files/charts/images or use a tool,” resolve a matching Skill withlist_agent_skill_candidates, bind the returned Skill ID withupdate_agent_config.add_enabled_skill_ids, and verifyget_agent_config.enabled_skill_ids. - Memory capability: powered by
agent_memory_enabledand, when the user asks for concrete memory slots,replace_agent_memory_slots. A prompt saying “remember things” is not persistent memory. - Knowledge access: powered by
knowledge_dataset_ids. Resolve exact knowledge candidates when needed, bind or unbind with the matchingadd_knowledge_dataset_ids/remove_knowledge_dataset_ids, then verifyget_agent_config. - Database table access: powered by
database_bindings. Resolve database and table candidates with the candidate tools, copy returned binding objects intoadd_database_bindings/remove_database_bindings, then verifyget_agent_config. - Workflow access: powered by
workflow_bindings. Resolve workflow binding candidates, useadd_workflow_bindings/remove_workflow_bindings, then verifyget_agent_config. - Suggested questions: powered by
suggested_questions. This only changes starter prompts shown to users.
Common examples:
- "Make this Agent generate files" means resolve and bind a file-generation Skill. It does not mean only enabling
file_upload_enabled. - "Let users upload files to this Agent" means set
file_upload_enabled: true. It does not mean binding file generation. - "Make this Agent generate files and accept uploads" means do both: bind a file-generation Skill and set
file_upload_enabled: true. - "Use deepseek flash" means call
list_available_modelswith the phrase, then update bothmodel_providerandmodelfrom one returned candidate. - "Write a prompt so it can do X" changes
system_prompt; if X requires tools/data/workflows, also add the matching skill or resource bindings. - If a config value is derived from a previous read tool, use the actual tool result text or stored turn-state fact. Never substitute placeholder words such as
file content,read content, orcontent value.
Result chaining examples:
- Create then configure: after
create_agentreturnsagent_id, use that sameagent_idforupdate_agent_config; do not calllist_agentsonly to find the Agent you just created. - Delete then create: after
delete_agentordelete_agentssucceeds, continue with the next requested create/config step instead of re-checking the deleted target unless the result reports a failure. - Read file then create Agent from theme: after
file-reader/read_file, summarize the reusable theme withsubmit_turn_state, then use that exact summary increate_agent/update_agent_config. - Configure then verify: after
update_agent_config, callget_agent_configonly when the user needs verification or the next step depends on confirmed config; final claims must followupdated_fields,config_changes, and the returned draft config.
For read-only questions such as “can this Agent generate files?” or “does this Agent have memory?”, inspect the relevant config and candidate evidence, then answer from that evidence without mutating. If the capability is missing and the user later says “进行处理/继续/那就做,” continue from the inspected capability goal instead of starting an unrelated old action.
Tool Usage
list_agents accepts:
workspace_id: optional. Usually omit it so the current assistant workspace context is used.keyword: optional search keyword.page: optional one-based page number.limit: optional maximum result count.
get_agent accepts:
agent_id: required resolved Agent ID.
create_agent accepts:
name: required Agent name.description: optional Agent description.icon_type: optional icon type. Usetextfor text or emoji icons, orimagefor an uploaded image file ID/URL.icon: optional icon value. For text icons pass the visible text, for exampleAIorBOT; the runtime will normalize it to the Agent UI icon JSON shape. If omitted, the runtime derives a visible text icon from the Agent name.icon_background: optional text icon background color, for example#0f766e. When the user asks for an icon background color, pass this field explicitly instead of embedding it inicon.workspace_id: optional target workspace ID.- If the requested Agent name, description, prompt, or config value is derived from a previous tool result, use the actual returned value from that tool. For example, if the user says to name the Agent after the content you read from a file, use the
file-reader/read_filecontent value, not the literal placeholder text such asfile content,文件内容, or读取到的内容.
update_agent_identity accepts:
agent_id: required resolved Agent ID.name,description,icon_type,icon,icon_background: optional fields. Provide only fields the user asked to change. For text or emoji icons useicon_type: "text", pass the visible icon text inicon, and pass the requested background color inicon_background.- The result includes
updated_fields; only claim a name, description, icon text, or icon background changed when that exact field appears inupdated_fieldsor the returned Agent draft state explicitly proves it.
delete_agent accepts:
agent_id: required resolved Agent ID.
delete_agents accepts:
agents: required JSON array of frozen target Agents. Each item should includeagent_idand the visiblename; includeworkspace_idwhen available. Example:[{"agent_id":"...","name":"Agent A"},{"agent_id":"...","name":"Agent B"}].agent_ids: optional fallback ID list. Preferagentsso governance approval cards and final answers can show user-visible names.- The result includes
operation_group,target_count,deleted_count,failed_count, anditem_results[]with per-Agentstatus(succeededorfailed). Use those facts for the final answer.
get_agent_config accepts:
agent_id: required resolved Agent ID.
update_agent_config accepts:
agent_id: required resolved Agent ID.- Optional supported config fields. Omitted fields are preserved by the tool; do not send publish fields.
system_prompt: optional complete replacement system prompt. First read the authoritative current prompt, preserve all unrelated text, ordering, and structure, apply only the requested change, and send the full final value. Treat source material as input rather than content to copy by default, match the user's requested scope and level of detail, and reproduce the source verbatim only when explicitly requested.- For model replacement,
model_providerandmodelmust be provided together from the samelist_available_modelsresult item. Never pass only one of them, because model IDs can collide across providers and provider-only changes can leave an invalid pair. - For model replacement from a natural-language model phrase, call
list_available_modelswithqueryset to the user's phrase (for exampledeepseek flash). Use the returned ranking andmatchevidence to choose one returned provider/model pair, then pass only that pair toupdate_agent_config. If no returned item matches the requested phrase, do not guess; ask for clarification or explain the available options. enabled_skill_ids: optional full list of enabled user-selectable skill IDs. Use[]to clear all user-selectable skills.add_enabled_skill_ids: optional skill IDs to add while preserving all existing skills.remove_enabled_skill_ids: optional skill IDs to unbind while preserving all other existing skills.knowledge_dataset_ids: optional full list of knowledge dataset IDs. Use[]to clear knowledge bindings.add_knowledge_dataset_ids: optional knowledge dataset IDs to bind while preserving existing knowledge bindings.remove_knowledge_dataset_ids: optional knowledge dataset IDs to unbind while preserving other knowledge bindings.knowledge_retrieval_config: optional replacement knowledge retrieval config. Omit to preserve it.database_bindings: optional JSON array replacing database bindings. Each item supportsdata_source_id,table_ids, optionalwritable_table_ids, orid/database_table_idsvalues indata_source_id:table_idform. Use[]to clear database bindings.add_database_bindings: optional JSON array of database table bindings to add while preserving other database table bindings. Prefer copyingbinding_candidates[].bindingfromlist_agent_database_tables.remove_database_bindings: optional JSON array of database table bindings to unbind while preserving other database table bindings. Prefer copying currentdatabase_bindingsfromget_agent_config.workflow_bindings: optional JSON array replacing workflow bindings. Each item uses a candidatebinding_idand preserves returned fields such aslabel,agent_id,workflow_id,version_strategy, and optionalversion_uuid. Use[]to clear workflow bindings.add_workflow_bindings: optional JSON array of workflow bindings to add while preserving other workflow bindings.remove_workflow_bindings: optional JSON array of workflow bindings to unbind while preserving other workflow bindings.- For specific bind/unbind requests, use the matching
add_*orremove_*parameter. Use[]for a full replacement field only when the user asks to clear that whole binding section. Candidate list results are evidence for choosing targets, not the desired replacement state for unbind requests. display_names: optional evidence-only object for governance cards, event summaries, and final answers. It does not change execution or validation. When you use candidate/list results, pass maps such asskills,knowledge_bases,database_tables, andworkflows; database table keys should preferdata_source_id:table_id.- The result includes
updated_fieldsand may includeconfig_changes/binding_changeswithchange_action(bind,unbind,replace, orupdate). Only claim a field or binding changed when those fields or the returned draftconfigprove it.
list_available_models accepts:
use_case: optional model use case. Defaults toagentfor Agent runtime model replacement. Useallonly when the user asks to inspect every available model.provider: optional provider slug filter.query: optional natural-language model phrase. Matching models are ranked first and includematchevidence.limit: optional maximum result count, capped at 100.
The result includes models[].provider, models[].model, models[].model_name, models[].use_cases, optional models[].match, and key capability flags. Use exactly those returned provider and model values together when calling update_agent_config.
replace_agent_memory_slots accepts:
agent_id: required resolved Agent ID.agent_memory_slots: required JSON array replacing the complete slot list. Each item supportskey,description,enabled, and optionalsort_order; use[]to clear all slots. Preserve existing slots unless the user asked to replace or remove them.
list_agent_skill_candidates accepts:
agent_id: required resolved Agent ID.query: optional search text for narrowing candidate skills.limit: optional maximum result count.include_selected: optional. Defaults to true; set false to exclude currently enabled skills.
list_agent_knowledge_candidates accepts:
agent_id: required resolved Agent ID.query: optional search text for narrowing candidate knowledge bases.limit: optional maximum result count.include_selected: optional. Defaults to true; set false to exclude currently bound knowledge bases.
list_agent_database_candidates accepts:
agent_id: required resolved Agent ID.query: optional search text for narrowing candidate databases.limit: optional maximum result count.include_selected: optional. Defaults to true; set false to exclude currently bound databases.require_write: optional. Set true when the user wants writable table bindings.
list_agent_database_tables accepts:
agent_id: required resolved Agent ID.data_source_id: required database ID returned bylist_agent_database_candidates.query: optional search text for narrowing candidate tables.limit: optional maximum result count.include_columns: optional. Defaults to false; set true when column details are needed.include_selected: optional. Defaults to true; set false to exclude currently bound tables for the database.- The result includes
binding_candidates; for binding, copy a candidate'sbindingobject directly intoupdate_agent_config.add_database_bindings. Do not manually recombine a database ID from one result with a table ID from another result.
list_agent_workflow_binding_candidates accepts:
agent_id: required resolved Agent ID.query: optional search text for narrowing candidate workflows.agent_type: optional filter, usuallyWORKFLOWorCONVERSATIONAL_WORKFLOW.limit: optional maximum result count.include_start_inputs: optional. Defaults to true.include_selected: optional. Defaults to true; set false to exclude currently bound workflows.
Success Evidence
create_agentsucceeds only when the tool result includes anagent_idand the created Agent name or detail href.update_agent_identityandreplace_agent_memory_slotssucceed only when the tool result confirms the requestedagent_idand the changed fields or returned draft state.update_agent_configsucceeds only for fields listed inupdated_fieldsfor the requestedagent_id. For binding changes, useconfig_changes/binding_changesas the authoritative action summary; do not claim omitted fields were changed, even if they were part of the user's original request.delete_agentsucceeds only when the tool result confirms deletion for the requestedagent_id.delete_agentssucceeds as a batch only according tooperation_group.item_results: report exactly how many targets succeeded and failed, and name failed targets when present. Do not treat one succeeded item as proof that the whole batch finished.list_available_modelsis read-only evidence. When replacing a model, use one returned item and pass itsproviderandmodeltogether; final answers must not claim the model changed untilupdate_agent_configsucceeds.
Truthfulness Contract
- Treat Agent Management tool results as authoritative. Do not claim an Agent was created, edited, deleted, opened, or rebound unless the corresponding tool result and route/client action evidence support that claim.
- If a mutation tool fails, approval is rejected, or success evidence is missing, say the operation was not confirmed and include the short failure reason when useful.
- Retry at most once with corrected arguments when the error is recoverable. Do not repeat the same mutating call with identical arguments after a failure.