<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Safiyev Marat</title>
    <description>The latest articles on DEV Community by Safiyev Marat (@safiyevmarat).</description>
    <link>https://dev.to/safiyevmarat</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3795169%2F1ed4fb8f-6541-43bd-b74f-e4cccd021e34.jpg</url>
      <title>DEV Community: Safiyev Marat</title>
      <link>https://dev.to/safiyevmarat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/safiyevmarat"/>
    <language>en</language>
    <item>
      <title>How I Built an AI Agent That Controls Browsers, Terminals, and Desktop Apps</title>
      <dc:creator>Safiyev Marat</dc:creator>
      <pubDate>Sat, 19 Sep 2026 10:23:23 +0000</pubDate>
      <link>https://dev.to/safiyevmarat/how-i-built-an-ai-agent-that-controls-browsers-terminals-and-desktop-apps-143k</link>
      <guid>https://dev.to/safiyevmarat/how-i-built-an-ai-agent-that-controls-browsers-terminals-and-desktop-apps-143k</guid>
      <description>&lt;h1&gt;
  
  
  How I Built an AI Agent That Controls Browsers, Terminals, and Desktop Apps
&lt;/h1&gt;

&lt;p&gt;An LLM can tell you what to do.&lt;/p&gt;

&lt;p&gt;But what happens when you ask it to actually do something on your computer?&lt;/p&gt;

&lt;p&gt;Open a browser. Create a document. Execute a terminal command. Manage files. Verify the result.&lt;/p&gt;

&lt;p&gt;A language model alone cannot reliably handle all of this.&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;HeyAgent&lt;/strong&gt;, an open-source AI agent designed to interact with real desktop environments.&lt;/p&gt;

&lt;p&gt;Here's how its architecture works.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Core Architecture
&lt;/h2&gt;

&lt;p&gt;HeyAgent isn't just an LLM connected to a few tools.&lt;/p&gt;

&lt;p&gt;It uses a structured execution pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Request
     |
     v
Context &amp;amp; Memory
     |
     v
Router
     |
     v
Planner
     |
     v
Mission Queue
     |
     v
Execution Engine
     |
     v
Tools
     |
     v
Verification
     |
     +---- Success ---&amp;gt; Response
     |
     +---- Retryable Failure ---&amp;gt; Execution Engine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each component has a specific responsibility.&lt;/p&gt;

&lt;p&gt;The model helps decide what needs to happen. The execution system handles how it happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Planning Before Execution
&lt;/h2&gt;

&lt;p&gt;Imagine giving HeyAgent this request:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Open the browser, research a topic, and save the results to a file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This isn't a single action.&lt;/p&gt;

&lt;p&gt;It requires several steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Understand the request.&lt;/li&gt;
&lt;li&gt;Determine which tools are needed.&lt;/li&gt;
&lt;li&gt;Organize the actions.&lt;/li&gt;
&lt;li&gt;Execute the workflow.&lt;/li&gt;
&lt;li&gt;Verify the result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;HeyAgent uses routing and planning to prepare tasks before execution.&lt;/p&gt;

&lt;p&gt;A mission queue coordinates the work, while the execution engine runs the required actions.&lt;/p&gt;

&lt;p&gt;Depending on the task, execution can use a deterministic harness or an LLM-driven tool loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Connecting the LLM to a Real Computer
&lt;/h2&gt;

&lt;p&gt;The execution engine connects the model to tools that interact with the operating system.&lt;/p&gt;

&lt;p&gt;HeyAgent supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Browser:&lt;/strong&gt; Navigate websites and interact with pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desktop:&lt;/strong&gt; Control the mouse, keyboard, windows, and applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal:&lt;/strong&gt; Execute shell commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Files:&lt;/strong&gt; Read, create, and manage local files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrations:&lt;/strong&gt; Work with connected services, including Google Workspace.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows a single workflow to move between different environments.&lt;/p&gt;

&lt;p&gt;For example, an agent can collect information through a browser, process it using a terminal command, and save the output to a local file.&lt;/p&gt;

