1 of 24

Fetch.ai’s Tech Stack

Hack For Social Impact - Powered by Fetch.ai

Kshipra Dhame

Developer Advocate

2 of 24

Hack for Social Impact Overview

  • Date & Location: November 9th, 2024 | Digital Garage US, Inc, San Francisco
  • Mission: Foster creativity and collaboration to solve real-world problems through AI agents technology.
  • Workshop: This workshop includes basic starter guide in which participants will learn how to use fetch.ai’s tool stack to create a simple use case.
  • Prizes: Awards for Global Good, Social Transformation, and more. (overall $2000)
  • A chance to win Project Funding of $5000
  • Support: Access to mentors and resources to help participants succeed.

3 of 24

Fetch.ai’s Role and Vision

  • Fetch.ai as Sponsor:
    • Fetch.ai is committed to advancing AI technology and supporting innovation for social impact.

  • Fetch.ai’s Vision:
    • Empowering developers to build connected services and APIs without needing extensive domain knowledge.
    • Fetch.ai’s vision is to create marketplace for dynamic AI-driven applications.

4 of 24

Challenge Areas

Complex interactions between land degradation, drought, and people

Create a system of AI Agents that explores the significant implications of land degradation on natural disasters like drought and its effects on economic and social well-being in affected communities.

Fast and accurate AI translation of important UN documents

Develop a suite of AI Agents that tackle the complexities of translating UN documents, which often contain specialized terminology and intricate concepts.

Unraveling the Complexity of Building Codes for Housing Construction

Design a network of AI Agents that addresses the fragmented landscape of California's varied building codes, complicating affordable housing development.

5 of 24

Saturday, Nov 09

Sunday, Nov 10

Full Schedule

Schedule Key Events

08:00 PST

Registration

13:00 PST

Hacking Begins !!

13:00 - 16:00 PST

Final Hacking Time !!

16:00 PST

Presentations followed by Judging

For Full Detailed Schedule Please Click on below button.

6 of 24

Machine Learning

LLMs

AI Agents

Evolution of AI

Algorithms

Programmers relied on logic and reasoning for decision-making.

Enables computers to learn from data and make predictions or decisions without being explicitly programmed.

A specific application of NLP where models are trained on vast amounts of text data to understand and generate human-like text.

Leverage AI to autonomously perform tasks and interact with users.

7 of 24

What are Fetch.ai AI Agents?

  • Fetch.ai AI Agents are pieces of code that make choices and take actions in order to achieve specific goals on behalf of individuals or companies.

  • Fetch.ai AI Agents can communicate autonomously with other agents or systems without needing any human intervention.

  • Fetch.ai AI Agents in Fetch.ai can also perform transactions as they are equipped with wallets that enable them to send and receive funds.

8 of 24

FET Token

How Fetch.ai Agents Communicate and Transact

All agent interactions, like sending funds or accessing services, use the FET token. This token serves as the fuel for transactions, promoting smooth exchanges and incentivizing participation in the network​.

Fetch.ai agents operate within a blockchain ecosystem built on the Fetch.ai Network, which empowers their communication and transactions

Fetch Ledger

Agents use the Fetch ledger for secure, immutable transactions. This blockchain ensures all interactions and exchanges between agents are recorded transparently and can be trusted by everyone in the network​​.

Almanac Contract

The Almanac Contract is a smart contract, which is essentially logic and code on the blockchain. It enables agents to register on the network, allowing other agents to discover them and initiate communication.

9 of 24

AI Agents are independent decision-makers that connect to the network and represent data, APIs, services and people.

Key Components of Fetch.ai Toolstack

AI Agents

Agentverse

Agentverse serves as a development and management platform for these agents.

You can build, test and deploy Agents on Agentverse.

01

02

10 of 24

Quick Walkthrough

01

uAgents

  • Install uAgents library (Start here)
  • Try creating your first uAgent (Start Here)
  • Create two agents and start an interaction between them (Start Here).
  • Go through both the 101 course available on docs to understand better.

11 of 24

Quick Walkthrough

02

Agentverse

  • Create an Agentverse account on https://agentverse.ai using your gmail account.
  • Create an Agent online IDE of Agentverse (Link to guide).
  • Use the mailbox service to create a local agent (Link to guide).

You need to use mailbox service if you are using a python module apart from the ones listed here. It is IMPORTANT to note that due to security reasons, Agentverse doesn’t allow import of all modules. But you can run your agent locally and connect it to Agentverse via Mailbox.

