- Step1: Install micro-agent via npm or yarn (e.g., npm install @builder.io/micro-agent).
- Step2: Import core modules such as Agent, Tool, Planner, and Memory from micro-agent.
- Step3: Define and register custom tools for API calls or internal actions.
- Step4: Configure conversational and long-term memory stores as needed.
- Step5: Set up a planner with chain-of-thought templates and execution strategies.
- Step6: Initialize an Agent instance with tools, memory stores, and planner.
- Step7: Invoke agent.run(userInput) to process queries and receive responses.
- Step8: Embed the agent in your web app, Node.js service, or serverless function.