LongCut logo

OpenClaw AI Agent Team: Architecture + SOPs + Cost Control

By Shad Super

Summary

Topics Covered

  • Slash AI Costs via Context Compaction
  • Projects Layer Scales AI Beyond Recurring Tasks
  • Agents Auto-Generate SEO Topic Clusters
  • Self-Analysis Reveals Growth Engine Gaps
  • Agents Proactively Mine User Voice

Full Transcript

Hi, we are back and it is an exciting day. Uh the system has been evolving and

day. Uh the system has been evolving and my AI agents are working much better than they ever have before and our costs are under control. So stick around if you're interested in learning how to run in a completely autonomous AI agent

team. Uh we're doing it to uh automate a

team. Uh we're doing it to uh automate a SAS that I'm running. So big thing here is I have a present for everyone. Our uh

system architecture outlined in detail.

I'm going to uh be including this later in the video. So take a look. It has our SOPs, our our routing logic. So, um,

definitely something people have been asking me for and I finally got down to having my main agent uh document this.

So, um, we'll be giving that away to everyone who's watching. Um, big news, we somehow somehow got uh our cost under

control. This is our OpenAI um cost

control. This is our OpenAI um cost dashboard, which is what we use to drive our models. We're using almost

our models. We're using almost exclusively um 5.2. We use uh mini uh GPT4 one mini for some uh things like uh

GitHub backups for but for the most part all agent activity is uh governed by GPT 5.2.

Last 7 days we we migrated from Anthropic to um OpenAI on February 22nd and then things got crazy. um $134 181

1721 180 $336 in a single day spend on uh tokens two billion tokens total uh spent and then something happened I can't even be sure

what happened but something happened on uh March 3rd we deployed these are the things I could point to we deployed a new version of openclaw which you know

each each release has some um items for openai and the improvements they make there they I'm not sure if uh the system was improved or what, but something happened. I adjusted uh the context

happened. I adjusted uh the context window. I was trying to keep it small,

window. I was trying to keep it small, so the amount of information in context that you send over to OpenAI um for each conversation turn is smaller. So, you're

spending less on tokens. But what would happen as soon as that window would grow too big um the compaction would occur, which means none of those tokens would be cashed going forward or not cashed,

then you pay, you know, 10 times more than you would uh otherwise. Let's take

a look at our cash juice. Uh

so if we're looking at our cash per cache, we're now we're operating still about the same ratio as we had all along. So it wasn't related to that. Um

along. So it wasn't related to that. Um

what we did find was one or two agents were just going crazy with tool calling.

It had like 300 turn runs for every heartbeat just calling 100 different tools. So anyway, we got the cost uh

tools. So anyway, we got the cost uh rain down and super happy about that. So

what that means now is now I don't have to worry about cost. I could start layering on things and we're paying, you know, $15 now. We could significantly increase that spend and get more output from the system. But output, what is

output? Um, we need outcomes. We need

output? Um, we need outcomes. We need

business outcomes. And if you look at this Google search console, you know, we we focused initially on um search engine optimization, having our site uh specifically our our blog library um appear more often in in Google search

results. And Google search console is a

results. And Google search console is a tool that they provide that allows you to get insight into how your uh page content is performing. looking at like this is a hot mess. But let's let's take some things out. This is the last three

months. Look at average position. Um we

months. Look at average position. Um we

started working in this system on February 12th and uh it is now March 5th and we see a jump here and then kind of like a little uptick. So is it is the system finally working? We don't know.

Um similarly with the uh click-through rate. we're seeing an increase in the

rate. we're seeing an increase in the click-through rate. And it in recurring

click-through rate. And it in recurring tasks, the agent, specifically the um technical SEO agent, is going in and making changes to things like titles, uh metad descriptions, and those are what

appear on search engine results page for Google. Um so by modifying them and

Google. Um so by modifying them and improving them, we're getting a higher click-through rate. Um impressions are

click-through rate. Um impressions are um staying relatively flat. Total clicks

are up though. So, um, click-through rate and average position don't really matter if the position and a click-through rate are for pages that have low search volume. If you're if that page only has 50 queries a month,

it's going to show a higher clickthrough rate and a higher average position. But

that doesn't really mean as much as if you're getting a higher volume keyword term that has 2,000 searches a month in your in your ranking. So, we're actually seeing that. So, total clicks is really

seeing that. So, total clicks is really just jumped up. So cautiously optimistic there.

Um this is our homepage. So one of the big projects uh we're working on now is a landing page redesign specifically for ads. Um so there's internal linking

ads. Um so there's internal linking keywords and then there's uh get my site indexing keywords. So people are trying

indexing keywords. So people are trying to get their website index and our site our service does both and it's a little bit hard to fit both concepts on a single page. So we have this uh internal