12 of 24

Agent Creation

Local Agent

Agentverse

from uagents import Agent, Context, Model

from uagents.setup import fund_agent_if_low

agent = Agent(name="Agent A",

seed="seed-for-agent-A",

port=8001,

endpoint="http://localhost:8001/submit")

fund_agent_if_low(agent.wallet.address())

@agent.on_event("startup")

async def startup(ctx: Context):

ctx.logger.info(f"Agent address: {agent.address}")

if __name__ == "__main__":

agent.run()

from uagents import Agent, Context, Model

agent = Agent(name="Agent A")

@agent.on_event("startup")

async def startup(ctx: Context):

ctx.logger.info(f"Agent address: {agent.address}")

if __name__ == "__main__":

agent.run()

You can find a list of supported libraries here.

13 of 24

Building your first uAgent

Prerequisites:

  • Python 3.11
  • uAgents Library
  • Install uagents using `pip install uagents`

from uagents import Agent, Context, Model

from uagents.setup import fund_agent_if_low

agent = Agent(

name = 'My first agent',

seed = 'My first agent secret phrase',

port = 8000,

endpoint = ['http://localhost:8000/submit']

)

fund_agent_if_low(agent.wallet.address())

@agent.on_event('startup')

async def startup_handler(ctx: Context):

ctx.logger.info(f'My name is {ctx.agent.name}, my address is {ctx.agent.address}')

if __name__ == "__main__":

agent.run()

Agent Decorators:

  • on_event()
  • on_interval()
  • on_message()
  • on_query()
  • on_rest_get()
  • on_rest_post()

14 of 24

Let’s try communication between agents

Alice

Bob

class Message(Model):

message : str

@agent.on_message(model = Message)

async def message_handler(ctx: Context, sender: str, msg: Message):

ctx.logger.info(f' Got Message from {sender} : {msg.message}')

await ctx.send(sender, Message(message = 'Hello Alice, This is bob.'))

15 of 24

REST API for uAgents

@agent.on_rest_get("/custom_get_route", Response)

async def handle_get(ctx: Context) -> Dict[str, Any]:

return {

"field": <value>,

}

@agent.on_rest_post("/custom_post_route", Request, Response)

async def handle_post(ctx: Context, req: Request) -> Response:

ctx.logger.info(req) # access to the request

return Response(...)

16 of 24

Example Walkthrough

Predicting and Preventing Customer Churn in Banking

Customer Retention Agent

Customer Data

Churn Prediction Agent

17 of 24

Application Development

Build a solid application using Fetch.ai’s uAgents to solve one of the challenges that create a social impact by making custom front-end.

Solution Development

Your Objective

Build a solid solution using Fetch.ai’s uAgents to solve one of the challenges that create a social impact by chaining of multiple agents

Submission Guidelines

  • You will get all the submission details on the day of the hackathon.
  • You can also reach out to one of our team members for assistance.

18 of 24

Here’s what we would be judging you on

  • Technology: How technically sound the use of technology is?
  • Engagement: How engaging the project is for community?
  • Efficiency: How well the project makes use of technology? Could there have been more efficient ways of doing the same solution?
  • Practicality: Is the project practical from business point of view?
  • Scalability: Is there a demand for this solution in the chosen market?
  • Impact: How impactful the project is? Both options to be evaluated ( large number of people with low impact or small amount of people with profound impact)

19 of 24

README file

  • Project name
  • Description of the project
  • Instructions to run the project
  • Use-case example
  • Special considerations, if any

Remember, a good README will help judges arrive to a decision quickly!

20 of 24

Directory Structure

21 of 24

Important Resources

To learn more about how to use Fetch.ai’s tech stack :

22 of 24

FAQs

  • Do we have to use uAgents?
  • Yes, it’s a must.
  • Do we have to deploy our agents on Agentverse?
  • Yes, it’s a must, so others can access if they want to.
  • Agentverse doesn’t import X library
  • Yes, because there are security restrictions. You can create a local agent and connect it to a mailbox
  • Can I use any additional API/integration and connect two agents.
  • It would be AWESOME and would earn you extra brownie points.
  • But do we really have to use uAgents?
  • Yes, it’s a must.
  • Where should I post my queries?
  • Post your queries in Discord Channel.

23 of 24

Innovation is at the heart of everything we do.

  • AI Agent

24 of 24

Feel free to ask�and reach out to us!