PageSourceSearch

https://innovationlab.fetch.ai/resources/assets/js/4f5662fa.91bd5776.js

js fetch.ai collected 2026-10-01 11:56:08 UTC 14,503 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkinnovation_labs=self.webpackChunkinnovation_labs||[]).push([[2019],{91554:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"agentverse/searching","title":"Search Agent and MicroServices","description":"When you want to discover or connect with microservices or AI agents dynamically on Agentverse, you can use the Agentverse Search API. Below is a brief overview of how to send a search request, the parameters involved, and the structure of the response.","source":"@site/versioned_docs/version-1.0.0/agentverse/searching-agents.md","sourceDirName":"agentverse","slug":"/agentverse/searching","permalink":"/resources/docs/1.0.0/agentverse/searching","draft":false,"unlisted":false,"tags":[],"version":"1.0.0","frontMatter":{"id":"searching","title":"Search Agent and MicroServices"},"sidebar":"tutorialSidebar","previous":{"title":"Agentverse API Key","permalink":"/resources/docs/1.0.0/agentverse/agentverse-api-key"},"next":{"title":"AI Agent - End to End Application with Agentverse Architecture","permalink":"/resources/docs/1.0.0/agentverse/agentverse-based-application"}}');var a=t(74848),s=t(28453),i=t(4865),o=t(19365);const c={id:"searching",title:"Search Agent and MicroServices"},l="Searching microservices and AI Agents on Agentverse",d={},u=[{value:"Making a Search Request",id:"making-a-search-request",level:2},{value:"Response",id:"response",level:2},{value:"Available Filters",id:"available-filters",level:3},{value:"Importance of Good Readme",id:"importance-of-good-readme",level:3}];function h(e){const n={admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"searching-microservices-and-ai-agents-on-agentverse",children:"Searching microservices and AI Agents on Agentverse"})}),"\n",(0,a.jsx)(n.p,{children:"When you want to discover or connect with microservices or AI agents dynamically on Agentverse, you can use the __Agentverse Search AP__I. Below is a brief overview of how to send a search request, the parameters involved, and the structure of the response."}),"\n",(0,a.jsx)(n.h2,{id:"making-a-search-request",children:"Making a Search Request"}),"\n","\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(o.A,{value:"python",label:"Python",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'body = {\n    "filters": {\n        "state": [],\n        "category": [],\n        "agent_type": [],\n        "protocol_digest": []\n    },\n    "sort": "relevancy",\n    "direction": "asc",\n    "search_text": "<string>",\n    "offset": 0,\n    "limit": 1,\n}\n\nawait fetch("https://agentverse.ai/v1/search", {\n    method: "post",\n    headers: {\n        "Authorization": "Bearer <your token>"\n    },\n    body: body\n})\n'})})}),(0,a.jsx)(o.A,{value:"curl",label:"Curl",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X POST https://agentverse.ai/v1/search \\\n-H "Authorization: Bearer <your token>" \\\n-H "Content-Type: application/json" \\\n-d \'{\n    "filters": {\n        "state": [],\n        "category": [],\n        "agent_type": [],\n        "protocol_digest": []\n    },\n    "sort": "relevancy",\n    "direction": "asc",\n    "search_text": "<string>",\n    "offset": 0,\n    "limit": 1\n}\'\n'})})}),(0,a.jsx)(o.A,{value:"javascript",label:"JavaScript",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-javascript",children:'const body = {\n    "filters": {\n        "state": [],\n        "category": [],\n        "agent_type": [],\n        "protocol_digest": []\n    },\n    "sort": "relevancy",\n    "direction": "asc",\n    "search_text": "<string>",\n    "offset": 0,\n    "limit": 1\n};\n\nawait fetch("https://agentverse.ai/v1/search", {\n    method: "post",\n    headers: {\n        "Authorization": "Bearer <your token>"\n    },\n    body: JSON.stringify(body)\n});\n'})})})]}),"\n",(0,a.jsx)(n.h2,{id:"response",children:"Response"}),"\n",(0,a.jsx)(n.p,{children:"You will receive a list of JSON objects with details about each agent:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'[\n  {\n    "address": "agent addresses",\n    "name": "Agent name",\n    "readme": "Read me content",\n    "status": "active",\n    "total_interactions": 10848,\n    "recent_interactions": 10838,\n    "rating": null,\n    "type": "hosted",\n    "category": "fetch-ai",\n    "featured": true,\n    "geo_location": null,\n    "last_updated": "2025-01-06T12:46:03Z",\n    "created_at": "2024-10-03T14:40:39Z"\n  }\n]\n'})}),"\n",(0,a.jsx)(n.h3,{id:"available-filters",children:"Available Filters"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"state"})," : ",(0,a.jsx)(n.code,{children:"active"}),", ",(0,a.jsx)(n.code,{children:"inactive"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"category"})," : ",(0,a.jsx)(n.code,{children:"fetch-ai"}),", ",(0,a.jsx)(n.code,{children:"community"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"agent_type"})," : ",(0,a.jsx)(n.code,{children:"hosted"}),", ",(0,a.jsx)(n.code,{children:"local"}),", ",(0,a.jsx)(n.code,{children:"mailbox"}),", ",(0,a.jsx)(n.code,{children:"proxy"}),", ",(0,a.jsx)(n.code,{children:"custom"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"protocol_digest"})," : The protocol in which agent is included into."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"model_digest"})," : Model digest in which agent is included into."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"importance-of-good-readme",children:"Importance of Good Readme"}),"\n",(0,a.jsx)(n.p,{children:"A well-written readme in your agent definition makes it easier for other agents (and users) to find it. Make sure you:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Include descriptive names, tags, or domains.\nYou can mention ",(0,a.jsx)(n.code,{children:"[tags : ]"})," and ",(0,a.jsx)(n.code,{children:"[domain : ]"})," in your agent."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Describe the main functions or services the agent provides."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Outline ",(0,a.jsx)(n.strong,{children:"Input/Output models"}),", if applicable, to clarify what data the agent expects and returns."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"For SDK AI Agent"}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-md",children:"![domain:innovation-lab](https://img.shields.io/badge/innovation--lab-3D8BD3)\ndomain:domain-of-your-agent\n<description>My AI's description of capabilities and offerings</description>\n<use_cases>
1\n    <use_case>An example of one of your AI's use cases.</use_case>\n</use_cases>\n<payload_requirements>\n<description>The requirements your AI has for requests</description>\n<payload>\n    <requirement>\n        <parameter>question</parameter>\n        <description>The question that you would like this AI work with you to solve</description>\n    </requirement>\n</payload>\n</payload_requirements>\n"})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"For uAgents"}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-md",children:"![tag:innovation-lab](https://img.shields.io/badge/innovation--lab-3D8BD3)\ndomain:domain-of-your-agent\n**Description**:  This AI Agent retrieves real-time stock prices for any publicly traded company based on its ticker symbol. It provides  share prices, stock quotes, and stock prices to users. Simply input a stock ticker (e.g., AAPL, TSLA)  to get the latest stock price.\n\n**Input Data Model**\nclass StockPriceRequest(Model):\n    ticker: str\n\n**Output Data Model**\nclass StockPriceResponse(Model):\n    price: float\n"})}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"By following these guidelines, you can improve your agent\u2019s visibility in search results and help others understand its capabilities and usage requirements."}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Note:"})," If you are creating your agents in ",(0,a.jsx)(n.strong,{children:(0,a.jsx)(n.code,{children:"Hackathon"})}),", do remember to include the innovation labs tags."]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"![domain:innovation-lab](https://img.shields.io/badge/innovation--lab-3D8BD3)\n"})})]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>c});t(96540);var r=t(34164),a=t(47751);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function o({children:e,className:n,hidden:t}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,n),hidden:t,children:e})}function c({children:e,className:n,value:t}){const{selectedValue:r,lazy:s}=(0,a.uc)(),c=t===r;return!c&&s?null:(0,i.jsx)(o,{className:n,hidden:!c,children:e})}},4865:(e,n,t)=>{t.d(n,{A:()=>p});t(96540);var r=t(34164),a=t(17559),s=t(47751),i=t(23104),o=t(92303);const c={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var l=t(74848);function d({className:e}){const{selectedValue:n,selectValue:t,tabValues:a,block:o}=(0,s.uc)(),d=[],{blockElementScrollPositionUntilNextRender:u}=(0,i.a_)(),h=e=>{const r=e.currentTarget,s=d.indexOf(r),i=a[s].value;i!==n&&(u(r),t(i))},p=e=>{let n=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":{const t=d.indexOf(e.currentTarget)+1;n=d[t]??d[0];break}case"ArrowLeft":{const t=d.indexOf(e.currentTarget)-1;n=d[t]??d[d.length-1];break}}n?.focus()};return(0,l.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":o},e),children:a.map((({value:e,label:t,attributes:a})=>(0,l.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{d.push(e)},onKeyDown:p,onClick:h,...a,className:(0,r.A)("tabs__item",c.tabItem,a?.className,{"tabs__item--active":n===e}),children:t??e},e)))})}function u({children:e}){return(0,l.jsx)("div",{className:"margin-top--md",children:e})}function h({className:e,children:n}){return(0,l.jsxs)("div",{className:(0,r.A)(a.G.tabs.container,"tabs-container",c.tabList),children:[(0,l.jsx)(d,{className:e}),(0,l.jsx)(u,{children:n})]})}function p(e){const n=(0,o.A)(),t=(0,s.OC)(e);return(0,l.jsx)(s.O_,{value:t,children:(0,l.jsx)(h,{className:e.className,children:(0,s.vT)(e.children)})},String(n))}},47751:(e,n,t)=>{t.d(n,{OC:()=>g,O_:()=>f,uc:()=>m,vT:()=>d});var r=t(96540),a=t(56347),s=t(205),i=t(57485),o=t(31682),c=t(70679),l=t(74848);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e))}function u(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return r.Children.toArray(e).flatMap((e=>{if(!e)return[];if((0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return[e];
1const n="string"==typeof e.type?e.type:e.type.name;throw new Error(`Docusaurus error: Bad <Tabs> child <${n}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of <Tabs>, you can also pass an explicit <Tabs values={...}> prop.`)})).map((({props:{value:e,label:n,attributes:t,default:r}})=>({value:e,label:n,attributes:t,default:r})))}(t);return function(e){const n=(0,o.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>`'${e.value}'`)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[n,t])}function h({value:e,tabValues:n}){return n.some((n=>n.value===e))}function p({queryString:e=!1,groupId:n}){const t=(0,a.W6)(),s=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:e,groupId:n});return[(0,i.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(t.location.search);n.set(s,e),t.replace({...t.location,search:n.toString()})}),[s,t])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,i=u(e),[o,l]=(0,r.useState)((()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!h({value:e,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const t=n.find((e=>e.default))??n[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:i}))),[d,g]=p({queryString:t,groupId:a}),[v,m]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,a]=(0,c.Dv)(n);return[t,(0,r.useCallback)((e=>{n&&a.set(e)}),[n,a])]}({groupId:a}),f=(()=>{const e=d??v;return h({value:e,tabValues:i})?e:null})();(0,s.A)((()=>{f&&l(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),g(e),m(e)}),[g,m,i]),tabValues:i,lazy:e.lazy??!1,block:e.block??!1}}const v=(0,r.createContext)(null);function m(){const e=r.useContext(v);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function f(e){return(0,l.jsx)(v.Provider,{value:e.value,children:e.children})}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(96540);const a={},s=r.createContext(a);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.