single page. So we have this uh internal linking landing page but we needed to create a indexing version of this page and it would be just uh very simple to make a copy of this page and change text

to um uh indexing related terms but I wanted to task the agent with creating a um

with creating a uh a new landing page and so we came up with this concept of uh projects. So in the system now we

uh projects. So in the system now we have tasks and we have SOPs and tasks and SOPs help us run the business on a

day-to-day basis. So an SOP is something

day-to-day basis. So an SOP is something that we do on a daily basis whether it's backlinking outreach whether it's you know title optimization and these SOPs have uh definitions for

how to how to uh execute these uh and those SOPs feed into the task table and task tables are one-time runs of those SOPs. So, it's going to be pick an

SOPs. So, it's going to be pick an article, update the title, and publish it. But, so that's all fine for

it. But, so that's all fine for day-to-day work, business as usual type things, but we needed a another layer, another concept uh for larger scoped uh items. And and now I'm calling these

projects. And it just like any other

projects. And it just like any other human-based organization, it's it's um a group of SOPs and tasks that are done in an order to have an outcome. And there's

multiple people involved. Um so really testing this with uh this new landing page um creation where we have uh design assets, we have landing page copy, we have technical SEO. Um but what's great is we have you know our keyword

researcher is going into Google ads and seeing what terms are resonating and then they're building their copy around that. So um let's let's look at one of

that. So um let's let's look at one of the outputs for our agents. And I want I just want to I'm sorry for jumping around, but I want to um drill down into

the quality um of output that these agents are creating. And it might not be on par with the human, but the volume of

output and the detail and specific um being able to do this with agents rather than humans is is is incredible. So this

is a recurring task uh content opportunity brief. It's done by our uh

opportunity brief. It's done by our uh scout, our SEO keyword uh analysts, and they have a bunch of tools available to them. They have our um Google search

them. They have our um Google search console. They have our Google ads uh

console. They have our Google ads uh data. They have data for SEO which is a

data. They have data for SEO which is a tool that we've given them and that's a platform that provides you keyword analysis for um SEO competitiveness and um you know ranking difficulty. And they

were able to go in and they they produced maybe five or six of these already and come up with terms that we need to target to have Quill, our writer, uh create terms around. And this

is a a link um it's a a link cluster of uh new topics that are tightly related that will have internal links to each other. So crawled currently not index is

other. So crawled currently not index is a search term that people are using to find our site or to find uh our blog posts. um alternate page with. So these

posts. um alternate page with. So these

are technical SEO um topics that people are searching for that this agent has identified and has given us keywords and not only keywords but um the theme of

the article explain where no index is set by meta robots and how fast how to find a fast how to safely remove it.

It's explaining just like a human would uh how to do this. And you have to think about the size of the organization needed to have a dedicated person to go

in and create this kind of uh report multiple times in a month. um you might have an SEO expert who might be able to get to this um once a month or once every few months to create these new um

topic clusters, but being able to create multiple month like you would have to have such a large organization to have someone that that's this specialized uh to produce this kind of content. So, uh

really blown away by that. Let's see

what else we have for you today. Oh, so

I went into cursor and I said I'm totally happy with the system.

Everything is great. Um take a comprehensive look at our system. I g

you know a couple videos back I um shared how to optimize to selfoptimize your system by giving by first having your agents your your main agent define

a system vision and then have a um a another prompt that said based on the system vision create a checklist of items to review to see if we're aligning our uh open call installation with that

vision. Um, so I took the vision and I

vision. Um, so I took the vision and I took um I took uh everything there and I pasted it into uh cursor to run the analysis and it went through and gave me

an executive summary. I'm not going to read everything but it says you've been you've built something genuinely impressive a 15 agent autonomous organization running on a Mac mini coordinated through heartbeats and notion slack with a mature

infrastructure layer blah blah blah for a comprehensive SAS growth engine. you

have a strong coverage across most pillars but have meaningful gaps in a few areas that would need uh to be complete in order to make this a completely autonomous fully uh enabled growth engine. So acquisition, we get an

growth engine. So acquisition, we get an A minus. SEO is our crown jewel. Paid

A minus. SEO is our crown jewel. Paid

acquisition, we we added a a uh Google Ads Manager Apex recently in the past uh 7 days. Um content marketing, cold

7 days. Um content marketing, cold outreach. So now we're doing we're

outreach. So now we're doing we're missing um we have cold outreach for backlinking, but there's actually um we could enable outbound sales uh using Nexus as well. So, I'm going to I need

to do a video on Nexus and how he's set up with a mailbox and um an email address and he's going out and and making these contacts and it's actually working pretty well. Uh I just onboarded

