|
| 1 | +{ |
| 2 | + "name": "Cypress-register-agent", |
| 3 | + "description": "Cypress Flow template", |
| 4 | + "use_case": "REGISTER_AGENT", |
| 5 | + "version": { |
| 6 | + "template": "1.0.0", |
| 7 | + "compatibility": ["2.12.0", "3.0.0"] |
| 8 | + }, |
| 9 | + "workflows": { |
| 10 | + "provision": { |
| 11 | + "user_params": {}, |
| 12 | + "nodes": [ |
| 13 | + { |
| 14 | + "id": "create_connector_1", |
| 15 | + "type": "create_connector", |
| 16 | + "previous_node_inputs": {}, |
| 17 | + "user_inputs": { |
| 18 | + "version": "1", |
| 19 | + "name": "Claude instant runtime Connector", |
| 20 | + "protocol": "aws_sigv4", |
| 21 | + "description": "The connector to BedRock service for claude model", |
| 22 | + "actions": [ |
| 23 | + { |
| 24 | + "headers": { |
| 25 | + "x-amz-content-sha256": "required", |
| 26 | + "content-type": "application/json" |
| 27 | + }, |
| 28 | + "method": "GET", |
| 29 | + "request_body": "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }", |
| 30 | + "action_type": "predict", |
| 31 | + "url": "http://127.0.0.1:3000" |
| 32 | + } |
| 33 | + ], |
| 34 | + "credential": { |
| 35 | + "access_key": "<key>", |
| 36 | + "secret_key": "<value>" |
| 37 | + }, |
| 38 | + "parameters": { |
| 39 | + "endpoint": "bedrock-runtime.us-west-2.amazonaws.com", |
| 40 | + "content_type": "application/json", |
| 41 | + "auth": "Sig_V4", |
| 42 | + "max_tokens_to_sample": "8000", |
| 43 | + "service_name": "bedrock", |
| 44 | + "temperature": "0.0001", |
| 45 | + "response_filter": "$.completion", |
| 46 | + "region": "us-west-2", |
| 47 | + "anthropic_version": "bedrock-2023-05-31" |
| 48 | + } |
| 49 | + } |
| 50 | + }, |
| 51 | + { |
| 52 | + "id": "register_model_2", |
| 53 | + "type": "register_remote_model", |
| 54 | + "previous_node_inputs": { |
| 55 | + "create_connector_1": "connector_id" |
| 56 | + }, |
| 57 | + "user_inputs": { |
| 58 | + "description": "test model", |
| 59 | + "deploy": true, |
| 60 | + "name": "claude-instant" |
| 61 | + } |
| 62 | + }, |
| 63 | + { |
| 64 | + "id": "cat_index_tool", |
| 65 | + "type": "create_tool", |
| 66 | + "previous_node_inputs": {}, |
| 67 | + "user_inputs": { |
| 68 | + "type": "CatIndexTool", |
| 69 | + "name": "CatIndexTool", |
| 70 | + "description": "Use this tool to get OpenSearch index information: (health, status, index, uuid, primary count, replica count, docs.count, docs.deleted, store.size, primary.store.size).", |
| 71 | + "parameters": { |
| 72 | + "index": ".kibana" |
| 73 | + } |
| 74 | + } |
| 75 | + }, |
| 76 | + { |
| 77 | + "id": "sub_agent", |
| 78 | + "type": "register_agent", |
| 79 | + "previous_node_inputs": { |
| 80 | + "cat_index_tool": "tools", |
| 81 | + "register_model_2": "model_id" |
| 82 | + }, |
| 83 | + "user_inputs": { |
| 84 | + "parameters": {}, |
| 85 | + "app_type": "chatbot", |
| 86 | + "name": "Cypress test sub Agent", |
| 87 | + "description": "this is a test agent", |
| 88 | + "llm.parameters": { |
| 89 | + "max_iteration": "5", |
| 90 | + "stop_when_no_tool_found": "true", |
| 91 | + "response_filter": "$.completion" |
| 92 | + }, |
| 93 | + "memory": { |
| 94 | + "type": "conversation_index" |
| 95 | + }, |
| 96 | + "type": "conversational" |
| 97 | + } |
| 98 | + }, |
| 99 | + { |
| 100 | + "id": "agent_tool", |
| 101 | + "type": "create_tool", |
| 102 | + "previous_node_inputs": { |
| 103 | + "sub_agent": "agent_id" |
| 104 | + }, |
| 105 | + "user_inputs": { |
| 106 | + "description": "Agent Tool", |
| 107 | + "include_output_in_agent_response": true, |
| 108 | + "type": "AgentTool", |
| 109 | + "parameters": { |
| 110 | + "max_iteration": "5" |
| 111 | + }, |
| 112 | + "name": "AgentTool" |
| 113 | + } |
| 114 | + }, |
| 115 | + { |
| 116 | + "id": "ml_model_tool", |
| 117 | + "type": "create_tool", |
| 118 | + "previous_node_inputs": { |
| 119 | + "register_model_2": "model_id" |
| 120 | + }, |
| 121 | + "user_inputs": { |
| 122 | + "parameters": { |
| 123 | + "prompt": "\n\nHuman:\" turn\" You are an AI that only speaks JSON. Do not write normal text. Output should follow example JSON format: \n\n {\"response\": [\"question1\", \"question2\"]}\n\n. \n\nHuman:\" turn\":You will be given a chat history between OpenSearch Assistant and a Human.\nUse the context provided to generate follow up questions the Human would ask to the Assistant.\nThe Assistant can answer general questions about logs, traces and metrics.\nAssistant can access a set of tools listed below to answer questions given by the Human:\nQuestion suggestions generator tool\nHere's the chat history between the human and the Assistant.\n${parameters.AgentTool.output}\nUse the following steps to generate follow up questions Human may ask after the response of the Assistant:\nStep 1. Use the chat history to understand what human is trying to search and explore.\nStep 2. Understand what capabilities the assistant has with the set of tools it has access to.\nStep 3. Use the above context and generate follow up questions.Step4:You are an AI that only speaks JSON. Do not write normal text. Output should follow example JSON format: \n\n {\"response\": [\"question1\", \"question2\"]} \n \n----------------\n\nAssistant:" |
| 124 | + }, |
| 125 | + "description": "A general tool to answer any question.", |
| 126 | + "alias": "language_model_tool", |
| 127 | + "include_output_in_agent_response": true, |
| 128 | + "name": "QuestionSuggestor", |
| 129 | + "type": "MLModelTool" |
| 130 | + } |
| 131 | + }, |
| 132 | + { |
| 133 | + "id": "root_agent", |
| 134 | + "type": "register_agent", |
| 135 | + "previous_node_inputs": { |
| 136 | + "agent_tool": "tools", |
| 137 | + "register_model_2": "model_id", |
| 138 | + "ml_model_tool": "tools" |
| 139 | + }, |
| 140 | + "user_inputs": { |
| 141 | + "parameters": { |
| 142 | + "prompt": "Answer the question as best you can." |
| 143 | + }, |
| 144 | + "app_type": "chatbot", |
| 145 | + "name": "Cypress test agent", |
| 146 | + "description": "this is the root agent", |
| 147 | + "tools_order": ["agent_tool", "ml_model_tool"], |
| 148 | + "memory": { |
| 149 | + "type": "conversation_index" |
| 150 | + }, |
| 151 | + "type": "flow" |
| 152 | + } |
| 153 | + } |
| 154 | + ] |
| 155 | + } |
| 156 | + } |
| 157 | +} |
0 commit comments