# Founder to Founder: Stately AI

Canonical: https://davidk.dev/talks/founder-to-founder-stately-ai/
Video: https://www.youtube.com/watch?v=oNf18QNdaZ4
Speaker: David Khourshid (@DavidKPiano), creator of XState
Type: Podcast · Event: Gun.io Founder to Founder podcast, Ep. 36 · Year: 2023 · Duration: 28:53 · Views: 1535 (as of 2026-10-19)
Topics: Startups & open source, AI agents & LLMs, Visual modeling

## Summary
This week, Teja talks with David Khourshid, Co-founder and CEO at Stately. This AI tool serves as a visual source of truth for creating, deploying, and analyzing any type of logic. They discuss the importance of considering the customer at the outset, the ways metrics can skew your path, and how you know when it's the right time to turn that side hustle into a full-time business.

## Key takeaways (quoted from the transcript)
- Yanamandra, sits down with David Kid of Stately AI, the company behind XState, a best-in-class open- source library for handling complexity. (0:00)
- The precursors to the Stately Studio that we call it have been just me working on weekends and just trying to do something to make application logic, visual. (7:00)
- The problem with hyperfocusing on metrics is that you learn to sort of gain the system. (15:00)
- The idea is that when you create that diagram, that doesn't just become a like a what we call a speculative artifact, like just a static diagram. (25:00)

## Chapters
- 0:00 Introduction
- 3:00 My mind is very visual, so I love seeing things just…
- 6:00 Get a little bit of seed funding…
- 9:00 The whole will'll get back to it later…
- 11:00 We focus a lot on metrics
- 20:00 The code is how the product works and the so

## Transcript
[0:00] Welcome to another founder to founder interview from Gun..io, your source for hiring worldclass Tech Talent. Today. Gund Io's CEO and co-founder, T.J.A. Yanamandra, sits down with David Kid of Stately AI, the company behind XState, a best-in-class open- source library for handling complexity. Its scale. Okay, here's Tasa, okay. So I see you have a piano in the background. And then and then I also see other things, but the piano stands out the most.

[0:00] Maybe like a cool spot to start is like, you know, do you do you like playing music? And probably like playing piano? I assume, yeah, so I actually, I. I've been studying piano for a while. I went to college for piano at the Central FL. Yeah, yeah, and so I, I guess that was my original career TRA trajectory. But, of course, people never fully know what they want to do in college.

[1:00] So I was doing piano, I was doing a little bit of word press and got into that. And then I realized, okay, I could actually make a lot more money doing this than being a piano teacher all my life. So were your parents musicians, or do you just like playing music, or like, how did you decide to study that in college? No, no, my parents weren musicians at all. It's just something that, you know, they made me do as a kid, and so I ended up really, really enjoying it.

[1:00] So, yes, that's cool, and so, born and raised in Florida, or from so I, I was born in Chicago, moved to Florida and then stayed here. Pretty much because the cost of living is lower than you know, your California, new York's, all of the other Tech hubs. No, it's, it sounds similar, so like my so. My parents immigrated from India to new York City, and then they moved down to Nashville. And so it's like where I finished high school, and there's not very many Indians like in Nashville, you know, uh?

[2:00] But I went to college elsewhere. And then when we started the company, I started it here in Nashville. Basically out of, like, my mom's house, because it was cheap. Is that, like, similar to your kind of story, or is that, like, different? Yeah, pretty much, I mean, I, I have worked for. Moes for a while, most recently at Microsoft. And then when I decide to start my company, it's, yeah, we don't have an office or anything.

[2:00] All of us are remotes, distributed, half of us are in the United states, the other half are in Europe, so no reason to get an office. Just, you know, do it here in my home. Yeah, so okay. I think maybe we can even back up and be like, like, what's your company? You know, when did you start it? You know, what kind of got you into the idea of Entrepreneurship?

[3:00] Sure, yeah. So, first of all, I've been a developer for, I want to say, around 15 years. I lose track. M. Mostly F focused on web technologies. Cool. And when I started my first, what I call my first big boy job as a junior developer. We were working on this just nasty jQuery PHP project. We weren't really allowed to use any Frameworks, nor were there any really good options at the time.

[3:00] I, I. There was backbone and things like that, and of course, Angular 1.X, which we eventually moved to. Yeah, but the biggest thing I struggled with was just really complex application logic. And so you have me, who's a junior developer fresh out of just making WordPress templates for people for like $100, which at the time I thought was big money. So, and also me being a musician and still being super focused on music.

