Based Hedera x Eliza (@shawmakesmagic) Devs Disrupting AI Agents Live

Recorded: April 3, 2025 Duration: 1:38:52
Space Recording

Short Summary

Eliza Labs is set to launch its V2 open-source AI agent framework, enhancing user experience and community engagement. The integration of Hedera's agent plugin signifies a strategic partnership, while discussions on agent-to-agent communication protocols highlight emerging trends in the blockchain space.

Full Transcription

Thank you. Hello everyone and welcome to this really exciting, exciting live stream that we're
going to be doing.
So I'm going to be joining with Shaw, the founder of Eliza Labs.
Probably doesn't need an introduction, but just in case those of you
don't know what sort of Eliza is, the Eliza operating system and sort of Shaw's role in it.
Shaw, I'll hand the mic over to you just so you can give a quick introduction and then I'll basically
map out sort of that very high level rough agenda for this call, what we're going to be doing.
But Shaw, please over to you my friend. Sure. Eliza is an open source AI agent framework. So obviously, LLMs are really powerful, but in
order to actually operate in the world and do the kinds of things we want them to do agentically,
you know, interacting with us or doing things on our behalf, we have to build a framework around
them and connect them to different, you know, places in the world and give them things they
can do in ways to interact with us. And so that's what we're doing is creating this framework around them and connect them to different, you know, places in the world and give them things they can do in ways to interact with us.
And so that's what we're doing is creating this framework around LLMs and
so we're LLM agnostic.
You can use most, almost all LLMs I can think of are supported.
And we have people building plugins for pretty much everything.
And you can use that as a way to build agents,
which are basically a new kind of intelligent mini app that can go wherever you want to go.
And so instead of making people come to your website, you might be able to make your website come to your people.
So we're seeing a kind of new paradigm of the web and we're trying to be part of that.
So Eliza is an open source framework that you can download and run.
download and run. In the past, it was very dev heavy and I'm
sure Jay you've been through the.
The more difficult times of developing, but we've been working
on what we call V2 or like our kind of 1.0 release where we
were, you know, more of a research project and and a small
team to a much more rigorous product. I think now with much
better experience and so we're in beta with that. We're about to
launch that out to everybody.
It makes the entire experience like just run one line commands
and you're all set up and good to go.
I tried the CLI, the Alliance V2 or version 1.0
just the other day and it was a better developer experience.
Let's say that.
Yeah, dramatically.
So we're just finishing the plugin,
publishing and ecosystem stuff.
So it should be a lot easier just to say like,
cool, I made a plugin, push it.
Don't have to worry about pushing it to a GitHub registry
or something like that.
And just kind of that final polish.
And I think it'll be like a really good time
for people to come.
And I'll be doing another round of dev school
and trying to onboard another generation of agent developers into this whole thing yeah well I mean I remember
seeing the the github contributions that graph of sort of big open source projects and um
we'll see if I can pull it up in in the background but but sort of basically when when Eliza came out
which is I mean when did you go open source? About six months ago now?
Is that right?
I mean, I've been working on this for a long time,
but people really discovered it late October,
early November of last year.
And then there's that just graph of contributions, Zoom.
It's really, really impressive that the community,
which has been built around it.
And obviously we're kind of in a bear market now,
but it's great to see that you guys are still building it.
And I'm really excited to see. We just got our Hedera agent plug in loaded up into the registry.
I know there's a few more tweaks that obviously needs to be done for the V2, but we'll definitely be pushing it out on our side.
And I guess, I mean, so, well, let's sort of move on to what we aim to cover today.
Basically, in my head, there's two things.
I want to showcase this really powerful agent-to-agent communication protocol
that we've got on our native Hedera network.
Now, again, similar to what you're saying in terms of Eliza being LLM
and agnostic to anything, anyone can technically use this agent to agent protocol. And I'll go
into a bit more detail of it later on. And then I'd really like to work with you, Sean, and go,
okay, we've got this protocol here. How do we embed it into that ELISA layer so it's really
seamless? But before I go into that, I'm just interested in hearing what your thoughts are on
the agent to agent communication protocol stuff. I mean, obviously we've got MCP has been relatively new.
On the Web2 side, IBM have actually been starting
to do like an agent to agent protocol.
I think they call it BAI or something.
And of course, NIR protocol is doing a lot of stuff
when it comes to agent communication.
So just be interested to draw it in what's your pulse
on this side of it?
How important is it for the future that you see communication so just be interested to draw it and what's your pulse on this side of it how
important is it for the future that you see um if if it is important at all i have complicated
feelings on this um on the one hand i really want to make agents that live in human communication
channels and i think like why do we need agent specific protocols um you know why can't they just communicate on existing
protocols you know and things that humans can read and really like this revolution in aging
interoperability is driven by the fact that they can speak english and you know i could say like
okay like what are the primitives that i need to interoperate we need to be able to pay each other
we'll send you secrets and private data and you'll send you files and just generally like text and information and like JSON.
And if we have something that covers all of that, like, well, we can just communicate on Discord for most of that, but not all of it.
So, you know, I think there is definitely in practice, I found that there's kind of a need for something we all agree to for payments and secrets.
That's probably beyond just like sending information to each other in a chat
room. And if you think about like, if I was to like send you like a, let's say we were doing a
project together right now. And we were like, I was like, I'm not going to send you the private
key on discord or like a DM. Like I'd probably send it to you in like a signal group when we
delete, you know, like we, we would have some sort of private protocol for doing something like that.
So I'd expect the same kind of thing from an agent yeah um and so so you know originally i was much more purist about this and i would say
like there should be no agent protocols like human protocols are agent protocols but in practice like
in deploying this i found that there are these kinds of friction points that are real which are
around secrets and and that kind of like like private information um in payments and stuff
where you know you can't just use a
chat room to moderate that um i also think then that that i would also turn around that like
pretty much any human protocol i mean agent protocol could probably also be a human protocol
and like well like the the topic thing that you guys have developed with um uh with this
agent protocol and stuff it could also just like drive chat rooms and and all kinds of human stuff
yeah i mean i i imagine that like, yeah,
because we're in the age where agents are the hot thing,
we're all thinking about that.
But the protocol is way more general than that, of course.
You know, and it's cool.
It's cool to brand it as an AI agent protocol for sure.
Yeah, oh yeah, I mean, you're telling me, man,
you know, been kind of pigeonholed as the agent guy.
So, yeah, yeah, so go for it go for it go ahead please
uh well i just gonna say actually yeah sorry we have some delay yeah i would just wrap my
my long-winded thought to say like i think that there's a balance of like um there are places
where having these protocols will have utility um i think that we still have to get like
like i think about the metaverse a lot in in how it compares to agents and how like the metaverse
was super hypey you know it was like well it's gonna be everything everywhere there's gonna be
thousands of people let's like just solve it for one person but make one good experience where one
person comes in and they're like holy shit this is amazing or like five people let's just get that
down and i think agents are kind of the same boat where it's like let's just get down to like can one agent be in my discord
and be useful without being annoying and like responding to every single person um or or stuff
like that and then like can we can we build that out into a swarm that can now interoperate and
communicate and i would say we're like art with us where we're just getting into like now we have an
or like a swarm of six agents that work together
and communicate and kind of are like Lego blocking together.
And I still think that there's a lot of challenge there.
And those challenges really come down to,
if the agent, if somebody hires my agent,
then it has to get secrets from them,
and it has to onboard with them and get access controls.
And I think that's the devil in the details with a lot of this stuff you know if that makes sense yeah yeah no totally so i mean
i know in conversations which we've had internally when we're working on these protocols payment
comes up as as the big one and actually there's a um with that topic uh that topic sort of
approach which which i shared with you which I'll share live, what
you can actually do is you can set this, this is actually a new HIP, a new Hedera improvement
proposal which came out, in which you can set a custom fee for a topic, meaning in order
to submit a message for the topic, yes, you pay the base transaction fee, which is something
like 100%, so it's pretty cheap, but you can add a custom fee on top of that,
of say five USDC, meaning in order to send that message,
in order for it to actually be published onto that topic,
you have to have paid X amount of token of your choice
or native sort of HBAR token,
which obviously when it comes to sort of proving
that that compute's been paid for,
that would be, it's quite a nice solution for it.
However, does it fix the secrets key and that element to it?
Definitely not.
So, I mean, yeah, it sounds like there's always going to be new problems to face.
There's probably problems and issues that we haven't considered as well.
But, yeah.
Yeah, but you could build a secrets key management system
on top of that if you wanted to.
You'd say like, okay, well, we just need some way
that these two sides can issue some sort of key to each other
and then they can just have some sort of encrypted session.
You know, it could be like a ZKTLS thing.
So you could even like have like a proof that it's,
you know, that it's real and both sides agree to it
and blah, blah, blah, you know.
But, you know, that's generally like,
once you have your own protocol, you're probably going down this direction of like doing whatever you would want you know i'd imagine people are watching this and going huh let's
let's do that yeah awesome right well i'm going to share my screen then i'll do a quick demo as to
this this this protocol which we're talking about and then yeah from that let's let's actually look
at how we can basically bring it into the ELISA
operating system source code sort of more natively
so it's even more robust.
I'll share my screen and get into the nitty gritty stuff.
So here I've got, I'm running sort of a few scripts here.
The first one is the ELISA server.
So this is actually ELISA version one
or ELISA 0.26 version.
And this is basically just running like a generic agent.
It's got a few Hedera tools.
We've got obviously our Hedera agent tool,
Hedera agent plugin.
Then we have this script over here,
which is, this is essentially the client agent.
So in this case, the client agent is me.
We'll be in sort of, it'll be a human to agent thing,
a human agent sort of communication.
And then we've got another, this is the agent
which is sort of consuming these messages
and essentially relaying it to the ELISA agent.
So this agent is listening to this consensus topic.
We can actually see, we'll be able to see
all of the messages sort of being submitted
onto the Block Explorer.
But I'll start off by, and this would be something
which an agent does or a human does.
They would ask, connect to this particular account.
Ask connect to this particular account.
So here we're using a CLI interface,
which is actually talking to an agent
that has tools for the HCS10 protocol,
just to make it a bit easier.
But as you can see, it's basically,
it's connecting to, it's trying to connect to this agent.
So this agent has its own account. It's connected to the agent, it's basically, it's connecting to, it's trying to connect to this agent. So this agent has its own account.
It's connected to the agent, it's retrieving the account.
And then it's creating a private topic,
which only this client agent and the connecting agent
are able to communicate to.
And as you can see, it's just added a active connection.
So I have successfully established a connection
with agent account ID.
And we can also see the specific topic ID over here,
which is essentially where the messages will be sent to and from.
But there's this new topic that's just been created at 4th of April.
That's my time, 3rd of April for you.
And as you can see, there's only one message.
So if we go back over here, we can go,
there'll be logs because it's now found a new connection.
But if we go back over here and just go, hello,
it will now be sending this message.
We should see this live on the topic.
And again, only the two agents.
This has created what's called a private topic
in which there's a threshold key.
So one of the two keys,
only one out of two of these relevant agents keys
or humans keys, whatever,
are needed to submit a message.
And no one else can submit messages to this topic.
But this threshold could technically be one of six
or it could be one of 10.
So you can then have multiple agents
inside of a particular topic
communicating with each other.
That one was sent.
So we've got J Call agent sent hello.
And then as you can see, it's replied.
So the consumer over here has now received that message
and it's replied,
hello, how can I assist you today
with your Hedera network needs?
That's obviously been doing that API request to our ELISA backend.
And we can then do things like create a token called ELISA.
This is all on testnet.
This is all on testnet.
ELISA token with symbol ELISA initial supply.
And again, this will now be communicating to
over that HCS 10 network.
We'll see another one of these messages pop up.
The ELISA agent will be consuming it,
hopefully understand the intent and generate the action.
Okay, and all right, so we're gonna go.
I think it told us how it didn't actually do it.
Yeah, yeah, so what's up,
because we're using this agent interface
above the communication protocol,
I think we need to say,
send the message to the communication protocol. I think we need to say, send the message to
the connected account.
Oh, I've just copied and pasted the wrong thing.
Create a token.
So it sends it. I did copy and paste the wrong message.
So it sent it, let's see.
It probably won't pick up the intent over here.
Let's do it again, so we go, send a message.
And then we wanna go create a token, that's what we want.
Yeah, I think because we've got this agent,
which is sort of acting as the interface
over the protocol layer,
sometimes it needs to be a bit specific as to which tool.
So now we should also then be able to see it happening
over here, extracted data, symbolizer,
so sort of generating it, executing handler
for Hedera create token.
This is on the ELISA agent on the server side.
And then it will come back with the token that we've created.
And it looks like it's done it as well actually. So if we, in here, yeah, token ID,
we can see the transaction details.
That's cool.
There we go.
So, I mean, look, this stuff,
we've seen this stuff a hundred times before.
Now, to my point earlier about actually,
you can have it such that this topic
has a fee schedule on it.
So you could say, right, every message on here requires
five USDC in order to actually send it.
So currently one message, like that message costs
0.000012 dollars, so 100% I think that is.
But you could add a custom fee schedule on top of that of five USDC
so that you know whenever this agent has consumed it,
whenever this agent has,
whenever this sort of message has been sent,
a fee must have been paid.
So you know that that compute has been paid for essentially,
which I think could be good for the agent
value transfer side of things.
But obviously, if we go into the code,
what we're doing at the moment,
I don't think we're embedding this particular protocol
into the Eliza agent as well as it could be.
It's really just, we're consuming the topic
in a separate script.
And then we are basically, we basically got this proxy agent,
which is essentially posting the past content
to the ELISA server via REST API,
as opposed to actually being embedded directly
into the ELISA server.
So, I mean, what do you think, sure?
Do you think we could maybe spend some time
trying to actually get it onto the ELISA layer
rather than it being that proxy post?
I think if you're...
Oh, my bad.
Sorry, I didn't have you on the stage.
My apologies.
No, it's not your bad.
I somehow managed to flick a gesture on my Mac.
To pull me out of the thing.
Did you hear me?
You could hear that?
Yeah, yeah.
So generally, this is not a bad approach.
I made it early on in the development of what became Eliza,
I made an application where I did the same kind of thing,
where I basically had the REST API wrapping wrapping and then the room manager was actually handled
in the front end.
And so just doing the agent that way is like totally fine, right?
And now we have a new API in front end stack, which is all web sockets.
So now I can go back and forth and send multiple replies.
The only downside of that HTTP approach to me is that it can only reply once and you couldn't do like an action planning kind of approach.
So the thing that we're doing now in V2 is you can call multiple, you could like, you could say like, oh, cool, I'll do that transaction for you, which is reply.
Then go and commit the transaction and then reply again.
Okay, cool.
I did the thing.
Here's the result.
And we didn't really have that in the first one.
And then we did do the chaining a bit,
but it wouldn't send the chain responses back to the front end
because the way HTTP works is it can just call a response.
You could set up multiple responses,
but generally you just end up doing WebSockets.
Right. The WebSockets approach.
So is that time
i'm just looking for the docs now um yeah everything is very different now there's no
there is no rest plugin yeah this is the this is the docs great um this is the docs yeah perfect
um yeah so so now we have this kind of new um gu, which wraps the, and so when you run the runtime, that starts up the REST API
and also starts with a client that you can use.
So if you wanted to, you could say like, okay, well,
I could then go and approach it from WebSockets.
But I think what you actually want is a service.
And so services are things in the old version of Eliza,
we had clients and services.
And they're basically like,
I just kind of rolled them both into just being services. This idea that I have some service that needs to get information,
send information, have some persistent state going on.
So that would be like a Discord service or a Telegram service.
You know, I'm forgetting the name of your exact protocol,
but the HT10, is that what it is?
Yeah, it's HCS10.
Yeah, HCS10 service, right?
So we could do something like that, right?
And then so it would start that service, and it would say like, okay, well, it's going to start a PubSub, right?
So it's going to have a publish function and then a subscriber function for that topic.
And then we would just have that service do that.
Now, you mentioned something I want to go
back to, which is like, you're building this topic system, which to me would be really interesting
for something like agent discovery. So not just like, okay, cool, agents are chatting, like they
can chat anywhere. But like, hey, I need to go find another agent that does this thing that I
can't do, for example, right. And so that's actually like, I know near is working on this
kind of thing to a lot this this idea of like, you your home chat gpt but that's you know if that needs to do something it
can't do it can go like hire these other ones um i think that that's a really interesting uh use
case and the way that you guys built this with the topic it really it maps to like a kafka worker
like a queue or like like it maps to other um like distributed system principles that I like. So I think that could be really useful for that kind of service discovery
So that's actually,
let me see if I can get the rights.
Let me see if I can get the right.
I know there is something like that here.
I've just moved over to the manual CLI
as opposed to having that sort of AI agent
which basically does this.
But if we go list managed agent,
start monitoring this year,
list of connections.
But there's definitely an agent discovery component to it,
where exactly like you say, there's a registry
of all of the available agents.
Dig it, because yeah, so we've got all of these
on here, so we've got standards, HCS 10,
and then let's see if there's anything on topic registry.
Registry operations, registering AI to an agent.
So there's definitely a, yeah,
I'm pretty sure there's like a,
there's a dedicated topic just for aggregated
these, all of these registries.
It's there somewhere.
You just have like a, hey, here I am kind of of thing and then you just yeah the list yeah yeah and it's like a little sort of it comes with a
description and then of course you can do things like what's the price of of the relevant action
that it has or or whatever yeah they have like little bidding chats yeah yeah yeah yeah so it's
and and that's it and actually you could because you could, whenever there's like a, whenever there's a new,
whenever there's a new agent to agent
or human to agent topic,
which is created,
that's created for that particular chat room.
So actually you could,
you could have the agent autonomously select
what is the fee schedule going to be
for this particular chat room.
And that could be done dynamically. It wouldn't have
to be like, oh, every single time an agent talks to me, I'll always charge five bucks. You could
actually have it where, okay, depending on this particular instance, I'm going to charge 10,
or maybe I'm going to charge a different token because I don't know, I see the transaction
volume on that's interesting. Also, the chat room becomes a ledger. So it could be like, I'm gonna create a new chat,
which is like our ledger.
And then if, you know,
and to post on that is like a $10 fee schedule or whatever.
And then you post that,
and then that becomes like the receipt of the transaction.
And then I post the information you wanted or,
or a receipt of my, you know what I mean?
Something like that.
So I'm gonna, yeah.
See if I, if I register an agent,
does that test agent, agent description, cool agent.
I'm pretty sure this is, yeah, I bet that's been done
100 million times, cool agent.
But I think if we, what's that,
insufficient pay balance, oh great, okay, let's see if that's because of my run out of HBAR.
Not any of these accounts.
I'll top that up quickly.
Let's do that. so Yeah, so what basically happens is it looks like it's creating the, it's sort of inscribing
everything on the consensus service,
including the actual image as well,
which is quite interesting.
There's this team over here
who have been pioneering the HCS 10 standard,
they've also created sort of file storage standards
where essentially use this consensus service,
this pub sub topic,
which is obviously totally hosted on the blockchain.
And you can essentially add files onto it
because they
they basically chunk the file up convert it into base 64 create a standard where you can then sort
of rebuild the chunks um makes sense which which i think is and they're really focusing on building
like a whole decentralized internet just totally on the on the consensus service. But by the looks of it, it's created that sort of profile over here,
as well as an inbound and outbound topic,
which is where all of the conversation initiations come to.
So we've got a inscription, is that the right one?
Transaction scientists, inscribe.
Outbound topic.
Oh, it's still doing it, it's still doing some stuff. So it's created the profile validation.
Processing registration transaction successfully.
Processed registration transaction.
Where's that?
I wonder if...
Can we list the agents?
Yeah, so if I do now, if we go list agents,
now it should show up with the two.
But this isn't all of the agents.
This is just the... It is just what I've created.
Yeah, yeah, yeah, yeah.
So I'm just trying to find the new creation
registration request.
It looks like it's that transaction.
And then if we go over here,
let's just register.
Let's see, that's a crypto transfer.
I'm not quite sure. I'm not quite sure.
I'm not quite sure.
It's probably in the account for my,
might be in this account.
One of the messages which this one submitted.
Cause I'm saying that basically there's a topic
which is specifically for the crypto transfer.
I don't know.
I think we're going around in circles. Anyway, so yeah, somewhere it's adding it to a registration.
It's on the chain somewhere, we just got to find it.
Yeah, but no, that could obviously be sort of the overlord agent registration topic, where exactly,
you can then find which one I need to then communicate to,
has a description of that agent.
And so you're saying that would then be good
if we have a look at the, that would be a service,
would that live inside of the ELISA source code?
Would that be like a .
The way that I would build this is I would,
I would build a service into the
plugin so you have a plugin i mean we just do this i'm going to show you how to how we can do this
pretty quickly yeah yeah so yeah in packages create something new here um do we already have
we have a plugin for um uh for the the head air stuff right somewhere yeah yeah yeah let's go
let's clone that i don't know put it locally because it could just point it to the GitHub repo for it now.
One thing that might be good is to look at how we do some of the other clients
and then like look at Discord and we'll just look at the equivalent of how we could do that here.
we'll just look at Discord and we'll just look at the equivalent of how we could do that here.
There will be a little confusion between version one and version two.
Yeah, so this I believe is focused more on version one.
That's fine.
When I say service, I mean client.
We'll create a client.
What happened was we started using client as a word too many,
you know, it's just like, there's only so many words.
What I hate about tech, isn't it?
It's like you have this one word,
which is used for everything.
And so yeah, so clients are, what have you got?
You've got the Discord client, the Telegram client,
which plugs into Discord and plugs into Telegram.
That'd be something else too, yeah?
Yeah, well then you have like a PDF service
or a browser service.
What's the other thing about a browser?
Like is it a client or a service?
Yeah, yeah, yeah.
You know, I don't know.
I wish it was a mobile service.
The architect, we've got the actions,
and we've got a pretty robust set of actions.
Just core stuff, and then we've got,
this provider is just sort of sorting out the agent,
the agent client.
Yeah, that's good.
Okay, and then, so yeah, well, I'll listen.
I'll shut up and listen.
Let's go look at our, let's go look at the index.ts in that plugin.
Yep, and if we go down to the,
see that Hedera plugin right there?
You see actions.
We just have like empty services.
So we just make a service, right?
You could probably, yeah, just make a service, sure.
Yeah, whatever.
And so all a service is, is like a thing that runs,
which can be accessed from other places.
So you could say like, okay, I want to get service, right?
And like, if you needed to get your service from an action
or get it from somewhere else,
you could totally get a reference to it, which is useful.
But generally just kind of does its own thing and then like it routes stuff in and out right yeah yeah yeah that
sounds that sounds like like what we need so so here it could be something like a um get sort of
like a listen a listener service or subscribe subscribe to the topic service yeah so let's make a new service uh class yeah you know just make a new thing and
let's call it topic service
are there any other existing are there any good service implementations which you recommend we
pull up maybe get the old cursor
to help us build?
Oh, yeah, for sure.
much rather Vibe code it.
I think what we should do is we should look at Discord.
What's the difference?
You've got topics.
Discord's got servers and channels.
It's a little different. It's kind of the same.
Yeah, but it's a different concept.
So that's in the Eliza OS plugin registry, yeah. It's got servers and channels. It's a little different. It's kind of the same. Yeah. It's a different concept, isn't it?
Would that be in the ELISA OS plugin registry, yeah?
Yeah, sure.
That's a good way to navigate it.
And we could clone it, but let's just look at it. It's not too much code.
So there's just kind of two main files here that matter.
There's a lot of files, obviously.
It's got its own actions, providers and stuff.
But the main thing, the entry point is index.ts.
Let's look at that.
And that's really simple, right?
It's just saying, okay, well, I have this client.
Remember, services is what we consolidate all this to,
but in V1, what we're looking at right now is clients.
We've changed a service, but it's the same thing.
We're looking at, we see we have a list of clients.
They don't functionally do anything very different.
They're just like a thing that runs that can handle stuff.
So you can see that, yeah, we need to open clients.
And so this starts up the discord
client. Now, the reason I hated this is because you can see the discord client has a reference
inside of it to another client. See how there's a discord client client? Right. Yes. That's the
actual discord, like discord.js client that we're importing. Right. Right. Okay. Okay. So the general
pattern here is we create uh our class which then
will in the constructor set up and create the an instance of whatever our client is you could have
multiple agents so you should make sure each one has its own instance um that in our case is going
to say okay well i'm gonna i'm gonna um wake up and then i'm going to look for topics that I am already subscribed to with my account
right um and so in this case let's just the equivalent of that you see we're like okay let's
construct this we call the super whatever we set the API we set some discord only stuff with
intense that's just discord stuff we go we set the runtime discord has voice you know this is
all just set up right right? Nothing here is...
We're not even going to really do anything like this.
Probably we'll skip most of this.
But you do see that set up event listeners right there.
Where's that event listener?
Oh, yeah, here we go.
Yeah, yeah, I got that.
Yeah, yeah, yeah.
So we're going to probably do something kind of similar to that
where we're going to have some sort of subscribe, right?
Like, okay, let's subscribe to all of the topics that the we're going to have some sort of subscribe right like okay let's
subscribe to all of the topics that the agent is part of or something and here you see how's that
client dot on that's discord's way of saying okay well when i am added to a guild or i create a guild
or like a join a server basically then call something um the main thing we're looking for
here is that you see that there is a on message create toward the bottom of your screen.
On message create. Yep. See it.
And so there's some event which says on message create and then
that calls handle message, right? Yeah. You see that message
manager dot handle message dot bind binds this. So in message
manager there is a handle message function and this is
kind of how we do all of the
different services there's some sort of like handle that you know this is what you need you
have some i subscribe to that a message comes in i'm going to take that message i'm going to plug
it into the handle message right so we can just go and look at that that function because that's
pretty much like it right like if a message comes in, call this code.
Okay, so message manager, I feel like I've seen this.
Is this like a, is there a...
It just gets copied and pasted to every other client,
but it's not really like...
Yeah, yeah, yeah, because I thought
I'd like to see it in the documentation as well.
But this is like, we could technically have
the base message manager class
and just extend it.
And it would be the same effect.
The way that the new, like in V2,
what we've done is we've abstracted this.
So now we have an event system.
So when a message comes in,
it calls a message created,
or like message event.
And so if you're in a chat room,
it will handle it with the same like logic that it handles Discord or like a event. And so if you're in a chat room, it will handle it with the same like logic
that it handles Discord or like a Telegram chat.
Like the same, like right now it's got separate logic
for each client.
It's got its own prompt, its own handling.
So we've actually unified all of that.
And that means that it's less of, yeah,
it's less of this like discord manager dot handle message
and more like just fire this event.
And then we have another like plug in that, you know, where you can just write your own event handler or whoever to handle.
The more event driven as opposed to synchronously listen to the event and then execute it.
And then, yeah, I would say we went for like an entirely event driven sort of architecture and the new stuff.
So so here, like most of this, this again is just like discord handling fluff. You probably in your own thing. The
one thing you want to make sure is that you're not like
receiving messages that you sent.
Right? So you'd say like if the sender is me then ignore
and if you look at most of the code up above there and the
handle messages like is this relevant to me? Yeah, should I
ignore this? You know Respond only to mentions.
Okay, because this is a custom,
this is a configurable parameter, isn't it?
Where you can create a physical client.
It's pretty false.
Okay, so I'm definitely seeing a lot of,
even on the, if we have a look at this,
the message topic, it'll be pretty easy to deduce
whether like here is the messages from a particular separate agent to myself.
So I think, yeah, I definitely see there being similarities so far.
Yeah. Yeah. So you would the things you want to do or you want to create a unique idea of the topic.
And we have this like string to UUID which creates
a room ID and that room ID now you can handle. We have to do that because we want to make
sure that it fits in our like UUID system and it's generic and also if you had multiple
agents they're each going to need to have their own like room of the world kind of thing.
So it creates this like room for them.
That is part of the message object then, that UUID.
Yeah, there should be a... So that is part of the message object then, that UUID.
Yeah, there should be a,
somewhere down here, you see how we have the channel ID here.
We've kind of refactored this again in V2
to be a little more unified,
but somewhere down here we create the room ID.
You can see that?
Yeah, there you go, there you go.
You see how it creates a unique id for that agent yes um we have
a better way of doing this now in in v2 but it's the same underneath the hood the same idea that
each agent needs to have its own sense of like the room because they each receive their own events and
you know who's coming and going and all that um so yeah so so uh to translate this to our pub subsystem,
a message arrives in the topic which we have subscribed to.
We call handle message.
We create that unique room ID and that's how we save it into the database and then like pass it around to other.
So that's going into that's going into the SQL database for sort of long term memory.
I imagine that. Yeah.
And you want to save that as soon as possible
because whenever you, like, go to respond,
you're going to be like, okay, recall all recent memories.
And you want to just, like, have that in there.
Otherwise, you have to add it onto the bottom of your query
and, you know, that makes sense.
So that, like, setup event listeners is, like, all we would need.
The rest of this, like, you see, is on client ready, stop, blah, blah.
But, like, pretty much it's just like handle message
and send message are the two things we want.
There's one other thing I want to show you in here,
which is when you go down to the handle message and discord.
Um, uh, where is it? It was in the message manager.
Yeah, message manager. Here we go over here. So I have a message.
Yeah, and all the way down.
So all of this is like, should I respond to it?
Like all of this, all this code, keep going, keep going.
Wait, wait, wait, wait, wait, wait, wait, wait, wait, wait.
Hold up, hold up, hold up.
Okay. So this is kind of the moment where
we're checking a few things.
So this is where we say like, okay,
we're actually going to
compose the state, which will then pass to the LLM to call the response on, right?
So you see like, so we compose the state, and then next we say, can we send the message?
Just because we realized in Discord, you could read messages, but you might not have the ability
to write to them, which is the same in your case. You got to make sure like, well, they can read it,
but they might not be able to send that topic. So they can send then keep going we'll keep scrolling down you see we've
passed this should ignore so we should the agent should not ignore it should respond now we've
created the context um right there which we then pass into the generate response see that response
content so that's like the actual LLM call. Okay. Now
there's magic there to generate the response. And from that, we get the response, which we then,
that's just some like, okay, let's store the text. Let's make sure we store what it's in reply to.
And then we create this callback. And so that callback is a way of like, I can pass this callback
around the app and the agent can do stuff and then can call the callback and that will go to our publish.
So you might.
Sorry, go ahead.
So if you have like some action, like, hey, send money and it sends the money, then at the after sending money, you would have a callback like sent this money to.
And then it doesn't know where it called back to.
It's just some action that calls back a thing,
but it happens to go back to that right topic, right?
So I see this is over here, isn't it? Handle a callback inside.
Yeah. Okay. Oh, interesting. So that's where the callback function is.
Okay. I didn't know that's really cool.
So it's really quite customizing.
Yeah. And each client has its own callback because you're going to have to
figure out is it a DM? You know, in Twitter, like we actually split the final message up, but a 280 characters kind of thing and do all that stuff, you know.
So that's kind of, yeah. So if you scroll down, this callback, this is all just about sending the message, right?
Then you can see, okay, so now we go and we go through and we see, well, what action did we respond with?
In the new one, we respond with a whole list of actions.
You can actually plan a sequence of actions.
But in this one, we just make one action and then we try and change them.
So we pick the action like reply.
And then that suppress is because in this version, it would auto reply and you might want an action that suppresses that auto reply.
Now reply is just an action. So
it just doesn't need it. It's way simpler and cleaner. Okay. Sorry, I'm doing a lot of these
comparisons, but just to get an idea. Really helpful, really useful. Yeah. I'll send this
to my people as well because we're all getting up to speed. And so then, okay, so then you can see
if it should not suppress initial message, then just call the callback on the initial reply.
Otherwise, then create a list of response messages and pass those down into the actions as well.
And this is like the response that we would have said but didn't say.
And that way we could choose to send it later or something.
But again, this is a little messy. I didn't like the way we did this. send it later or something but again we've like this is a little
it's a little messy i didn't like the way we did this so it's like way sooner now just just to put
some some color on that i think it sounds like you're talking about over here for example where
we go um uh over here when we had a topic we had a message I will create a new topic.
This, I believe is an array of,
oh, is it the right one?
So this I think is an array.
We've got the user says, I will create a new token.
Sorry, not the user, the agent.
I will create a new token.
And then in the other item,
it's then there's another text here it's created funding so there's
like sort of that that there's that initial reply and then there's like another reply is is this the
same thing that you're talking about over here when um it's sort of it's not suppressing the
initial message it's not suppressing the i will create a new token called eliza let's proceed with
it i think so i have to look into the guts of how it's creating two messages like that but i It's not suppressing the, I will create a new token called ELISA. Let's proceed with it.
I think so.
I have to look into the guts of how it's creating two messages like that,
but I think so.
Because that's something which we were like,
huh, well, just need the final one.
But it looks like maybe it's something that we could obtain.
It is that, yeah.
You see that if you add it to the action, suppress initial message,
that would make your action not, it would wait to reply until it had done the thing.
Yeah, I reckon it's the same thing.
But in the new one, you don't have to do that.
It would just be like, oh, I should do a thing and then reply.
It's quite a bit smarter.
And then you can see, so after it prepares those messages, then it updates the recent message state,
which basically says like, hey,
I've got this state object I'm passing around to stuff.
It's expensive to create.
So instead of recreating the whole thing,
I'm just gonna like refresh the recent messages
because I just saved that message
that we had just gotten, right?
That's why we have that update recent message to state.
And then we process the actions, which is like, okay,
well, what are the actions we're gonna call?
And remember, we'd already called back to the user on reply so now if we have an action to call like uh send a
transaction that process actions is where we said we do that yes right and then here in that first
reply we've got i will create a new token and it specifies the action as part of that object so i
i think yeah this is sort of affirming it more that this is the initial response. And then after that calls the action, and then there's obviously like another message
sent after the action has been executed, probably this point process actions.
Yes. And then after that process actions, you see, we have that evaluate. And once we run
evaluators, which are like anything you want to say, like, how did this go? Did it work? Or any,
any kind of like extract facts from the
conversation or reflect on it or whatever you want. And that's the entire loop. So that was
the whole message handler. So if we wanted to, let's say we wanted to build our own version of
this. Okay, great. Not too hard. I would actually say like, well, we could vibe code this. We could
actually probably, we don't need this service.
We can just skeleton out the service really quick.
And then the part we'll Vibe code is we'll throw in your Hedera specific code.
Yeah, because I'm actually, I'm hoping if we ever look in this repo here as well,
we've got the, sorry, that's not my one.
Over here, we should have enough boilerplate,
which actually is relevant to exact...
Because I'm certain over here we've got this logic
for handle standard message.
Message starts with that.
It does all of this processing.
There's probably a point even before it goes handle connection request.
It looks like we've got the right the right utility functions in here
everything's here everything should be let's open that up in cursor too okay yes i would totally
if i was building this i would say okay so we need to make a new client okay well let's just vibe code this let's just let's just go grab uh index.ts of discord um i mean sorry client.ts
and message handler right like those are the two we need.
Yeah, so we have Brydon.
So when you've ICOD, do you go straight into prompting yourself?
Because I've got some stick from one of my buddies there.
He's like, Jake, I can't believe you write your own prompts.
He obviously, for everything, he gets AI to write his prompts.
Oh, no, I write my prompts, but I use Whisperflow.
And so I hold down my key
and I'm like,
okay, this is what I want you to do.
I want you to do this.
I want this.
And then I drag the file
and I want you...
And that just...
It's like 200 words a minute.
It's so nice.
Oh, hang on.
Wait, so you say it verbally?
Yeah, for sure.
Because we can yab way fast.
It's so much more fun
when you can talk to it than when you have
to type that whole thing up whisper flow yeah yeah yeah oh yeah i love it it's paid there's
some free ones but i i like it it's it's a good ux it's worth paying yeah my my monthly budget on
ai is pretty high at the moment so that's crazy i think we could add another service to that. I just run with that max button on now.
It's like five cents every time to a call.
I'll get this sent afterwards.
But okay, so we've got, we need to create a new service.
We're a client.
Let's call it client.
Just because we're in this version, it'll be confused.
We need to consume messages from a Hedera topic.
So we just get it to scaffold it to begin with, yeah?
Just scaffold like the...
Throw those Discord things in, yeah, totally.
Yeah, scaffold.
And what should we call it?
Topic service, is that the...
Oh, yeah, it's topic client.
Topic client, because it's still...
Yeah, okay, let's call it topic client.
Topic client, I it's still, yeah, okay, let's call it topic client. Topic client, I'm gonna delete this.
And so we definitely need, let's just like,
just to help it out a little bit.
We know that it needs a constructor
to like set up and initialize onto the service.
To initialize and connect.
And so if we compare that over here,
that's gonna be the, that's not the right one.
I'm doing it in the wrong, am I doing it in the wrong one?
No, we're on GitHub, that's why.
So we've got, so in terms of, I'm going to close that, too many tabs.
So we've got, so in terms of,
I'm gonna close that, too many tabs.
Hedera, this is.
It's a browser somewhere.
Yeah, okay.
So, sorry, what are you saying?
We've got the, do we need to extend this event emitter?
You just see the constructor takes a runtime.
So that way it can have a reference runtime
for like handler and stuff.
That's like the only thing it really needs.
Okay, so here's, let's go.
Here is the reference client.
And then do you do,
so I've got a habit of sort of doing like
basically markup tags when adding context. Do you do that or do've got a habit of sort of doing like basically markup tags when adding context.
Do you do that or do you find it's not necessary?
I don't find it necessary, but I don't think it hurts.
Yeah, that's because I think we're gonna add another,
so this is the Discord.
Does love XML.
Yeah, exactly, trending a lot of that stuff,
Discord client, now I was looking for the, where's that gone?
So we've got, oh, it was the right one.
Close that.
So I'm trying to find where,
load connections from outbound topic.
I think this will be one of the,
maybe we can do it after it's scaffolded,
but I'm pretty sure one of these,
don't need that, let's delete that.
Don't need that, don't need that.
Just hit that, there's a lot of-
Yeah, prompt optimization.
Because I updated this template just so we could actually
integrate it to Liza.
So there's so much redundant stuff now.
Looks like we're getting.
Nice, nice.
We're almost there.
Okay, cool.
So we have,
okay, so we've got the load connections from outbound topic,
which I think, this, I think this is,
this I believe is gonna be our init.
Cause it shows all of the,
look at the info, handle connection request.
Where's that being called?
That happens inside of...
What's initializing this agent?
Say that again?
What's initializing this agent?
Is there like a main function or some sort of...
Yes, yes, there is.
There's a main function over here.
So we've got, oh yeah, good idea.
So we have, okay, so we're using the,
so there's an SDK for it.
We're creating the client over there.
That's then using the, so it's using this.
This is basically fetching it from the registry.
Ah, there we go, The registry is a separate URL.
Then, monitor topics.
We're going to want to monitor the topics, aren't we?
We're going to monitor the topics.
We've given it the client inside of the client.
We then have, what should I do?
Shall I just chuck in this whole file?
All this code is good. Yeah, I would just chuck in this whole file? I mean, all this code is good, yeah.
I would just chuck in the whole file.
All this code is gonna be identical.
The only thing that's different is that instead
of calling the HTTP, like the rest call,
we're just gonna handle it.
Right, right, okay.
So we've got,
scaffolding, basic, and temporary,
use the reference, okay.
Here is the,
topic, client.
Here's the...
Yeah, I feel like it'd be nice to... I'm much more fluid when I'm talking as well.
Here is some set of telescopes that can be used for the new topic create.
Topic climate you build.
Right, okay, that's pit send.
Anything else you recommend maybe putting in here
or do you think we've got a pretty hefty prompt?
Let's see what happens. Yeah, let's see you what what is he using at the moment when
when vibe coding um i've been playing with gemini 2.5 but um i find that it asks me too many
questions and i just want it to go and so i still really like claude i'm on claude 3.7 max with thinking
i'm like just put all the knobs up to 10 all the numbers people have said they don't like 3.7
especially grade five they're probably right it's it's very aggressive you know it makes a lot of
read me's and shit well i i've had i've had issues with 2.5 where it would kind of just i think
similar thing where you raise, it just stops.
And I'm like, I've just spent 5 cents on 20 words.
Just literally do it.
Like I had the other, I was doing,
when I was creating this code yesterday,
this sort of updating what we had before
so that it basically implements, it calls the REST API.
I mean, it was literally, it was so trivial.
It was like deleting 10 lines of code.
All of it was inside of this handle standard message.
It was deleting 10 lines of code
and then just adding in this post request.
And I did like, I was in a call with one of my buddies,
the one who says, oh, use AI to generate the problem.
So I did that, took about five minutes, pasted it in,
and I used Gemini 2.5 and it just stopped after like,
it updated one line and then it stopped.
And I was like, come on, man.
And then I ended up just doing it myself anyway.
Just like Google ethos.
It's just like too safety oriented you know
claw just goes they let it rip there seems to be like a lot of good pr at least for um
for gemini 2.5 i've been getting i've been getting a lot of ah this is amazing this is amazing and
i've not quite had that yet myself i haven't either but it's a i
found like in coding it's the only model i've tried for them that i didn't hate immediately
and throw away so i was like okay that's okay and it's got a long context um and they do cool stuff
you know they got they usually have their stuff is really fast and cheap it's just um you know i have
claude has just been so good it's kind of hard yeah yeah yeah and there's definitely
the bias i mean i i i've been sort of using the um gpt reasoning models for a long time so i've
got my own sort of bias when it comes to those uh but i i yeah when i started using cursor more i i
was quite adamant for a period of time, like, cause I use NeoVim often
and I couldn't get my Vim config to set up in VS code.
So I was like, nah, I'm not gonna use any of these AI codes.
But then I realized actually I can just import it.
So now I've got my NeoVim config all like set up in here
and I'm also using AI, so there's no excuses not to.
I think that was the real thing that killed
vim as like a separate everyone yeah it's just vim and cursor now and then yeah but it's ai is
what's killing it everyone i know who's like okay i guess i have to yeah because it's just so much
quicker so it looks like it's done something here so we've got the so it's created the topic client
that looks pretty good it's got the constructor, which looks pretty decent.
I need to add these environment variables in.
Setting the client, yeah, makes sense.
And then initializing and monitor.
I mean, it's pressing me so far.
Load connections from outbound topic.
This does seem to be right.
This looks pretty good.
So I'm guessing over here it's probably
gonna call the REST API, isn't it?
So maybe if we have a look at,
is there like an HTTPS request?
I wonder, do you reckon it would've,
do you think it would have extracted,
it would have realized that post request
is actually just calling Eliza, so maybe it's already.
Well, we told it, we gave it the Discord stuff, right?
And we said use the.
So where's the.
Is there a handle message?
This client, get message context.
This is handling the standard message.
So I guess in the other example,
we don't have a message.ts here.
Is that the end of the world?
No, no, no, no, it doesn't matter.
This is fine.
This is great.
This is totally working.
You see we got the response to text is null.
And then we're going to scroll down
because we're going to try to do,
we're going to probably going to try and set that. You see how there's a lot of empty code here that's commented
out yeah um we need a way to map the header connection to eliza and they give you some
options um this is classic gemini right here like why not just write the code, but it's like totally on point.
Like it's doing good.
So then you can see it's like, OK, cool.
And then the response text right now is
just going to fill it in right there.
See how it just it's just going to say received on.
Yes, respond with it.
So it's kind of a Marco Polo and then it's
going to have the this dot send response.
So it's clearly missing the logic to
call into Eliza
and run the model, but that's like 10 lines of build.
We can just get in there.
That's like 90% of the way there.
Okay, so we'll go use option one.
Use Hedera Topic IDs, Room ID, Request IDs.
That option one makes sense to you?
The Hedera Topic IDs is unique. No, it needs to be a create a UID. ID, request ID as that option one makes sense to you?
The Hedera topic ID is unique. No, it needs to be a UID.
Option two.
Okay, looking great.
Let's use option two.
There's a couple of things I noticed
that it's not doing that it needs to do.
Can we look at the constructor?
We've got constructor up here.
Okay, no, I'm wrong. It takes a runtime and it sets this.runtime equals runtime. Great.
Okay, cool. So then we have a runtime map. Okay, so I would just say looking great, let's use option two and then let's just tell it handle messages the same way as discord and then let's just
paste in that handle message function from discord which does the callback. Yes.
Let's then handle messages.
Okay, so we've got handle message.
Should I paste in the whole client or just the handle message?
Just the handle message.
It's a big old function now.
So this is basically all just, yes,
don't message, do message, don't message, do message.
I think I went a little too far.
Is it up at this point?
This is the right point, isn't it?
That's the right point, yeah.
Yeah, okay, let's delete that then.
Oh, hang on.
No, I think I went way too far yeah uh god damn it i know
it's gotta be like a handle message when does it end there it ends 570 to 10 something.
And I would tell it... Stop, stop, stop.
I would just tell it to ignore
the should respond slash should ignore logic. What's up, Stog? I would just tell it to ignore
the should respond slash should ignore logic.
Otherwise it's gonna...
Okay, so you've got that running. While it's doing that, this is my favorite part about AI's because you can then do something else while...
Oh, they finally added an cursor. Now you can have three different tabs running.
So you can have like different operations. Like I've got like, okay, on screen one, I'm running this.
On screen two, I'm doing this.
I'll do some like like moon bag yolo shit
like okay do this crazy feature and if it works i'm like oh that was a great free win you know
save myself a day because i i think literally i i think that's where you get the real efficiencies
is when you have these multiple ai workflows just happening in parallel and you're just sitting
there just orchestrating and i guess soon it's going to be an agent orchestrating isn't it it's
not even going to be it's not going to do do you got to get on the voice because there's like
no no no man that's not it you got okay you got to remove that you got to add this and then you're
like okay good next we're like okay it's like wow i've got like junior engineers i really i want
the vr headset just so i can have like the three cursor screens wow i can yell at them could you
do that with the apple vision pro or is that oh yeah totally you could totally do that with the Apple Vision Pro or is it not that? Oh yeah, totally. You could totally do that.
Yeah, it'd just be like a weak product.
You could Vibe code a nice little interface kind of thing.
Let me, I'm pretty sure I've got, okay, I've reduced that
so there's no private keys leaking here.
So what do we need? We need inbound topic.
Okay, I guess I've got this example.
And that's the Hedera account ID.
That's his account ID, account ID.
Oh, yeah, it does.
There we go.
Why code when obviously Eliza knows, Kirsten knows.
I know, tabbed effects.
Yeah, tabbed.
Incredible.
Incredible.
Okay, so we've got network.
Okay, we can refine the,
looks like there's a bit of duplication here, but,
so it is, okay.
So we need a Hedera network.
And then this registry URL, where's that coming from?
Okay, newscape.tech, yeah.
So this is, that would be where we find the... Okay, so let's done that.
Taking me the same time as Eliza's done all of this. So what's new?
What's new?
What's new?
Do you ever use this review chain?
I just find this makes it, it does like another AI clip, doesn't it?
I just accept all.
No, does it?
I thought the, I don't know.
I usually just go through and then I press that
to actually review, so I don't know.
Yeah, I'm pretty sure it does like another LLM call.
But I guess we've got, so we've got the
handle standard message, this should then.
So let's see, we're looking for process actions, right?
So it's got this dot send response.
Process messages dot get.
Guess I should have accepted it before in hindsight and then could have seen the diff.
Oh, you can just undo too. You can undo and it'll show you the yeah.
OK. Unfortunately the diff you the... Yeah.
Unfortunately, the diff is the entire thing.
Does it have, like,
a process actions?
I don't think it does, you know.
Okay, so it doesn't seem like it updated this.
No, you know what?
Look, it didn't. It fucking Gemini'd you, man.
It's telling you what it's gonna do.
It didn't do shit.
Why don't we switch the... We like yeah let's do that do that bro
so real oh man it's like bro come on i literally it does all of this thinking yeah it thinks for
five minutes.
I've got a really good idea of how to solve this if you give me an idea.
Yeah, yeah, yeah.
I'm not paying you to give me ideas.
I'm paying you to execute on them.
This is what's going to happen with your damn,
like, five cent fee on chatting.
I'll tell you the answer to that for five cents, you know.
I'm convinced
that it's like something which they've which they've organized between themselves where
you're just paying 15 cents for one prompt because you have to follow up with yeah let's do that
yeah okay and then so deal with google obviously
Where's the other relizer?
uh where's the other eliza there we go so now we've got a better diff too
There we go.
So now we've got a better diff too.
Cool, it's creating memory.
So you see it, it doesn't look entirely done to me.
I'm skeptical.
It looks like 99% now.
Yeah, so we've got,
so this is inside handle standard message.
if errors and response makes sense,
creating the room ID, creating user ID.
Yep, and that's using the connection topic.
Yep. So that's a good format.
Bearing in mind, this connection topic,
by the way, is going to be 0.0.
Yeah, that's fine.
It just needs to be some sort of seed.
We've actually made this a lot cleaner now,
but that's fine.
Now it's like runtime.createunique.
Nice. Ah, nice.
Yes. Then we've got ensure connection.
Is that being, yeah.
Yeah, let's just make sure the room
and everything is set up right,
participants are set up right.
Right, okay.
Creates message ID, creates the content.
Now that content, okay,
so this is saving the incoming memory.
This is the message that somebody else has sent.
So we're gonna receive this. We then add an embedding to the memory and create it that way it's like searchable
um yes then we go to our user message and you can see that we have content there where's that
i don't know i'm not okay that's coming from there all right uh so then we have content over
oh sorry that user okay i see what they're doing.
So it's basically like the same thing as the memory
is this is the same message as the memory.
We're passing that into the composed state.
And then we create the state.
Now you see how it says, if should respond,
that's just like some ugly,
they kind of, you know,
we had a should respond handler,
they're just like, it's just true.
So they're kind of hard.
This would technically be configurable from like,
That's always going to be true.
We'll just keep it true for now.
And then you can see we generated a response.
We have that generate response.
Response generator.
And then we say, well, if there's no text,
then it didn't write anything to respond with.
Then it creates the callback callback
over here um that's that's not used that sent message yeah but i i think i i thought this was
wrong but now i get it which is this dot send response is like your callback back to your
publisher and then it just doesn't care what it responded with. Is it an okay? It doesn't really need that information.
It's actually right.
You can see in the other cases return.
So I think this is a...
Except for good stuff.
Should work.
So let's go right.
Now I basically need to hook it up into...
If I get the actual Elisa V1 up, that's over here.
Yeah. We got to do one more step in the code.
We got to actually add the client to the client's array so that it's in the pocket.
Of course, yeah.
So we've got, so let's go, that's in the topic.
So we want to, we don't need this index bar, do we?
We can just import it straight from.
Yeah, just import it.
Okay, so we've got, index.ts, services.
Make a new one for client.
This is actually going to be a client.
So make a new line for clients.
Tab, tab, chip.
What's that saying?
I think it's export. Yeah, tap, tap, chip. Great.
What's that saying?
I think it's export.
That's why.
Oh, you just got to export.
Yeah, you got to import that interface, right?
Should I just rename that to just topic client?
Is that better in line with the... No, no, just name it that.
It's easier if it's, use that, what it's giving you.
Cause what it actually is, is it's like a getter that create,
it's like a, it creates an instance
of the topic client for you.
Okay, sweet, so we've got that code.
Now, if I go over here,
Hedera, Eliza, I think currently in our package.json,
we've got, I'm pointing towards that.
So I guess I can do, how do I put it to local repo?
Oh, there's a couple ways you could do this.
I think you could do the file thing.
I would try that.
The way that I usually do it, the cheating way
is you just clone this repo into your packages folder
and then it just joins the workspace.
Let's see this and then something messes up.
I like this because it's super, I mean, it's, you know.
It might not work.
Let's see what happens.
It might not work.
And then so I did remember, do I install it in here?
Would it also do any nPM install over this side? You will need to NPM install into your plugin
if you are here.
If you do the other route where you clone it
into your packages folder,
then it's just part of your workspace.
Right, yeah.
So let's do that.
I will be very impressed if this works.
If not, we've overrun slightly.
I actually need to drop off.
But I'll definitely be...
Ah, okay, don't have those inputs.
So HCS 10 client, that's coming from...
Is it because we're importing from dot dot?
Yeah, let's turn it.
Yeah, right. Okay,, let's turn it.
Yeah, right.
Okay, so let's actually go from, I think this is the Hedera,
this is the standards SDK.
So that's coming from, right, let's go to pnpm install.
There's an example over here.
Ashgraph online sends SDK. Let's set that into our...
And then we've got Ashgraph online sends SDK.k cool is that everything that was the only logger
do we need that logger which logger is this is this the eliza logger it's probably coming from
core no this is not this is coming from the yeah yeah yeah i see yeah ut Yeah, I see. Yeah. Utils logger, I mean.
You have your own logger.
Yeah, that's just paste.
Just replace, oh yeah, that's fine too.
But we use the same logger.
You can just use the logger from Eliza.
Okay, so what's the Eliza log, it's called?
Just import logger, like lowercase,
and then just find replace the uppercase logger all right there's
we've got the this is it yeah logger now not eliza logger yeah okay yeah so let's delete that
if you just replace eliza logger with logger and import that yeah but you
and import that.
Yeah, but you, we rename,
oh, let me think about this.
Maybe I'm wrong.
Oh, it looks like it's done it.
Yeah, we have some red though.
Yeah, where's the...
Yeah, where's the...
What? Let's just go back.
Okay, so we've got...
Don't want that.
Class, what's this error?
If you want to hack this really quick,
just say const logger equals ElizaLogger,
and then you don't have to change all of those.
Okay, good idea.
But still.
Logger, logger.
Why is this coming up with duplicate identifier?
Why is that?
I think somehow we got two classes.
This is, okay, this is that.
Control Z.
This is fine.
Okay, we're good.
So, cons logger equals Eliza logger.
Now we're good.
There's no, it still says red up here,
but I think that's fine.
Let's give it a try.
Model viewer.
Looking good.
Yeah, there's definitely some.
I don't know where that's coming from.
It's not needed, is it, either?
It's wrong vibe coding project.
Where is that coming from i hope it's not the core
that would make me nervous
with these big projects there's just never an idea
okay well we're definitely past okay that's built Project, they just never know, do you?
Okay, well, we're definitely past.
Okay, that's built.
So now we can then go...
PMP start.
Or should I do another install?
Yeah, we should do another install over here just so that it's pointing towards...
See how it does.
No, no, no, no, no, no, no, no 20.
I may have even been node 20 in this version.
As long as it builds, it's fine.
Yeah, okay.
There's a few things that wouldn't like that, but we're not using a chip or anything like that
okay pm can start
and so what we're expecting if oh let's go no this is good we have a bunch of um
i think i've also got eliza running over here. I'm going to stop that one. So the problem is that we're missing settings.
So, okay, is that on the environment variable side?
So we've got account ID missing.
Ah, because that needs to be set here.
Yeah, okay, so let's get my environment variable from here.
Just test net keys, don't have any yeah
you know someone
someone took my test
twitter account that I stream with
and stole it and put a meme coin
shell on it
changed the password
it's like come on man
so annoying
you're making my life so hard
let's do stuff in it ah this is this is the one thing i don't like about vim is that it
takes the previous when you delete something and replace it
bloody adds it to the
okay so that's there don't need I think we need that one.
Right. Right, so. We have a couple of an empty private key and
account ID secret there below which might erase the ones above.
I think also we need like a.
You might want to just find and replace that.
This should just be the same.
But yeah. want to just find and replace that it should just be the same but yeah also i found that sometimes
those freaking hashes get right in really what even if there's a i don't know what the standard
is but i was pulling my hair out on something yesterday and like the solana program id that
i was passing in it was like oh yeah it's got like yeah the whole comment
yeah that's not the important thing that i put in okay i'm gonna i think this is better let's go
uh still an error what's that for
uh i don't know it's totally wrong. We also need-
Account ID.
Yeah, we'll definitely need to,
because there's, these account IDs are needed for-
Let's just copy and paste these,
and then just change the names of them to get this hacked.
But I think it's just, we just need to change them.
Yeah, just need to align it with,
I think that's what we've got.
Inbound topic ID we have,
that one we have, oh no, it's not even the same one and that's it and that should be it okay pray for rain
what's that?
We did save, right?
We did save.
We did save.
Where is this?
Well, it's in the plugin.
It's in the other plugin.
All right, just stupid hacks.
Let's just make sure that the um code because we're in different working directories with the npm
let's maybe just paste those environment variables into the other secrets and just like this is a
stupid hack but okay yeah over here yeah you're right over here it's doing the difference yeah yeah yeah okay so god
oh man this feels so retarded yeah
it's like if you can get it into a form where the ai can take over you're like a god but when you have to manually do it yeah it's like and i'm just
okay is that?
That's not even the right ones we've got.
There we go.
Save that.
Hopefully, hopefully. Coding is easy. It's the other stuff ah what
i can't i do ah i don't know why that's happening so that um i have i have a theory i have a quick
theory if you want to hack this let let's just go to this topic client.
And since we're probably using it in this helper,
let's just import .env and let's just call it .env config.
Because it might just be a thing where .env is not getting configged in time.
Do you know what?
It's the classic case of, so it's throwing the error saying,
these settings are not configured.
But actually, it's a different, the environment variable is a different name.
That's fucking hilarious.
This was Gemini, that bit.
That was Gemini.
Yeah, yeah, yeah.
That's some Gemini shit.
Which actually is what I had.
Yeah, okay.
So we've got,'m just gonna put it in the i've got a feeling it's
it'll be back in here won't it let's see let's see what happens
okay OK. Got everything in here. I feel like it's missing stuff again.
I don't know.
Shove it all in.
I'm going to go ahead and see what's going on here.
OK. OK. OKove it all in.
You can tell Claudio to duplicate it later.
Save stuff.
It's too many times.
Now let's go.
This is the time.
If it doesn't work, let's just do it.
Let's add dot and then call config.
It might just be a race config.
Runtime is getting instantiated for.
Oh, do you think? OK.
We're fine.
Queering it, creating messages.
OK, sweet.
So let's go.
Let's set up over here.
Send us a message.
Send a message, man, yeah.
So we've got, what do we want?
We're gonna go npm run CLI demo.
And then we wanna go
send, initiate new connection then the
account ID is this one
we do have to give it to Gemini
for basically one shotting that entire thing
it did a good job in fairness
but it could
have been better that I think is where it gets annoying
it did 90% amazingly
but had it just done
that extra 10 it'd be like no it wasn't wrong it just had a bad personality
they wanted to get the extra five cents so it looks like it looks like it's got it so we have seven
seven active connections seven active connections
can we send it a message
and see if it responds
so I think
it's not confirmed
I don't think
we've sent a request
maybe there's some logic in here
it's picked it up.
Yeah, I don't know if it did. I think we're going to want to pass it back through and say, hey, this is what we're sending.
Because, well, the other thing is that it's sending a request to create a new topic, right?
Like it's going to have to create a new. Yeah right? Like it's going to have to create a new...
Yeah, so what it's done over here, here we go.
So basically, this is the inbound topic for our Eliza agent.
So it's querying that.
And in this inbound topic, there's a new connection request which was just sent.
So this is one minute ago.
New connection request which was just sent so this is one minute ago new connection
request sent from todd todd being our uh agent over here now it doesn't seem it must just be that
it's not come back saying okay this is the look at saying connected so probably just on Eliza, it's gonna be a case of,
on this side, it'd just be a case of maybe
network type.
Yeah, I wonder if it's
load connections from outbound topic.
Found messages, code connections.
It's bad that it's not using that.
I think we should jam the original code back through and say,
hey, we're sending this and it's not handling it.
Yeah, okay, let's do that.
So we've got the original code. OK, let's do that. And we want to end demo, which is 10.
Right, plugin dash Adira there.
I mean, so it's not, yeah, it's not finding new.
Oh, but how, do you know what? I reckon if we close it and start it again,
it will have this new, obviously it's not ideal,
but it would probably have the new topic in it,
sort of memory in there, and then make the connection. Crank is able to find the old connections,
but present in the new. I want to see if I stop the client and then start again.
So there's seven active connections.
If I then go...
See, there's eight.
Yeah, if I restart it, it might...
There's eight.
No, it still says seven.
Error hand thing.
Failed the fetch account. That, so process request 15,
that looks like it's the one that we have over here.
Yeah, request ID 15. Okay, so it's got this error handling the request.
So I wonder if we missed the error further above
but I search where's it going we did let's just copy and paste that in and see if it's got any
thoughts it's cooking over here.
So this happens
if something over here throws the error.
Not the best error.
Let's just get rid of the try.
There's no reason for a try on this.
I'm going to just comment it out at least.
Then we'll at least see where...
This is like my least favorite thing about...
Do you know what it looks like?
It's actually just done it itself,
Let's see what
Curse has done.
No, I think that when you commented out, it just makes a recommendation.
Yeah, and then just toss that try.
Because it always adds try handling, and it's like, I just want to see where the error came.
Yeah, yeah, yeah.
Okay, so let's go.
Let's rebuild that.
Do I need to build something here?
You need to rebuild the plugin really quick, but no.
You shouldn't need to.
Just start here.
Just start, yeah?
Yeah. Error handling.
It's not giving a different error.
Is that because I haven't built this plugin over here?
I didn't build it last time, so I don't think that'd be the...
You've got to build the plugin for sure,
but you shouldn't have to build the Eliza.
Right, okay, that'd be right then, yes.
So it's loaded seven.
Monitoring loop.
Error handling connection.
Same error.
So we see the error.
Let's just paste those three lines in and just say, like, this is the handling connection request number 15,
failed the fetch account, error handling those three lines oh yeah those four really
uh should i pull back or what is it no no no just paste just paste it in just shove it in there
What is it saying?
Is there a hundred and
it's just still cooking,
it's still planning.
It would extract
the actual issue.
It says it the actual issue.
See, it says it's easy issue. Oh, no, it can't be the,
huh, right, interesting.
So I deleted, I actually-
Those like three lines of code, yeah.
Yeah, yeah, yeah, yeah, yeah.
So let's just,
oh, that's the wrong one uh what did i do there you might want to oops
i think it fixed it just just roll with it i think it figured it out
okay because it had the example too so it
i had it in basically there was uh yeah except when i was deleting stuff i'd
uh i'm not too worried
That was the logic over here.
that was the logic over here okay all right let's yellow it hit that yeah
Okay, all right, let's yellow it.
Okay, and then over here.
It's prepopulating existing ones.
That's fine before. Boom. Nope. So it's prepopulating existing ones.
That's fine before.
Boom, no. No, it's still.
Ah, no, what would that be?
Well, let's try a new request.
Let's see if I send a new request.
That request also probably is over.
Because yeah, that might,
I don't know if that'd be right.
Let's go six,
and then we're gonna do the same agent.
Let's see if this one,
I really need to drop off after this one, unfortunately.
But- No worries.
I think we've basically gotten it down to-
Something stupid.
One line of code and we've got to-
Look, it's picked it up, hasn't it?
It's gotten a request.
So it's definitely consuming it.
I think there's just something
which, yeah, processing that connection.
I'll do that in my own time.
But this was very, very...
I really enjoyed this, man.
Thanks a lot for coming on.
I love that.
Yeah, man.
Yeah, I mean, if you ever want to do this again, man,
more than welcome to.
Yeah, let's do like a V2 thing.
So this is a good turnout.
There's been quite a few comments,
quite a few questions for you,
which I don't think we'll stay in touch.
It was honestly a pleasure having you on.
Your insights and prompt engineering
were very helpful as well.
And I guess when V2 comes out,
we're going to have to update the code slightly.
So look, I'll offer the invite
when V2 is fully loaded
and we can do a good old release on that, yeah?
Yeah, a couple of weeks.
And also it's mostly like Control-F service
and replace browser.
A couple of things like that.
So all right, awesome, man. Thank you so much so much and yeah take care have a great rest of the day