Close Menu
  • Home
  • Featured
  • Technologies
    • Frontend
      • JavaScript
      • AngularJS
      • ReactJS
      • HTML5 & CSS3
    • Backend
      • Java
      • PHP
      • C#
      • Node.js
      • Python
    • DevOps
      • Docker
      • Kubernetes
      • Gitlab
    • Databases
      • SQL
      • MySQL
      • MongoDB
      • SQLite
    • Cloud
      • AWS
      • Azure
      • GCP
    • Frameworks
      • .NET Core
      • .NET
      • Laravel
      • Bootstrap
    • S/W Testing
      • Selenium
      • PostMan
      • JMeter
    • Security
      • BlockChain
      • Network
      • Internet
  • Resources
  • Shop

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

What is MVC in Laravel?

July 5, 2025

 Data Protection: Building Trust, Ensuring Compliance, and Driving Growth

June 4, 2025

A Beginner’s Guide to Virtualization and Containers.

May 18, 2025
Facebook X (Twitter) Instagram LinkedIn WhatsApp YouTube
  • Featured

    What is MVC in Laravel?

    July 5, 2025

     Data Protection: Building Trust, Ensuring Compliance, and Driving Growth

    June 4, 2025

    A Beginner’s Guide to Virtualization and Containers.

    May 18, 2025

    CI/CD: From Code Commit to Production

    May 9, 2025

    SWOT Analysis in Software Projects: How to Brainstorm Risks and Opportunities

    April 29, 2025
  • Tech
  • Gadgets
  • Get In Touch
Facebook X (Twitter) Instagram YouTube WhatsApp
Learn with MashLearn with Mash
  • Home
  • Featured

    What is MVC in Laravel?

    July 5, 2025

    Understanding Attributes in DBMS

    April 11, 2025

    VPN in Google Cloud Platform (GCP)

    April 4, 2025

    Automate 90% of Your Work 🚀with AI Agents 🤖 (Real Examples & Code Inside)

    April 2, 2025

    Data Analysis in Python

    February 17, 2025
  • Technologies
    • Frontend
      • JavaScript
      • AngularJS
      • ReactJS
      • HTML5 & CSS3
    • Backend
      • Java
      • PHP
      • C#
      • Node.js
      • Python
    • DevOps
      • Docker
      • Kubernetes
      • Gitlab
    • Databases
      • SQL
      • MySQL
      • MongoDB
      • SQLite
    • Cloud
      • AWS
      • Azure
      • GCP
    • Frameworks
      • .NET Core
      • .NET
      • Laravel
      • Bootstrap
    • S/W Testing
      • Selenium
      • PostMan
      • JMeter
    • Security
      • BlockChain
      • Network
      • Internet
  • Resources
  • Shop
Learn with MashLearn with Mash
Home » Automate 90% of Your Work 🚀with AI Agents 🤖 (Real Examples & Code Inside)
Tech

Automate 90% of Your Work 🚀with AI Agents 🤖 (Real Examples & Code Inside)

Edwin MachariaBy Edwin MachariaApril 2, 2025No Comments4 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn WhatsApp Copy Link

In 2025, agents can handle 90% of your workflow, freeing you and your team to focus on what truly matters.

Today, we’re diving into CoAgents (CopilotKit), the full-stack framework for building user interactive agents and copilots.

We’ll explore integrations with leading agentic frameworks like LangGraph and CrewAI, discuss workflow automation, and highlight common pitfalls and best practices for avoiding them.

You’ll also get real-world automation examples with source code to help you implement these strategies.

Let’s jump in.


What is covered?

In a nutshell, we are covering these topics in detail.

  1. What are CoAgents with core components?
  2. Integration with CrewAI (Crews + Flows).
  3. What workflow automation means and common misconceptions.
  4. Some real-world examples with source code.
  5. Common pitfalls and best practices involved.

Note: Copilotkit (the framework for building AI Copilots) recently launched CoAgents with the partnership of LangChain and CrewAI. That is what we will be discussing in this.


1. What are Agents?

AI agents are like really smart assistants. You just tell them what you need and they figure out how to get it done!!