[3:00] My mind is very visual, so I love seeing things just like a musician would read sheet music and sort of understand the music. In that declarative fashion, me looking at a bunch of if statements, just. It didn't really click well, and there was a lot of multi-step forms and complex application logic and workflows too. So, I. I desperately just wanted to see, is there a better way of representing this in a way that I could understand and others could understand?

[4:00] And so I just went in this deep Rabbit Hole of learning about, you know, flow diagrams, which led to state diagrams, which lets a state machines, which also lets a statecharts. And I'm like, this is really cool, I could actually understand this. This is just boxes and arrows to understand. The flow of something, you just follow the arrows, it's, you know, as simple as that. And I, I thought, like, why aren't web developers really doing this mainstream?

[4:00] And I mean, half the reason is just they don't know about it, the other half is. A lot of them had been burned by UML, which tried to just super formalize that and just make it really difficult to work with. So I created my own library, called XAT, to just really scratch this itch of. Can developers program logic in a way where number one it works? Like, you know, you have your states and transitions and everything, and number two, you could take that, copy paste it somewhere and visualize it.

[5:00] And so it was just an experiment. I talked about it at a couple of conferences, but it seemed to really catch on. To the point where there was like a ton of big and small. Is using XState, and even more developers who, just whether they're using XState or not, they know about state machines. They're like, Wow. This is a such an important computer science concept that I didn't know previously, but now I could see.

[5:00] It doesn't have just, you know, just mathematical or theoretical applications, but it actually has real practical application in my day-to-day work. So, yeah, fast forward. I was working at Microsoft for about five years. And then, at the height of the pandemic, I decided, like, this project is too important for me to just have it as a side project.

[6:00] Working on it. Mornings before, my co-workers worked up nights, weekends. I mean, it was very stressful and there were there was more and more people depending on it, so I decided to go the VC route. Get a little bit of seed funding, assemble a team and actually make this reality of, being able to actually physically design your application, logic and the visual way. And in a way where you could edit the code which updates the diagram, or edit the diagram which updates the code.

[6:00] So just that I directional nature, which is a very tough problem to solve, but, you know, I think we've, we've got it pretty good. So, yeah, that's what made St. come to life, and we've been around. For two and a half years now, that's awesome. I have. I have a lot of questions about how the application, like itself, works, and we can get into that. I'm curious, Okay, so you ran the company, sort of bootstrap, maybe even like solo preneur, maybe had some people helping you?

[7:00] How has the transition been from like bootstrapping it as maybe like an idea concept, early stage business to now add like VC backing? Like, what's that been like for you? So by bootstrapping it? It wasn't like I was selling anything before. I mean, the most I was doing was maybe teaching a couple workshops here and there. But you know, that's that's not too much money, and also all of the like. The precursors to the Stately Studio that we call it have been just me working on weekends and just trying to do something to make application logic, visual.

[7:00] But yeah, it. It has been a pretty big change from when we got, you know, a little bit of VC funding to building a team and really seeing this accelerate and take off. And I'm I'm really glad that I did it. H how are you spending your time these days? Now? Where the with, where the companies at? Yeah, so, I mean, the two most important things which I try to focus on are, number one, talking to users, and number two, building the product.

[8:00] And it, it really has to be in that order. You know, you can't build something and just expect users to come. So that's why we have a pretty large community of people who use our, either the product or XState or all of the above. And we talk to them a lot. And I'm also involved with, both building the products, coordinating that, and of course, you know, having to talk to investors and all of that too.

[8:00] And just do all of the business planning stuff that, that developers really aren't accustomed to, like, I sort of fell into this business role. Yeah, no doubt. It's like, you want to build a cool product. And like, part of having to do that is you have to scale the capability of building it, which involves like a lot of work streams that. Are not super, intuitive, or, and sometimes engaging, even in my case, I would say, how have you kind?

[9:00] So, like, you've been a developer for like, over a decade, you probably like actually writing code.

[9:00] And you like probably having four or five hours of uninterrupted time to think through a problem. Now I imagine your work life is like sliced an hour or 30 minute increment, right? What are some of like your personal like, I don't know, like Heris to? To ensure that you're maintaining, like, good output every week and like, you're, you know, leveraging your highest and best potential. Well, I, I always have this idea.

[9:00] Like, first of all, it's just realizing, what are the Northern stars? Yeah, of our products, like, where we want to take this? And of course, we want this to be a tool in every company's tool set. Where it's like, okay, we need to organize our app logic in a visual, formal way somewhere, so this is a great way to do it. And so that's why I'm constantly thinking about, Okay, what are the most impactful things that we as a team could do every single week?

[10:00] To just go towards that goal, and so that means just trying to delegate as much as I can, saying no where I can, for example, that's it. It is really hard. But like now I, I've just gotten into the habit of, like, if we're super hardcore, focusing on one problem. And I zoom out and I see that problem is not really going to move the Neal for us, even if it gets solved.