&lt;p&gt;These operations are coordinated through the agent runtime rather than being completely independent scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Execution Isn't Completion
&lt;/h2&gt;

&lt;p&gt;One important part of the architecture is verification.&lt;/p&gt;

&lt;p&gt;A successful tool call doesn't necessarily mean the user's task is complete.&lt;/p&gt;

&lt;p&gt;A browser action might succeed while the website returns an error.&lt;/p&gt;

&lt;p&gt;A command might execute without producing the expected output.&lt;/p&gt;

&lt;p&gt;HeyAgent includes a separate verification stage that evaluates execution evidence before the workflow reports completion.&lt;/p&gt;

&lt;p&gt;If verification detects a retryable failure, execution can continue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Execute
   |
   v
Verify
   |
   +-- Evidence passes --&amp;gt; Complete
   |
   +-- Retryable failure --&amp;gt; Continue execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This doesn't guarantee that every task will succeed.&lt;/p&gt;

&lt;p&gt;It creates an explicit distinction between performing an action and achieving the requested result.&lt;/p&gt;

&lt;p&gt;I explored this problem in more detail in my previous article about false task completion.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Computer Control Needs Permissions
&lt;/h2&gt;

&lt;p&gt;Giving an AI agent access to a real computer introduces obvious risks.&lt;/p&gt;

&lt;p&gt;A tool capable of managing files or running commands can also perform destructive actions.&lt;/p&gt;

&lt;p&gt;HeyAgent includes a permission system with configurable policies, including approval requirements and capability allowlists.&lt;/p&gt;

&lt;p&gt;Sensitive operations can require explicit user confirmation before execution.&lt;/p&gt;

&lt;p&gt;The goal is to make computer automation useful without treating every model-generated action as automatically authorized.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. No Dependency on a Single LLM
&lt;/h2&gt;

&lt;p&gt;Another design decision was to keep the architecture model-agnostic.&lt;/p&gt;

&lt;p&gt;HeyAgent supports different model providers, including cloud services and local models through Ollama.&lt;/p&gt;

&lt;p&gt;The system also includes model failover capabilities.&lt;/p&gt;

&lt;p&gt;The reasoning model can change without requiring an entirely different computer-control architecture.&lt;/p&gt;

&lt;p&gt;This separation makes it easier to experiment with different models while keeping the surrounding execution system consistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Picture
&lt;/h2&gt;

&lt;p&gt;Building an autonomous AI agent isn't just about writing better prompts.&lt;/p&gt;

&lt;p&gt;It's about connecting several systems:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planning, execution, computer control, permissions, state management, and verification.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HeyAgent brings these components together in a local-first architecture accessible through a CLI, desktop application, and Telegram bot.&lt;/p&gt;

&lt;p&gt;It's still an evolving open-source project, and there's plenty of work ahead.&lt;/p&gt;

&lt;p&gt;If you're interested in computer-use agents, automation, or agent architecture, feel free to explore the code and contribute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/SAFIYEV/HeyAgent" rel="noopener noreferrer"&gt;https://github.com/SAFIYEV/HeyAgent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⭐ If you find the project interesting, consider giving it a star.&lt;/p&gt;

&lt;p&gt;I'd also love to hear how you're approaching execution and verification in your own AI agents.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>agents</category>
      <category>llm</category>
    </item>
    <item>
      <title>Why AI Agents Say “Done” When the Task Actually Failed</title>
      <dc:creator>Safiyev Marat</dc:creator>
      <pubDate>Tue, 11 Aug 2026 07:51:54 +0000</pubDate>
      <link>https://dev.to/safiyevmarat/why-ai-agents-say-done-when-the-task-actually-failed-5ck1</link>
      <guid>https://dev.to/safiyevmarat/why-ai-agents-say-done-when-the-task-actually-failed-5ck1</guid>
      <description>&lt;p&gt;AI agents have a surprisingly simple reliability problem:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;They often confuse performing an action with completing a task.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An agent clicks a button.&lt;/p&gt;