The LLM acts as the brain of the system. When an AI has to communicate with the outside world, obtain data, or carry out particular tasks, it can utilize tools, which are external resources or APIs.

What are CoAgents?

It’s like this: Copilot + Agents = CoAgents(CopilotKit), used to break down tasks into smaller steps, coordinate actions, and work alongside humans (Human-in-the-loop).

For example, imagine Dan who is a sales professional, submits a travel reimbursement in the wrong currency which causes a major error. The automated workflow didn’t allow anyone else in the process to correct this mistake easily. CoAgents can step in, ask for human input at the right moment and correct things before they become bigger problems.

ai agents vs coagents
credits goes to Miraj Mohsin

The framework to help you build it.

CopilotKit is a framework for integrating AI copilots into products. It offers React components for AI chat, generative UI, and autocomplete, plus a runtime that improves AI agents with context, tools and skills based on user behavior.

Developers can build CoAgents for any vertical by using LangGraph SDK + CoAgents (Copilotkit). Just build a LangGraph agent attuned to your workflow, then use CoAgents to integrate custom actions and generative UI experiences.

copilot coagents diagram

You can follow Agents 101: How to build your first agent in 30 minutes, a step-by-step guide to help you build CoAgents.

Check out CopilotKit’s GitHub ⭐️

Core Components.

This is done within a clean framework to manage CoAgents inside your application (thanks to LangGraph).

Let’s understand the core components:

  • Shared State (Agent ↔ Application) – a synchronized state between the AI agent and the application, to make sure both have real-time access to the same information. This allows the agent to understand the application’s context and the application to monitor the agent’s actions.
const {state, setState} = useCoAgent("the agent name")
shared state
  • Agentic Generative UI – render the agent’s real-time state in the chat UI so the user can see what the agent is doing.
useCoagentStateRender(
  name: "research_agent",
  node: "download_progress",
  render: ({ state, nodeName, status }) => {
    return Progress logs={state.logs} /;
  });
agentic generative ui
  • Human-in-the-Loop – specify breakpoints in the agent process at which Human input or approval is required. This ensures greater safety as well as better agent performance.
useCopilotAction({
 name: "ApprovePlan",
 parameters: [
    { name: "planSteps", type: "string[]" }
 ],
 renderAndWait: ({ args, handler }) => (
    <ConfirmPlan
       planSteps={args.planSteps}
       onApprove={(approvedSteps) => handler({ ... })}
        onDeny={() => handler({ ... })}
     />
  );
Human-in-the-Loop
  • Realtime frontend actions – send frontend actions to the LangGraph agent as they become available. This allows the agent to explicitly take action within the application’s frontend in real-time, such as filling out forms.
useCopilotAction({
 name: "InsertItemInList",
 parameters: [ 
    { name: "city", type: "string" }, 
    { name: "country", type: "string" } 
 ], 
 handler: ({ args, status }) => { 
   // ... 
 } 
});
realtime frontend actions

As per the docs, the future versions will include agent steering, enabling end-users to realign errant agents and subgraph support, among others.

You can read more on copilotkit.ai/coagents which also has illustrative diagrams to help you understand.

Share. Facebook Twitter LinkedIn WhatsApp
Edwin Macharia
  • Website

Software Engineer || Database Administrator || DevOps Developer || Certified Scrum Master

Related Posts

What is MVC in Laravel?

July 5, 2025

Understanding Attributes in DBMS

April 11, 2025

VPN in Google Cloud Platform (GCP)

April 4, 2025

Data Analysis in Python

February 17, 2025
Add A Comment
Leave A Reply Cancel Reply

Editors Picks

What is MVC in Laravel?

July 5, 2025

 Data Protection: Building Trust, Ensuring Compliance, and Driving Growth

June 4, 2025

A Beginner’s Guide to Virtualization and Containers.

May 18, 2025

CI/CD: From Code Commit to Production

May 9, 2025
Top Reviews
Advertisement
Learn with Mash
Facebook X (Twitter) Instagram YouTube LinkedIn WhatsApp
  • Home
  • Tech
  • Gadgets
  • Mobiles
  • Privacy & Policy
© 2025 Edwin Macharia. Designed by Movosoft Technologies.

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.