[10:00] Then I'm just like, Hey, either just pick a or pick B, flip a coin and just move on. We could talk about it later, and actually, that's really powerful. The whole will'll get back to it later, because the fear is always, you might not get back to it later. But that's actually a good thing, because if you don't get back to it later, it's like, well, was it really that important?

[11:00] So, other than that, my heuristics are just, yeah. Making sure that we're accomplishing these, you know, Northern Star goals. And also just talking to our users and seeing that, like, I we. We focus a lot on metrics. But not too much like, not to an obsessive level, just because, it's one of those like, if, like, if you have product market fit, which even at this point, and we don't know if we have it yet.

[11:00] Like, it's one of those you either know it or you don't. It's not like you're going to obsess over a graph and think, oh, we have 15% month over month growth or anything like that. Because it's like, no, are lots of people talking about your product and using your product, yes or no? Like, that's that should be the only thing. So really, my heris is just focusing on that and seeing, like, is what we're working on really making a difference?

[11:00] Are people talking about it, using it, and are they benefiting from it? Do you enjoy, like, the sort of noncoding work? I know? It's like a simplistic question, like, have have you enjoyed the transition of your day-to-day duties? Or are? Do you look fondly at the times past? Or you get to stay up all night drinking, die Coke, doing work. Yeah, you know it, it's funny. It's non easy question to answer, but the best way to answer would be sort of like a state machine.

[12:00] Where it's like, I really enjoy the coding until I don't, it's like I get frustrated on these micro problems. And then I would rather focus on the business side, and then I would, you know, work on the business side. Until it just doesn't get interesting anymore, and then coding looks more fun. So it's like these two states going back and forth, yes, between each other. I, I do really enjoy focusing on just the like, zooming out the bigger picture, which is very much the business side.

[12:00] I don't like focusing on, you know, things that are just huge distractions, like or not even distractions. But just the I don't know, the unappealing stuff of, metrics and things like that. I, I'll be completely honest, I mean, I, I know it's important in everything, but my number one goal is I want to solve people's problems. So, you know, so okay, having an anti metric view, I'm I'm going to characterize your Viewpoint like that.

[13:00] Sure, it's actually more nuanced than that, it's like it's. Probably if you were to frame it, it's like appropriate level of focus on the metrics. But I, but I, I think even that is like a fairly controversial view to have these days. And especially, I think, because, like, the value of your company is often looked through like a spreadsheet, right? And so like, especially in the Venture ecosystem. And so like, there's an incentive to actually like overweight, perhaps like the importance of metrics like, how do you make decisions?

[14:00] If maybe metrics are not the most important thing? Like, how do you actually distill down the feedback from users, make directional calls and where the product needs to go? Like, what's your process for determining? Like, okay, like, this is actually the most important feature we need to ship for this quarter. Like, let's go well, that's the thing. So metrics are definitely important. I'm just saying, they're not fun. Yeah, okay, yeah, yeah, yeah, gotcha, gotcha.

[14:00] Yeah, that's fair, that's fair. Yeah, sometimes I think, I don't know. I think like metrics over optimizing metrics can be a distraction. Because for them, they'd be, like, actually accurate. They have to be so narrow and they and like, right? And that often doesn't tell the full picture of whether a customer likes your stuff or not. Great, exactly. And I think one of the biggest problems I have. I don't know if this is controversial, but like the.

[15:00] The problem with hyperfocusing on metrics is that you learn to sort of gain the system. And so what I mean by that is not. As in, tweak the metrics and lie about it, but, for example, if one of your metrics is just Revenue, let's say then. Instead of saying like, Okay, let's talk to our users, see what they're wants, see, we're solving their problems. And, just get more users on board, and, you know, make the product more valuable to our users.

[15:00] Business people are going to think, hey, let's actually play with the pricing a bit and turn some of those knobs to see if we can make that number go up. And make users upset in the process. Because, yes, you are going to get more Revenue, but users are, you know, going to be unhappy as a results. Yeah, totally yeah, depending on your. Time Horizon. It can lead to some shortsighted business decisions.

[15:00] Exactly, exactly. Yes, yes, that's totally true. What's okay? What's been the most impactful higher that you've made in the course of building your company? The most impactful hire? I mean, our entire team is great, and I would say that all of them are impactful. I don't really want to single out anyone, that's fair. Yeah. As I asked that question, I was like, yeah, maybe that puts them in a trigger position. Let me let me say, what's the hire that's like?