&lt;p&gt;The tool call succeeds.&lt;/p&gt;

&lt;p&gt;The model assumes the job is finished.&lt;/p&gt;

&lt;p&gt;And then you get:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Done ✅&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But maybe the page returned an error.&lt;br&gt;&lt;br&gt;
Maybe the file wasn't created.&lt;br&gt;&lt;br&gt;
Maybe the message wasn't sent.&lt;br&gt;&lt;br&gt;
Maybe the application never opened.&lt;/p&gt;

&lt;p&gt;The action succeeded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The task didn't.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The False Completion Problem
&lt;/h2&gt;

&lt;p&gt;Imagine asking an agent:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Create a Google Doc called Project Plan.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A naive agent might:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Google Docs&lt;/li&gt;
&lt;li&gt;Click “New document”&lt;/li&gt;
&lt;li&gt;Enter the title&lt;/li&gt;
&lt;li&gt;Report success&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But clicking buttons isn't proof that the document actually exists.&lt;/p&gt;

&lt;p&gt;For autonomous agents, this becomes a serious problem.&lt;/p&gt;

&lt;p&gt;The longer the workflow, the worse it gets.&lt;/p&gt;

&lt;p&gt;One incorrect assumption early in the process can make every step after it useless.&lt;/p&gt;

&lt;h2&gt;
  
  
  How HeyAgent Handles It
&lt;/h2&gt;

&lt;p&gt;While building &lt;strong&gt;HeyAgent&lt;/strong&gt;, I decided that executing the last action should not automatically mean the task is complete.&lt;/p&gt;

&lt;p&gt;The basic workflow looks like this:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text
Request
   ↓
Plan
   ↓
Execute
   ↓
Verify
   ↓
Success

And if verification fails:

Execute
   ↓
Verify
   ↓
Failure detected
   ↓
Retry / continue execution

HeyAgent has a separate verification stage after execution.

Instead of trusting the model's assumption that something worked, the system checks for evidence that the expected result was actually produced.

Only after that verification passes should the task be considered completed.

Why This Matters

There is a big difference between:

tool_call = success

and:

user_goal = achieved

The first tells us that an operation ran.

The second tells us that the agent actually did what the user asked.

For simple chat assistants, this distinction may not matter much.

For agents controlling browsers, files, terminals, desktop applications, and external services, it matters a lot.

If we want AI agents to perform real work reliably, they can't just be good at taking actions.

They also need to understand whether those actions actually worked.

That's one of the reliability problems I'm trying to solve with HeyAgent.

HeyAgent is fully open source, so you can explore the architecture, test it, break it, and contribute.

⭐ GitHub: https://github.com/SAFIYEV/HeyAgent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>llm</category>
      <category>agents</category>
    </item>
    <item>
      <title>I Built an Open-Source AI Agent That Actually Controls Your Computer</title>
      <dc:creator>Safiyev Marat</dc:creator>
      <pubDate>Mon, 03 Aug 2026 15:27:18 +0000</pubDate>
      <link>https://dev.to/safiyevmarat/i-built-an-open-source-ai-agent-that-actually-controls-your-computer-51a6</link>
      <guid>https://dev.to/safiyevmarat/i-built-an-open-source-ai-agent-that-actually-controls-your-computer-51a6</guid>
      <description>&lt;p&gt;AI agents are everywhere in 2026.&lt;/p&gt;

&lt;p&gt;Most of them can answer questions, generate code, or automate simple workflows. But once you ask them to interact with a real computer—browsers, desktop applications, terminals, files, and external services—things quickly become unreliable.&lt;/p&gt;

&lt;p&gt;That was the motivation behind &lt;strong&gt;HeyAgent&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Most autonomous agents fail for one of three reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They declare success before the task is actually finished.&lt;/li&gt;
&lt;li&gt;They lose context during long, multi-step workflows.&lt;/li&gt;
&lt;li&gt;They aren't designed to work with a real desktop environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted to build an agent that behaves more like a real assistant instead of just another LLM wrapper.&lt;/p&gt;