a new um user I'll go I'll go into uh his name is Lens. He's actually a YouTube uh channel manager. So, his job I fed him my transcripts and I fed him my comments to give him my um kind of

tone of voice and like what I want them to be, you know, I said no clickbait things, no, you know, avoid all that. uh

to build his personality, his soul. And

now he's going in and looking at my past videos and he's identifying like the lowest performing one in terms of click-through rate. And he's going in uh

click-through rate. And he's going in uh he's adding tags. He's redoing the uh title and he's asking Prism, our design director, to take the um thumbnail that I've I've created for the video a couple

weeks ago and update it. So, uh really interested to see what happens there. Uh

what's missing or thin? No dedicated

outbound sales agent and Nexus could do that. Uh no social media presence

that. Uh no social media presence management. So, no agent manages

management. So, no agent manages LinkedIn, Twitter. Um, that's an

LinkedIn, Twitter. Um, that's an interesting gap. Um, activation, we we

interesting gap. Um, activation, we we get a a B-grade here. So, Forge, uh, who is our revenue agent, he has some things. Pipe drive automations for

things. Pipe drive automations for onboarding sequences. I actually might

onboarding sequences. I actually might be moving off Pipe Drive. I've never

been a fan of that CRM particularly. Um,

I've traditionally used HubSpot primarily. calls a little bit too much,

primarily. calls a little bit too much, but I might be moving off CRM like that uh entirely and either building something in-house or using one of these

uh uh open source versions. So, uh that remains to be seen, but uh we'll see.

And then retention grade B minus. So,

Compass watches Compass is um our product experience agent. So, he goes in and you know defines if we need new features or how this page looks, if it's it's intuitive or not. Um, and he looks

for turn and stripe uh indicators, but he uh was just given access to intercom.

Let me hop over there real quick. I

apologize for this. Um,

on his own initiative, Compass uh identified that we didn't have any uh user voice and user voice is um usually identified through your support system.

So, we use intercom, which is, you know, these little the little chat bots that you see um on your website here. and

someone could either uh use a chat here or email via your contact form. It all

goes to intercom and you're able to manage conversations there. Um

but Compass came to me and said, "I don't have visibility on user voice. Can

you create an intercom skill?" So I went into cursor and I had it create an intercom skill, enabled the API, and it went in and went through 4,000

conversations and it synthesized what these were, what the conversations were about. And you know there's errors,

about. And you know there's errors, bugs, broken states, uh setup install issues, billing issues, stuck issues. So

it identified these themes that these users have and these will um let me see if I could find the um the executive summary. He said

activation clarity and value visibility is the number one gap. Now he's going to orient his actions and his suggestions for bolt our developer to orient themselves around getting clarity around

activation setup install is a major support driver. So um this was done

support driver. So um this was done proactively by the agent and it's a value that I as a SAS owner would need to do and you know you're one SAS or a

few person SAS you're not going to uh really do this on a regular basis. So

the fact that I have a team doing this now um is you know I'm grateful. Um,

forgot where we left off.

Oh, so we're back in cursor. Revenue

monetization grade B+. So, you know, we're good there. Product intelligence

grade A minus.

So, this is where we need to find um they they want full access to intercom so they could interact with the users and ask them for follow-up saying um you know, are there any features you want to add? So, it's really interesting. We

add? So, it's really interesting. We

don't have any AB testing infrastructure in place. We have a table in notion that

in place. We have a table in notion that we're using for AB testing but it's not not great. Um we have a great so I had

not great. Um we have a great so I had the system go in and and analyze it and now I have a list of things that I will be able to execute in cursor here just

by saying okay make a plan to build this out and cursor will create the plan. I

click build and all of this will be built. It's not going to be perfect.

built. It's not going to be perfect.

We're gonna need to iterate and improve it, but um you know, it's I I think I'm finally seeing the light at the end of the tunnel and hopeful that we're going to really see some um not just traffic increase, but business outcomes, which

is more trials, more people using the system, more paid users, and a better user experience. Um so, back to what I

user experience. Um so, back to what I promised you. Um the system

promised you. Um the system architecture, yes, has everything here.

I will pin the link to this in the uh first comment in this video and it's going to go over our architecture, how it works, our agents, how we have them defined, the tools that we have uh listed here. Obviously, nothing a little

listed here. Obviously, nothing a little too sensitive, but uh the ways of working. You might even be able to feed

working. You might even be able to feed this to an open call agent and say or cursor and say, can we build this and uh have it done? So, um please leave me a comment or question. I'm more than happy to speak to you about um any of these

things. They're super fun. Uh definitely

things. They're super fun. Uh definitely

stressful and um can be tedious at times, but um yeah, so so much fun.

Loading...

Loading video analysis...