[16:00] Maybe improved your quality of life the most? If you have one, I have one that I can, that I can share with you as an example. If you want me to start, hey, I, yeah, please start. I think our like head of operations has been a really impactful, higher like for my personal quality of life. Because it helps me not deal with some of the business stuff that I don't want to deal with.

[16:00] And that gives me leverage to, like, do the fun stuff, like talk to folks in the space and talk to users more. And like, not worry so much about things like, you know, like, where exactly are we in this given day? Against the annual plan? Because that stuff is like, I have a human interface to think about that stuff, anything like that. Jump out to you. I mean, actually, I, I would say that my answer is the same, okay, maybe not exactly that role, but in that same sort of area.

[17:00] So, to give you an idea, when I first started the company, I thought like, Okay, cool, we're going to assemble. At the time, it was only like three to five people. We were, you know, small. I mean, we're we're nine people right now, which is still pretty small, but back then even three to five people. And I was like, cool. We are going to get heads down working on this, just building and talking to users and doing all this fun stuff.

[17:00] And very quickly, my day turned to 90% administrative, dealing with taxes, dealing with lawyers, like dealing with all of this, really not fun stuff. Yeah. And so hiring that person for, you know, dealing with all that just to take. Off my plate, it's been really, really amazing. What's what's some of your advice? So we have like 40,000 devs in the network, and you know, mostly like independent professionals, Freelancers, some interested in full-time jobs, so mostly like independent folks, probably working.

[18:00] And I would bet that a large portion of them are working on side projects that they hope to scale into businesses. So what would be your advice to like somebody who's like a digital Nomad? Maybe has a Contracting thing going on, but it's, you know, during the time for money exchange. What would be your advice to them to maybe build a product and scale a company? If you had it? So are you talking about?

[18:00] Like, just getting them out of doing it as a side project and doing it as a full business? Yeah, yeah, you know what? If you asked me a year ago, I would have a completely different answer. So, I, I was going to say, you know, a year ago optimized for, you know, just making it something where you could actually form a solid business plan and see if you could get Venture Capital funding and everything for that.

[18:00] So that you could assemble a team. And, really make it take off. Because, honestly, that was like one of the best decisions I did. Because this is honestly my passion project. It's something that I love doing. And regardless of what happens like in the coming years, it's something that I'm just going to continue working on. That's how, you know, how devoted I am to it. However, nowadays, I would say, like, all of that, basically all of the knowledge from maybe a year ago back.

[19:00] Like, just, I don't want to say fully disregarded. But really, take it with a grain of salts. Because right now, you could do a lot more with just one person. Yeah, just I, I. I know this is going to sound like very hyped and everything, but you know, just talking to ChatGPT. For even things like business advice, coding, E.t.c. You could do a lot more with one person, you could do a lot more with a few people.

[19:00] You don't necessarily need to go the Venture Capital routes, or seek funding, as is the traditional. Way of doing things.

[20:00] I really think right now that what you could do with a team of 20, you could easily do with a team of three right now. So, and that includes, like, Outsourcing, you know. And also just, uh. Hiring people or having your friends work on things where they're using, you know, chat, GPT, or whatever else to just augment their daily work. That's cool, that's powerful, I totally agree. Yeah, small, small and mighty.

[20:00] Yeah is the way to go, that's cool. What do you wish that I had asked you more about? Do you want to get into your product a little bit? Sure, we could, we could get into that talk. Awesome, yeah. So, you know, I'm curious, like, do you guys have an organizational focus? Or like, do you sort of feel like your product can solve problems? Like agnostic? The company stage, like, is there an ideal kind, kind of like engineering team s like, how do you guys think about?

[21:00] Like, the problem, maybe, and a in a commercial context, yeah, I mean. So the number one thing we're trying to solve is just this whole communication problem with teams. And we're not just talking about, like, how do you share documents and just share things together? Do things collaboratively, like notion solves, or, you know, things like that. We're talking at the actual application logic level. Because the truth of the matter is that you have people who are, you know, closer to the stakeholder decision maker level, like project managers, BAS, ETC.

[21:00] And these people are typically the ones, ideally the ones who are not directly involved with the actual code. And the code is how the product works and the so. So, you have the decisions, so the requirements, the specifications, all of that, and you have the people who actually take those. Distill it and put it into code and make sure it actually works. And how do you make sure that those two personas are speaking the same language?

[22:00] It's it's actually pretty difficult and it's really not been a solved problem, and that's basically the huge problem we're trying to solve. Is that sure? You could create diagrams and you could creat documentation and all of that, but those are things that number one it. Takes time and efforts to do all that. And number two, it's very easy for them to go out of date. And so that's why, yes, what we're doing is not new at all, it's very old.