&lt;h2&gt;
  
  
  What HeyAgent Does
&lt;/h2&gt;

&lt;p&gt;HeyAgent is an open-source autonomous AI agent for computer control and workflow automation.&lt;/p&gt;

&lt;p&gt;It can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🖥️ Control desktop applications&lt;/li&gt;
&lt;li&gt;🌐 Work inside browsers&lt;/li&gt;
&lt;li&gt;📂 Read and manage files&lt;/li&gt;
&lt;li&gt;💻 Execute terminal commands&lt;/li&gt;
&lt;li&gt;🔗 Connect with external services&lt;/li&gt;
&lt;li&gt;📱 Be controlled through CLI, Desktop UI, or Telegram&lt;/li&gt;
&lt;li&gt;🧠 Plan and execute multi-step workflows&lt;/li&gt;
&lt;li&gt;✅ Verify results before marking tasks as completed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of blindly executing prompts, the agent plans, executes, validates the outcome, and only then reports success.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reducing False Task Completion
&lt;/h2&gt;

&lt;p&gt;One of the biggest problems I noticed in existing AI agents is false task completion.&lt;/p&gt;

&lt;p&gt;Many agents click a button, assume everything worked, and immediately report success.&lt;/p&gt;

&lt;p&gt;In reality, something may have failed several steps earlier.&lt;/p&gt;

&lt;p&gt;HeyAgent performs additional verification after critical actions to reduce false positives and improve reliability during long-running workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built with AWS Support
&lt;/h2&gt;

&lt;p&gt;HeyAgent has been significantly accelerated thanks to the support of AWS.&lt;/p&gt;

&lt;p&gt;AWS has provided the project with cloud infrastructure, GPU computing resources, and access to modern AI services that made rapid experimentation possible throughout development.&lt;/p&gt;

&lt;p&gt;From running GPU workloads to evaluating different LLMs and AI models, AWS has been an important part of the engineering process. Their continued support allows us to iterate faster, test new ideas, and focus on improving the product instead of worrying about infrastructure limitations.&lt;/p&gt;

&lt;p&gt;We're genuinely grateful to AWS for supporting open-source innovation and continuing to help us build HeyAgent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;Model-agnostic architecture&lt;/li&gt;
&lt;li&gt;Cloud and local LLM support&lt;/li&gt;
&lt;li&gt;Plugin-based tool system&lt;/li&gt;
&lt;li&gt;Multi-step execution engine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal isn't to lock developers into one model.&lt;/p&gt;

&lt;p&gt;Whether you prefer cloud providers or local models, HeyAgent is designed to work with both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Open Source?
&lt;/h2&gt;

&lt;p&gt;AI agents shouldn't become black boxes.&lt;/p&gt;

&lt;p&gt;Developers should be able to inspect the reasoning flow, build their own tools, contribute improvements, and adapt the platform to their own workflows.&lt;/p&gt;

&lt;p&gt;That's why HeyAgent is fully open source.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Development is moving fast, and we're actively working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better planning and reasoning&lt;/li&gt;
&lt;li&gt;More reliable desktop automation&lt;/li&gt;
&lt;li&gt;A richer plugin ecosystem&lt;/li&gt;
&lt;li&gt;Improved routing and execution&lt;/li&gt;
&lt;li&gt;Support for additional AI models and integrations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  We'd Love Your Feedback
&lt;/h2&gt;

&lt;p&gt;If you're building AI agents, automation tools, or desktop software, I'd love to hear your thoughts.&lt;/p&gt;

&lt;p&gt;Feedback, ideas, bug reports, and pull requests are always welcome.&lt;/p&gt;

&lt;p&gt;⭐ GitHub: &lt;a href="https://github.com/SAFIYEV/HeyAgent" rel="noopener noreferrer"&gt;https://github.com/SAFIYEV/HeyAgent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A huge thank you again to AWS for supporting HeyAgent with cloud infrastructure, compute resources, and AI services. Their continued support has played an important role in bringing this project to life.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>llm</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
