Agentic AI refers to programs that exhibit agency by using tools, skills, and making autonomous decisions, as opposed to systems that merely orchestrate AI agents. Jaki addresses the two main challenges in building agentic AI—prompt engineering and agent orchestration—by providing native AI integration through the 'by LLM' keyword, which abstracts away prompt complexity through function signatures, and Object Spatial Programming (OSP), which enables graph-based agent architectures with nodes, edges, and walkers for concurrent task execution and intelligent routing.
深掘り
前提条件
- データがありません。
次のステップ
- データがありません。
深掘り
Agentic AI workshop | JacHacks Spring追加:
Hello everyone, welcome to the agent AI workshop and we're going to talk today through uh JKI how to use Ji to build agent AI and first of all I want to check out like how are you guys doing?
You guys are participating in this hackathon and you guys are building amazing things. Uh so first of all I I really appreciate you guys putting your effort into these projects and let's see how it goes in this uh by the end of this uh end of this hackathon how you guys are doing and um yeah so let's get right into our uh workshop on agentic AI. So first of all uh JIK is a language that's built for fullstack application development. It's not just for agent AI. It's not just for full stack. It's not just for back end.
It's for the entire thing. So one man can build the entire application from front end to back end to agent KI. So that's the uh thesis of JKI and Jack. So uh before getting into agent KI let me quickly walk through how like the code looks like uh when it comes to building these front full stack applications. So the best way to find like understand that is let me just uh move to the best place to understand this is through the tutorial that we offer in the documentation. So before jumping into that so we basically for full stack uh we don't need glue code to like bind the back end and the front end which you have to do uh when you build like front ends and back ends uh separately and you AI is like a native thing in the language itself. So you don't have to prompt at all and that's agentic how you do agent AI with Jack. So it's it's an very crazy tag and then again you can deploy uh to Kubernetes like this just do one command and it's up. So uh first of all let me just go through the uh building and learning AI day planner. So that's the tutorial that you should look at if you want to build a full stack application and it goes through the everything there is to building u this application and if you need more information like uh how to use do multi-user and multi-user is of course there how to do collaboration between multi-users that information is embedded in this full full reference and if ever you are in a in a pickle go to uh uh you you can uh quickly uh go to uh yeah let me see okay Jack GBT and you can go search Jack GBT and just ask questions about the documentation you can just ask questions here you can use there's an MCP server there's a rag system or both you just play around if you want to and uh search for anything that you need to understand about something like this uh Yeah, some of my recent chats. Cool. So, Jack GBT is there. Um, if you need uh but more than Jack GBT, uh, what I would really app like you guys to do is go to the Jack Builder.
So, uh, I think Jason like showed you guys how Jack Builder like looks like.
So, if you go to Jack Builder and I'll just go just let me play. I think I have a GitHub account as I remember. Yep, there there I'm in. So, use the Jack GPT and you have a Jack coder which is really good at like learning Jack using Jack and that's I think where the key place you should look at and yeah so let's quickly get into the tutorial and uh look quickly through it and then get on to like h building hands on how to use the tools that avail that's available in Jaki. So in Jack you basically can build like the front end and back end application directly. Let me just uh uh go to the the GitHub itself so you can see examples. So you go to can go to Jack and let me see uh give me a second.
There you go.
Let's get the link directly. There you go.
Okay. So, this is the day planner. It's in uh it's the fully built one. It's actually available in the repo. So, you can go in there, grab that code and look at it or else go through the tutorial.
Uh either way, so you have this uh so you can see in yeah front seal. So, if you go to the main.jack Yes. So here is your main application code where where everything starts and uh you can see that there's some different things at the at the bottom or the header of this application which is to cl and then you write import from front end blah blah blah and to SV and you do this. So this is basically what this does this code does is it can compile down to front end and back end. So SV means server side or back end and then you have CL or client side or front end. So everything that here you basically import from front end app as like client app you import the client app and then uh so import the app and just uh do return client app and call it a day. So that's the front end and then you write the entire back end with AI functionality right uh here. So this is a AI functionality right here which does a categorization using this enumeration available here category using this enam uh work personal shopping health fitness other is going to categorize any title into any of these categories it's signified by the output type. So this is the only thing that you have to do. But if you want to pass in a little bit more information like okay categorize categorize a task based on its title.
You can some add something like this.
This is called a sim string or a sem annotation. It's a semantic annotation.
That's why we call it a sem annotation.
So you can you can do that and enhance your AI to know what it needs to do. But to get a bare bones thing done, you don't need a sim string at all. the the function signature itself is the AI prompt. So that's called by LLM. So this is the by LLM plug-in that's built for Jeki, part of the Jeki ecosystem. It's BM plug-in built into the Jack language.
Uh and you just have the syntax by LLM.
So yeah. Okay. So and uh the frontend code just look like this. And you have uh defobs x element and uh you just write your front end code here. So you can write the front end code, the back end code in theory you can write it everything in one file but it's good to like separate so separate files but import and import and you can see this function being called like uh if you go to main you saw this categorize function and if you look at the front end you'll find that you have functions like uh to call container Uh yeah, so you can basically import any function and call it and the runtime manages the actual connection between the front end and the back end. So yeah, now so this is just to give you a preview of what you can build with Jaki.
So now let's actually go into the actual tutorial and go through ex talk you through how uh by LLM can be used to build your applications fullstack applications. Uh yeah so let's switch gears right now and okay so for the agent workflow uh workshop first of all we should think about what is agentic AI and AI agents is kind of one of the same thing but the how I define it is a program that exhibits agency versus a system that orchestrates an AI agent so and when you have an AI agent uh that can uh have the agency to use tools not to use tools, use skills not to use skills, uh decide what to do for themselves, we call them agentic. While agentic is bas basically a system of orchestration among these set of agents.
So the key challenges when building these agents if you have ever tried is two main things. One thing is prompting or writing the prompts, writing the skills. That's a specific skill and it that skill is also specialized for one type of model. Let's say you are programming for an anthropic model and you switch models to some let's say a Gemma model that's running locally and you have to change your prompting strategy a little bit. So there are a lot of uh intricacies there that gives you a lot of pain when you want to switch from here to there switch the model. So that's one pain and prompting has been a pain for a while but recently agent orchestration has been a big thing and everybody's trying to scramble at building their own agent orchestration.
You might have seen open claw um Hermes all of these are doing uh agent orchestration and they call some call it a harness sort of agent harness. So you have agent orchestration or harness that's built to uh run this agent in a way that's useful for human.
The way Jack helps you build prompt solve the prompting problem is by basically removing that layer entirely and replacing it with a function definition or a function declaration signature. So if you say defaf answer Q string and output string that means and at the by llm at the end that means there is a llm in the program and you're delegating this function to an LLM and the LLM just returns the output. It does not generate any code. It doesn't run any code. It just calls the LLM get the thing done on the LLM side and bring back the result as a string.
That's the basic abstraction that we introduced. Of course, it's not just strings. We'll get to that in a bit.
Like it can do a lot more than just strings, but yeah, that's the BLM piece right there. And the other piece is the object spatial programming. We'll go a little bit into that as well. It's a new a new concept like object. So you have object- oriented programming. So this is object spatial programming which is a augmented version of objectoriented programming uh where you have you can have relationships between objects and that it makes it a key way that we can use this uh programming model to build agents. So uh more on that later. So let's look at the challenge one prompt engineering. So how so previously when you have when you build your applications you have these kind of types. So let's say we have a game level generator and you have these types in your program. You want to use these types and like uh generate a map and represent that map using these types.
However, it's going to be a hard task if you are doing prompt engineering where you have to convert them back to the type which pantic kind of allows you to do it. But still there's a lot of like error handling you have to do and passing that pyantic model. Now you have like double defining the same thing or you have to basically embrace the entire pyantic ecosystems to do a simple thing.
So why don't we just abstract away this uh complexity because prompt engineering is a lot of complexity right here as like I just talked to you I won't I go through it again because it on itself is 147 lines so let's skip that for a bit and so it introduces a lot of complexity so the problem is this is a lot of work how can we abstract that away so again we have to think about when these languages were invented and why these libraries exist like uh Dspy or any other uh SDK that lets you do agents agents. So these libraries exist because these languages were never designed with a focus of building agents at all. So people build libraries around this uh non-existing capability so you can give the language more capability. So the same with SDKs uh types uh yeah Typescript have this AI SDK that was built because everybody's building agents. Let's get the uh give the programmer the capability of writing agents in that language. So same with uh with Jack we think AI is going to the AI is here to stay. So let's build these applications as if it's part of the language itself or in other words give the AI first class citizenship within the programming language. So that's what we did with the by LLM keyword. So the buy keyword allows you to uh annotate your code and say okay this is uh you can automate this using an LL app. So let's get into this tutorial. It's a it's a short like short tutorial with bunch of like uh examples that you can look into. I'll link this uh I'll link this uh link in the description as well as uh in the uh Jack Hacks Discord server. Join the server if you are already not on the server. So uh yeah.
So, let's go into that tutorial in a in a sec. Let me set this and see if I can switch.
Uh oh, yeah, I can switch. Cool. Okay. Now, uh the first thing we should look at is the simple way to use the LLM, which is give it a bunch of stuff and get something out. So it's just you pass some information and the LLM generates string output and you get that string output. So that's how chatbots are built, right? So chatbots basically take in information which is your prompt and then it spits out the output strings and you get that string. So that's the most basic way you can interact with an LLM and this is how you do it in Jacklang.
So this brainstorm idea is something to ground the LLM to something. So you can do that in other ways too but this is the most like uh simple way you can do the most less effort way of doing it or lazy. Yeah the yeah less effort way of doing it. So brainstorm three creative hackathon projects ideas with blah blah blah blah blah. So let's see how this would look like in code. Oh yeah you saw that but let's run it and see. So let's look at step one which is uh brainstorm ideas. So let me just drop the link to the tutorial right now. Give me a sec.
Uh uh um yeah.
Let me drop the tutorial. There you go.
Copy.
Yeah. Okay. Now, let's go to this tutorial real quick. Okay. Yep.
Okay. In this, we have like four steps, simple steps to like let you let you uh see how these by LLM will be used. So it's it's a tutorial but even though it's more of a demonstration of like how to build this. So step one generate. So this is the uh thing that I just showed you like the brainstorm ideas and you have a text for grounding the LLM to like uh let the LLM know how to actually do the task well. And u so this is so you basically define the function. You can add a sim string if you want to and you just call it. So when you call the function pass this interest and skills and you'll get the ID the output. So this skills is just a skills. It's not a skill file or anything just skills. So if you want to pass skill files we can talk about it a bit later. It's not covered in the tutorial code but I I'll show you like how you can do those kind of stuff. So you have brainstorm interest skills and so on. Okay. So this is the basic way to uh work this. So let me just uh Jack. So to install Jeki, you can do a pip install. I'm just going to just uh show you guys pip install that.
Oh, just saw it. Oh, there you go. If install-seeki and it'll just install uh within your environment. And if you don't have uh even Python installed still you have you just inject uh has a simple way to do that. Let's just go to like installation and you grab the curl and that's it. So you have this girl command. So this one. Yeah. Just grab it and you're good to go.
Place it here and install it just like that. So Jack install all good. Uh make sure to like refresh the terminal. So it otherwise like yeah uh yeah refresh refresh the terminal after you install just dict tips. Uh yeah and to run this you can just uh if it's a single jack file and you don't have any front end written you can run it as just jack run jack run and just do this and it will basically run to let you a bit into like how the LLM is configured and everything let me quickly go back to the documentation and walk you through that.
So if you go to full reference AI integration BM reference. So the first thing anyone has to do is the configure their LLM. However, we have a default configuration in L by LM itself. So let's say if you don't have an LM what will happen? So you have uh let's say if you want run your own like uh Olama model you just uh uh you can just pull like OMA and set this uh so if you're running the building the full stack application you can uh just uh plugins bm model uh under there specify which model you want to and that's basically how you set your model and if you need vision capability you can get that as well. So if you need, let me go to model config. Oh yeah. So if you want to change the model, just change the name. So the naming convention is basically uh through light LLM's naming convention for models. So if you go to uh light LLM, light LLM.
So if you go to light llm they have uh in their documentation they have these providers and each of these providers has a way to call like specify the bundle for an instance let's say anthropic so in the anthropic it's pretty pretty simple it's just like you can just name it like this or else if you want something like let's say AW SageMaker now after like setting everything uh let me see the name there you go so model Sage maker And you have to specify this uh like model like this the way you define it.
So just that each model can be defined in different ways uh in BLM too. So because BLM actually calls the LLM through light LLM through. So so you can basically use llm's own naming convention with BLM.
Okay. So you have let me go back to tutorial.
Okay. So, so yeah, let me get down to model constructor.
Yeah. So, if you want to switch models, you just change the name. So, this is basically how you can do it. However, you can also do it in a little bit different way as well. So, I'll show it in the code. So, if you want to uh specify a model in code itself, you can do that too. So let's say I want uh blob uh sorry for that first import uh from by llm lab and uh you need specify which what you need to import which is model and yeah and now you have the model let's create a model so let's say glob creating global variable let's call it yeah gpd4 40. Yeah, GPD 40. 40 mini. Yeah, 40 mini. Okay, so you want to create a model called GPD 40 mini and you say equals model GP4 mini. So that's basically it. Uh so so basically this is setting the model name. Uh so you it's setting the model name as GP4 mini or O mini.
There you go. Uh let's create this to O yeah mini. And now you have this GPD4 mini model in your code. Now to use the model you just use the name here. That's all that's all you have to do. So with instead of buy LLM you can just do GP4 mini there and you are using the same now using this GP4 model. So I just I have an so to get it working with a provider as any other SDK or any other way to reach the model you need to have API key. So get the API key. uh you just need to like export uh you just need to export your API key here and uh let's say for open AAI you just do open AI uh API key and that's it. So you you can do open API key equals your key and put it into the environment and call it. So that's basically uh how you can call a model simple. So let's move on from just simple example and get deep into like more complex ones. Okay. So that's by LLM simple straightforward. Uh and so the next thing so this is this is so this is a key a another way. So this is generate. So I'm calling this the generate mechanis. So the way you can like generate stuff. Oh yeah like okay.
So you generate the output simple. And the next thing is yes you still generate but you can do something uh uh do something smart with this. So that is you define a type and let the LLM fill in the type using some information that's in the context. So if you want to extract something from the LLM, let's say you have a big PDF, you got the entire text. Now we want to in extract the information about the author of the text or else and information about who's the uh who's the main protagonist.
What's the character charact the characterization the character definition defining profile of this uh protagonist of this story. You just put in the story as a input parameter as an input parameter for this uh structure this function and then you mention or annotate it with the type you want to get it as the output and you get the output with the types the values filled in. So this is like structured output.
If you have worked with LLMs you might like heard about like structured output generation which is basically it outputs a JSON schema or else a pyantic type. So this is kind of the thing but you are not doing any defining pyanic or defining the JSON schema everything is handled by the runtime you just define a type in the language and use that to annotate your by random call. So that's how you can use the extract functionality in uh track. So let's quickly look at the code. So you just have a type you just call that type and I'll just call genum and you have step two. step two to extract. So that's the second one. So extract which is taking uh giving the LLM some context and taking an output taking the output. But there's something also that's interesting that you can do with extract other than extraction information that is giving the LLM the capability of choice. So in many cases you might have seen code where you you want to get decide what the LLM wants to do let's say five decisions tell the LLM take one of the five but the way most people do it is you get the output you match the string output and if the LLM change the string by even by a letter now you have a problem what's the choice it's ambiguous again so this can be eliminated ated engine with by LLM using this functionality right here. Um I I actually have it in the deck. So yeah, so what you can do is you can define an enum. Enum is the uh the word for choice in a language. So you have an enum, you can have the same enum but different types within the enum. So you have the different choices within the enum. For an example, if you have the personality type, it has three in this in this example, it has three possible choices.
Introvert, extrovert, amb. Now, if you define a BLM function outputting this personality or this uh enum as the type annotation, now you have choice. The LLM has choice. It can choose uh between these the uh choices that you predefined. So, it cannot pick something else. it's always going to pick one of the three. So that's how you can use the language features itself which has been there for like generations. You can use the language features itself to you use the LLM get the LLM to do the work. So choice is right there in the language itself. So this is another fun capability and very important capability in Jack. Okay, in uh by LLM in within the Jack language. Now let's have a short pause. So, so this is how you can build your applications using BLLM uh where you call the LLM. This is a single all of these is a single BLM call so far. Now these are not agents per se because they are not they don't have agency to do something come back and think about it and go forward like just step back have a look at it.
All of those functionalities the functionalities modern agents have that's not existing within these abstractions so far. So let me show you how you can do that using BM itself because it is in BM that capability exist in BLM. How do we use that and also how do we extend the capability of BLM using the language features of Jack. So let's let's uh switch focus to agent orchestration. So so earlier I told okay there are two challenges one is prompt engineer the other thing is agent orchestration. So how do we let give the agent or the LLM the agency to do something. So there are many different patterns that existing that exist between within LLMs like they do tool calling or they do something like sub spawning this like routing task which is basically like looks like uh this uh you can do a routing task like this where you let the LLM have a choice and you manually run that in the code using the using code but that's still the LLM LLM has a little bit of agency but we can give more. So let's see how so what the next thing that we have is the invoke capability of by LLM or in other words the react functionality. So react is an established methodology for LLMs to reason do something come back reason do something come back in a loop until you either get the job done or you hit a maximum cap. Now this is the way you do it with uh uh with BLM which is basically you do same BLM. So this is simply the same uh functionality as generate but now you have this tools within this BLM you can pass stuff to the LLM. So now you're passing this tools to the LLM and these tools are just functions. These are just functions that exist. You just import them from somewhere and you have the search GitHub describe tech stack estimate buildite build time. All of these you can just get them as like just get that and uh yeah you you can just like um use like import these tools and just use them within BLM. by LLM decides what these are by looking at the these function names itself. Looking at these function itself decides what the LLM uh need to do. And if you want to enhance the LLM's capability of understanding what these tools are add strings to the tools because sim strings can be added to anything is not just a function. You can add it to any type any field any parameter of any function. we can add it anywhere and the runtime decides what is important and sends that in. So in this case if you had sim strings for like tools that can be that is sent into the LLM to understand what this tool actually does. So let's move. So oh yeah, so I previously ran this uh structured pitch with uh input an app that matches blah blah and it just gave this output and step three and in step three uh you have yeah step three is where you call the tools. So you have search GitHub describe this text estimate build time and let's quickly look at the tools what they are.
So they are import from tools. tools are just a another file that has yes search GitHub it's basically doing this very simple and then you have describe text tag which is a bm call which is just a simple generate call and you have estimate buildtime again a simple generate call and then you have uh this save MD like which allows the LLM to like save stuff to MD and you add just sim strings to these you just add sim strings to these uh uh new uh new stuff that you have like for search GitHub you add this information or search GitHub for open source projects matching a query and so on so that's you just add the sim strings and lm knows what this tool does okay so that's that's that tool so let's just run that and see what it does so step three uh jack run step three Step three. Yeah, that's the one. Okay.
Check. Run step three and you'll see.
So, in the meantime, there's a bunch of reports. I'll show you guys. There's some reports that you can look into see how these are actually built into front end by fullstack applications. We'll have a look at this by the end of this session. Um, oh yeah. So now with the invoke you just have AI powered access uh like it's first talking about this um yeah with entry research data it's printing okay three invoke and it's basically telling you what exactly it found out and the links and stuff and you can see you have these GitHub links and so on. So those are searched on the internet found out through using this tool. So you can these tools can be called uh using and you can get the tool outputs as well. So that's a streaming capability. I'll show you like the code that does this streaming capability in a bit. Uh I'm not covering that in the tutorial, but it's in the reference as well as uh the MCP server knows how to do that as well as I'll show you point you to some uh repost that actually does this.
Now um yeah now let's move on move back and okay so that's the loop the agent decides what to do by itself. So the agent have information about how to interact with the environment the tools are there so it's trying to use the tools as best as it can to get your tasks done. So that's the tool calling capability within my now let's have a look at the next thing which is routing. So this is a bit uh this is a bit bit of a long thing to understand but big thing to understand it's very simple but introducing is it has always been a little bit tricky. Now let's go with uh anyone who understand uh would be uh so this would be great if anyone wants to also understand object spatial programming which is nodes uh nodes uh edges and walkers in track. So it's not just about agent intake. I'll and I'll switch back to how to do agent take with it. So let's move to our reference and get to the oh yeah go to get uh yeah full reference uh quickly I'll quickly go through uh if you go to language specification you can find these uh special programming. Okay so Jack has functions objects basically a superet of Python. So it's it has everything for you to build it. Uh but there's this special feature called object spatial programming which basically give the code superpowers of having u a structure uh with between a structure or a a graph in your language. So let's get into how this works. So OSP has mainly three. So where OSP like Y ASP so it's natural graph modeling you can build your application as a like a graph if it fits your application fits you can build a graph right in the language so it can do AI agent like architecture or orchestration uh so it's also separates the concerns of data uh from behavior where data can be abstracted away into uh data uh into a database through this object special programming where each root of uh yeah I'll get to the root in a bit so now co concepts so you have these two things that you have to understand the node the edge the walker the root here visitor so the node itself is another type in the language but it's special type it's called an archetype in the language so this special type person is a node type and also you can have edge types so you have nodes and edges and you can create a graph just by saying root Alice and where Alice is a person object of type node and you can connect Alice to another person Bob which is another person node through this edge which is nose. So you have this nose edge and it has an attribute too. So this is how you can build the graph using the language. You instantiate it, you build it, and you can filter out, you can query it too.
I'll get it get into that in a bit. But there's another functionality. So here you see something called root. So a root is basically so there's a system root. When you just do a jack run, that's the system root.
So whenever you do a jack run of a program, it'll always attach to the root of that session. But in when you're building full stack application with Jack, a root is a persistent object that is unique per each user. So each user that logs in has a particular root node.
And whenever you connect some node to that root node in some fashion, it can doesn't have to be a direct connection.
It can be like multihop connection.
Sorry. So that multihop connection will basically uh that multihop connection will basically let you connect things directly to the root and that means they are persistent. So the graph itself becomes a database in Jack. So if you if you want to do databases in Jack, you just don't want have to be because you can you just connect stuff to the root and it persists. So, so the so building a graph basically means you are persisting to a database and it is done in the local development server as well as in the deployment server like in a in a massive way like you have a MongoDB that's running on the server. You have a radius cache that makes things fast makes things faster for the uh for your application and so on. So it's a you can full build your full application and do the deployment. So I'm stressing this out. I'm I'm going I'm nerding on this because this is crazy. Uh so okay so we have the root per user and per user you can create the graph simple and uh to so this walker is the not the other feature that's very important which is kind of an agent that can walk the graph and the way this agent walk the graph is specified in code. Now in here you can see we'll we say greet with root entry.
So we whenever this walker is on the root node.
So whenever is there is a um uh walk whenever the walkers are like um yeah when the walk is on the root node you just do a visit and uh so you on the root node this function says this is called an ability in the language. So if you have a ability as a greet you have this ability as greet and with root entry you do a visit. So the visit means you are going to visit your outgoing nodes right this means just all the outgoing nodes from the current node and then you have when you visit the outgoing nodes which are this person node you can see they are outgoing nodes and when you connect it to the outgoing node uh um yeah so you have yeah Say hello with person with entry and then you say print hello here.name.
So we have a new thing. What is here? We know self in these languages we had self all the time. Self means self self residential pointer kind of uh pointing to the self object. So if you are a uh if you are define if you are use within a a type you can reference the type itself or the instance of that type itself. This is kind of the same but a little different. What this means is whenever the walker self is there self means walker and here means the node the walker is currently on. So that's the thing here. So whenever the root is on a specific node uh that node can be referred through here and that node's attributes can be accessed through here and on the contrary on the node you can say what does my visitor have and you can use the visitor keyword. So that's what we saw here. So you can use the visitor keyword to see what's on the walker from the node's perspective and you can see use here from the walker's perspective what's on the node. So these are the constructs that's there that will uh that basically gives you the object special programming where you have a graph and you can program a walker to walk a graph to do something. So what makes this interesting for agentic AI is right now this is hard-coded code within each of these bodies instead why can't we have AI applications AI functionality built into the body so that's how you can do agentic AI with uh OSP so you can basically build your agent in a architecture where the walker is the agent you call the walker and the walker decides how it works because we build the AI functional ality within the body itself. That's why I said we can enhance the capability of BLM using uh this uh capab this capability. Okay. Now why?
Because we already talked about tools.
So an agent is basically an LLM attached with a bunch of tools, right? That's not exactly true. So when you build your agents, if you build your agent in a way where all the tools are attached to the LLM and available all the time, uh that's going to be difficult because the LLM has too much context in sometimes sometimes it has too many tools, too many options and it might do something that we do not intend and it might not follow some instruction. So what we can do with OSP is we can bring out some of that comp capability from that single monolithic uh AI agent which can you can break it down to smaller agents and do subdivision spawning and so on. So the AI the AI decides what to do and how it's done is through another OSP using a more structured uh application. So, it's not just building your agent by slapping on a bunch of tools with a skill file on an on an LLM.
It's more about how you manage the context so that the LLM does the right thing, not the wrong thing. Uh, and there's also the realm of optimizing for tokens. We'll not go into that right now. Uh, okay. Now, the next thing, oh, so yeah, let's go into the code and see how this is built with OSP. So, now we have a functionality. The idea is uh with entry I'll look at this first. So with entry so you have this advisor node that is spawned on this hackathon advisor to this route and then you have a pitch which is a realtime multiply multiplayer trivia game with AI generated questions using websockets and react. So you want to build this this is not nothing with Jag. This is something like that you want to build. Now in the application you can just say just root spawn that means this is spawned and this advisor will do will basically return the uh hackathon advisor object after everything is done. So it will return back okay what's the hackathon advisor and it will just print out what the hackathon advisor returns. Okay now let's look at the hackathon advisor. So the hackathon advisor has like a pitch the task the mentor the result and has the route. So it has these few uh agents or sub agents kind of which is uh web developer mentor, mobile mentor, AI mentor, game development mentor. So if you have finalized your like task these agents are going to tell you how you can build uh for this realm like for AI agents how you build that game devel how you do that. Now uh so you have visit so at the end you have this special capability in my llm another special capability is called visit the set of nodes by llm so this semantics mean that the outgoing nodes that previously visited and now LLM decides the LLM decides which of the outgoing nodes to visit and we give it the context about the pitch what we need to accomplish share right here. Okay. Uh did I mess something up? Oh no. Cool. So you have uh yeah just go back advisor. Okay. So you have the hack advisor and it'll basically do visit by LLM and it'll visit the nodes that are important which nodes that are important and it'll bring back stuff. However, what's another cool feature is you can spawn submissions through this. So we don't want each of them to like complete independently. We can get everyone's information all at once. So what we do is so this is when you spawn them and now this is what happens when you collect them. So basically look at the tasks get the information and just consolidate the final answer. Uh but the nice feature is right here in each of these mobile mentor AI mentor and game development mentor. So if you look at mobile uh let's say look at web development men enter you can see that we use this flow keyword. So t equals flow root spawn advisor walker. So you you have a advice worker which is another walker. So if you go up so this is another walker and it has with root entry self advice get advice. So it calls it get advice function which is again another binary call. Now what happens here is it will whenever it is in each of these uh like mentors what will happen is you have web development mentor and you do roots spawn advice mentor uh this advice mentor advise mentor and the advice mentor will just go in and just call just do the task on this route itself and come back. So you root spawn this and it'll come back and it'll be this t and what flow is the the way you can spawn walkers in a concurrent way. All these walkers you are spawning concurrently. So you spawn this walker, you get this pointer to that walker and now you have another walker spawn here.
You have another walker spawn here. All of them are concurrent. So you visit all of the nodes that are important but on each node you are spawning something with nonblocking. You spawn something you get the reference to that ob uh uh process you go to the next one. You keep accumulating these references and you just at the end just um yeah and at the end after everything everything's done you keep accumulating stuff and then you come to collect node and then you get uh yeah with collect node yeah you do wait self tasks so basically you wait for each of the task and when it's done cool so you you can wait for all of the task and in a in in any way that you feel best and then then you do the final result because you have to wait for everything else. Okay.
Now we can do this. This is how you can do like um like concurrent walker spawning and also there's capability of doing async walkers uh async functions async walkers. All of these are documented in the documentation. For the time being, I'm going to just run this application right here. It's going to take a little bit while because it's bunch of workers and Jack one step four route. Oops, my bad.
Now, while this is running, we build this. So these are individual. Oh my bad already done. Sorry. So we have the web dev, you have the X mobile, you have the game dev. Everybody's like giving five tips for each of the thing because we defined it as okay give five tips for each. So it's giving you like uh these information out and okay so that's basically how you can get tasks done using OSP and where you can do like multiple uh where you can orchestrate the LLM. So you basically need to go through how OSP can be used. You can follow the tutorials that's available and in the body decide what you put in terms of uh by LLM or agent behavior.
Okay. Now you have one I went through one to one to four and those are individual calls to the LLM individual functionalities. How do we put this together? So that's also available in the repo. You just need to go to app.jack and that's the entire application right there but it is tagged with a front end which is the nice thing. So now it has this front end which is app.tcl.
So you can just go to this uh app.jack Jack and you can do a jack start instead whenever you want to start your or uh begin your uh or like start your dev server for uh a front end a full stack application or a back end application you do jack start lms might hallucinate and say jack serve that's the old way of doing things tell it to do jack start instead and point it to the MCP server or the skill files and it'll know what how how to run these anyways So Jack start app.jack. Okay. Now what will this give us building client model? Okay, there you go. Ah, now this is a very simple. No user, no authentication is here.
Nothing's here. You can just build in the authentication. It's just making these functions uh just public to private and call it a day. and you make you you can basically make the all of these like authenticated per user sessioned out all of this capability but I just build want to build this so you guys guys can see what can be done so quickly within the next 6 minutes that's available I'll just quickly say okay I'm interested in music I'm composing and I am uh a jack uh yeah a point Jack let's say Jack uh JS and so on. You brainstorm brainstorm ideas and it will get back.
Okay, you have that info. You put that into here. Oh, wait. I have to choose one. My bad. You have melody mixer rhythm recommener. Melody mixer sounds fine. Get that one. You put it down here. Structured pitch.
We'll give you how to like structure your pitch about this like mel mix up the problem the solution uh the wow factor of this users can create and share their compositions instantly with a community feature that allows collaboration and feedback among music enthusiasts. Cool. That sounds cool. Now let's use this in the next uh phase which is invoke. Do some research come back tell me has people have people done this? How can this be done? Like what's the way to do this?
It's doing a research. That means it's doing a bunch of tool calls. It's going to You can see it happening right here to be honest. So you can see it's doing a call to the LLM coming back. It's doing something else coming back. So whenever there's a call, you'll see this lightly LM completion which is basically going through light LLM and I think it finished. Yeah. So now you have a nice MD file formatted uh description about how you can do this and other examples. So you have this GitHub pages that you can just click and go to. Oh, I forgot about that because it's not multi-user now. I have to go from the start. Okay. Uh oh. Uh I won't do that again. So uh so you basically get this uh research and you do get mentor advice which is basically the same thing that I did like just before which is spawn everything get back and report uh basically report each and everyone's advice on uh how to build this application. Okay. Now, because of we have like just like 2 minutes left or 4 minutes left, uh I just going I just want to show you guys some reports that you can go to. So, if you go to uh just let me just see. Yeah.
Oh, yeah. If you go to so you can see a bunch of examples in like you can just go to Jeki uh the repo and go to the organization and you might see applications like agentic AI. Now that's a good place to look at because it has a bunch of these applications that are built with including my LLM and also streaming outputs to a front end. So you can there are a lot of like very good examples like the Jackivity fullstep and uh you have the uh yeah you have ad genius travel planner friend zone there's a bunch of applications with uh which is full which are full stack applications so there's a nice report to look at uh as well as give me a second I think we have posted this information uh in the general as well about like these uh yeah I think I posted this in general in Jack Hacks. Um um let's see.
Oh yeah, there you go. So you have this uh HTKI and then you have the JackMCB playground. That's another nice link that you can use here.
For some reason it's my links are going everywhere. Yeah.
So you have this uh repo which is JackMCP playground. This is built by amazing people like uh Sahan and uh Utit. And you have these guys building these wonderful applications. You see this is a full stack application build.
Uh this is not I think this I think this does not have bylm but this is a fullstack application. A very good example to look at but the agentic AI repo has a bunch of agentic AI applications built. can use that architecture and also we have another one called I'll go let me just get that link and just here you go oh yeah you can actually go to build with Jaki and there's a bunch of other applications people built for previous hackathons as well as for a class which actually deployed like if If you look at this maze mine, that's going to like blow your mind because you can brainstorm very well with maze mine. So check it out and you have GitHub and so on. So you have bunch of applications here. Use these resources. Look at these reports. Point your LLMs to look at the report or or your agents to look at the repos and understand them and use this uh architecture for building your applications. Okay. Now next thing that we'll be doing for the hackathon is a a quick meet up with uh anyone who needs help. You can just join in the mid like checkpoint. So if you are stuck in anything installation or something just hop on to the zoom call. I think the link is in the the jack hacks uh discord. So go there uh click the link join the uh zoom link and we'll we'll meet there. Cool. I think with that I'm going to end the hack uh in end the stream. Thank you all for joining for the agentic AI tutorial and hope you guys a wonderful journey throughout through this hackathon as well as beyond with and keep using Jang because this is going to be the next big thing in HDKI full stack optical development programming in general. So, see you again in the download.
関連おすすめ
OpenHuman VS Hermes AI: Who Wins?
JulianGoldieSEO
285 views•2026-05-29
BREAKING: Microsoft’s New Image Generating Model Beat Out GPT 1.5 and Nano Banana 2
aimmediahouse
122 views•2026-06-03
Long-Running Agents — Build an Agent That Never Forgets with Google ADK
suryakunju
142 views•2026-05-30
This computer is made from real human brain cells. And you can buy it.
Talktmsmedia
3K views•2026-05-28
I Made the Same Anime Fight Scene in Every AI Video Generator
NobleGooseAnime
295 views•2026-05-30
Nvidia Bets Big On AI PCs | New Chip To Power Windows Laptops | Technology | AI Updates | N18S
cnnnews18
3K views•2026-06-01
I Tested NEW Opus 4.8 on Four Projects (Updated LLM Leaderboard)
AICodingDaily
298 views•2026-05-29
3D Platformer Update - NO CAPES
SolarLune
294 views•2026-05-30