[22:00] It's this idea of what we like to call executable diagrams, where basically these diagrams are generated from the code that you're already creating. And even if they're not, there's something that could be converted to code and even converted to documentation, tests, diagrams, of course, ETC. And we really wanted to build that tool so that, technical people could communicate with non-technical people on the actual app logic in their app, regardless of how complex it is.

[22:00] So that's that's number one thing we're trying to solve, and it is very much at a, you know, entire team level, and essentially an entire organization level. Because this basically becomes living documentation with diagrams that are actually useful. I have a use case that may be adjacent to the one that you're solving for that, I'll ask you. And maybe we can be a customer of years. So, like. We have a sales process that involves both our application as well as actions that, like, the customer has to take that live outside of the application, right?

[23:00] And as you mentioned, like right now I think we chart using like Lucid charts or something like this. But like in the span of a week, or like, you know, and maybe in a two- week test period. Like, the results of the test will then again change what the diagram actually should be if it needs to be accurate. So, like our charts about what the actual sales process is, how it touches the application and different things that we, you know, cly, all the stuff is different.

[24:00] And it's a big pain, right? Like, because when you onboard in UAE, they're like, okay, like, what does the customer like actually experience? You're like this? But then also, this is not fully accurate. There's these other changes like can Stately address that problem? Or is that maybe out of scope right now? Just kind of curious? No, it, it absolutely can. Um. The idea is that where you would use something like Lucid chart or Miro, or Draw..io or any of these other diagramming tools to draw these.

[24:00] Boxes and arrows, so basically, your flowchart of, like, hey, here's how this, this, you know, user process is supposed to, you know, go. You would basically be doing the same thing in Stately, like drawing diagrams, pretty close to the same way. We, I mean, we don't have all the bells and whistles of. You could draw whatever shapes and colors you want. That. That may be coming soon, though, but like, for now, it's like just more constrained than that.

[25:00] You're still droing the same boxes and arrows. And it takes you maybe a fraction of the time to just create a flowchart, and, you know, make it work. And you could also generate one with AI just for fun, if you want to. But the idea is that when you create that diagram, that doesn't just become a like a what we call a speculative artifact, like just a static diagram. It becomes something that you could take and do whatever you want with it.

[25:00] So you could convert that to code, you could add descriptions into it, you could just create prototypes with it, you could. In in the near future, this is sort of a hidden Alpha future, but you could actually deploy it as a workflow and then use a JavaScript SDK to actually attach it to your actual application. And in the future, sure, we could also receive events from people who are going through those steps.

[25:00] And, and actually collect those metrics so that you could see, like, okay, how are users actually traversing this flow? How many of them are getting to this depth? Are there any bottlenecks or anything? And even things like, if we decide to change the process, change the logic, how does that change? User be behavior like, are more users going to this STTH, ETC? And the main difference between something like this and something like your app, years of the world or whatever, is because it's just a diagram.

[26:00] You don't have to think about what are all of the Integrations and connections and services and whatever. I need to connect to you, just it's. It's really up to you to connect that yourself. And or even just have it live as an abstract. You know, flow, that's cool and so if the app if. The product actually changes, like the order of events, let's say, or the order of actions taken by the customer.

[26:00] This, like the chart, presumably, would be AO automatically updated to reflect the new product workflow. Yeah, if you're if you're using XD, then yeah, it's, um. We have this thing called Gith hood sync, where it automatically just synchronizes with. I change the logic in the code. Okay, so this diagram is going to change, in the future. We do want it to be so that it sort of derives that graph for you.

[27:00] And you don't have to necessarily use XState, even though it's a fine library to use, but it's JavaScript only for now. That's sick, that's sick, that's really cool. Okay, well, I will tell our head of Revenue to take a look at this, cuz he's always on my ass. Like, do I really want to keep these assets updated? Like, yes, I think that's to so cool, man, that's awesome. Where can people find you and your company on the intro webs?

[27:00] So our company is stat.. And if you want to just jump in like, the quickest way to get started is states. new state. new see. Okay, awesome, well, thanks so much for your time, David. This is really fun. And I think, the devs network will learn a lot. And certainly we're going to, follow up with you guys to explore using your product. I think I'll. So, yeah, thank you so much for having me.

[28:00] Yeah, awesome, thank you. You're listening to the founder to founder podcast powered by Gun..io Frontier network. We release a new episode every Thursday morning, so be sure to subscribe on Spotify, Apple Podcasts, Stitcher or wherever you your music. Please leave us a review and share with your friends. You can follow us online at the Frontier pod or drop us a line at team Gun..io to get in touch about hiring Worldclass Tech [Music].
