<?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: Orkas</title>
    <description>The latest articles on DEV Community by Orkas (@cxw_orkas).</description>
    <link>https://dev.to/cxw_orkas</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%2F4013342%2F5650c45d-f01e-40e9-929c-88af4e53a4f3.png</url>
      <title>DEV Community: Orkas</title>
      <link>https://dev.to/cxw_orkas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cxw_orkas"/>
    <language>en</language>
    <item>
      <title>Rebuilding Orkas for Long-Running Agents</title>
      <dc:creator>Orkas</dc:creator>
      <pubDate>Mon, 20 Jul 2026 09:24:06 +0000</pubDate>
      <link>https://dev.to/cxw_orkas/rebuilding-orkas-for-long-running-agents-co0</link>
      <guid>https://dev.to/cxw_orkas/rebuilding-orkas-for-long-running-agents-co0</guid>
      <description>&lt;p&gt;AI agents don’t only break because the model is weak. They often break because the product treats agent work like a single chatbot response.&lt;/p&gt;

&lt;p&gt;In the Orkas 1.0 foundation refactor, we rebuilt the lower layers of the system: the agent runtime, provider rotation, orchestration, external hosting, memory, and context management.&lt;/p&gt;

&lt;p&gt;This post summarizes the architecture changes and the lessons behind them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the refactor happened
&lt;/h2&gt;

&lt;p&gt;Orkas is a local-first desktop workspace for AI agents. Agents can work with local files, shell commands, project folders, connectors, skills, and knowledge bases.&lt;/p&gt;

&lt;p&gt;That creates a different set of problems from a normal chat UI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;long-running tasks can span many steps&lt;/li&gt;
&lt;li&gt;context grows quickly&lt;/li&gt;
&lt;li&gt;tool calls need ordering and safety rules&lt;/li&gt;
&lt;li&gt;providers can fail mid-run&lt;/li&gt;
&lt;li&gt;users may interrupt or correct the agent&lt;/li&gt;
&lt;li&gt;multi-agent workflows need coordination, not just a static plan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The refactor was about moving these concerns into Orkas’s own foundation instead of relying on chat-style assumptions.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. An in-process agent runtime
&lt;/h2&gt;

&lt;p&gt;The core change was a standalone, dynamically loadable, in-process agent runtime.&lt;/p&gt;

&lt;p&gt;It is split into two layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Engine layer&lt;/strong&gt;: owns the generic agent loop, tool calling, streaming, context compaction, retry behavior, provider abstraction, memory, and self-evolution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adapter layer&lt;/strong&gt;: connects that engine to Orkas-specific storage, permissions, skills, connectors, provider rotation, and event formats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This boundary adds some complexity, but it keeps the reusable agent machinery separate from product-specific wiring.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Desktop agents need desktop-grade tool behavior
&lt;/h2&gt;

&lt;p&gt;A local desktop agent can touch real files, run local commands, and work across project directories. That means the tool loop needs stronger guarantees.&lt;/p&gt;

&lt;p&gt;Some details became important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;read before write&lt;/li&gt;
&lt;li&gt;stale edit protection&lt;/li&gt;
&lt;li&gt;parallel read-only operations&lt;/li&gt;
&lt;li&gt;ordered writes&lt;/li&gt;
&lt;li&gt;loop detection for repeated tool calls&lt;/li&gt;
&lt;li&gt;interruption handling at safe boundaries&lt;/li&gt;
&lt;li&gt;enough output room for long reports or large edits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not flashy features, but they are what make agent work feel predictable instead of fragile.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Context is a cost and reliability problem
&lt;/h2&gt;

&lt;p&gt;Long tasks burn tokens in small repeated steps: reading, searching, summarizing, retrying, compacting, and recovering from errors.&lt;/p&gt;

&lt;p&gt;The refactor made context handling more model-aware. Instead of using one conservative context limit, the runtime reads the model’s actual context window and compacts around a usage threshold.&lt;/p&gt;

&lt;p&gt;It also avoids compaction when summarizing would not free useful space.&lt;/p&gt;

&lt;p&gt;The lesson: context management is not just a UX feature. It affects cost, latency, and whether the agent can finish the task.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Provider rotation belongs below the agent runner
&lt;/h2&gt;

&lt;p&gt;Model calls fail. Keys hit limits. Networks break.&lt;/p&gt;

&lt;p&gt;Orkas moved provider rotation below the agent runner so a user turn can survive safe failures without duplicating session state.&lt;/p&gt;

&lt;p&gt;The rotation rule is conservative:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if failure happens before meaningful output, another provider can be tried&lt;/li&gt;
&lt;li&gt;once text or tool calls start, rotation stops&lt;/li&gt;
&lt;li&gt;transient failures can retry&lt;/li&gt;
&lt;li&gt;request or policy errors should not be hidden by blind retries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is not to make providers invisible. It is to put failover where it can be handled safely.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. From static plans to group-chat orchestration
&lt;/h2&gt;

&lt;p&gt;Earlier orchestration used a more static plan/DAG model. That looked clean, but real agent work changes as new information appears.&lt;/p&gt;

&lt;p&gt;Orkas moved toward dynamic group-chat orchestration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Commander coordinates the room&lt;/li&gt;
&lt;li&gt;worker agents receive focused slices of context&lt;/li&gt;
&lt;li&gt;dispatch happens through structured tool calls&lt;/li&gt;
&lt;li&gt;the Commander can fan out, synthesize, or hand off work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This fits long-running tasks better than compiling one fixed plan upfront.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Opening the system without removing boundaries
&lt;/h2&gt;

&lt;p&gt;The refactor also made Orkas more open to external capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;external packages&lt;/li&gt;
&lt;li&gt;custom skills&lt;/li&gt;
&lt;li&gt;local CLIs&lt;/li&gt;
&lt;li&gt;user-configured MCP servers&lt;/li&gt;
&lt;li&gt;external agents launched from Orkas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important constraint is that risky actions still go through controlled boundaries: explicit user confirmation, local process isolation where possible, encrypted credentials, and permission checks for external side effects.&lt;/p&gt;

&lt;p&gt;Open hosting is useful only if the trust boundary remains clear.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Memory and self-evolution need limits
&lt;/h2&gt;

&lt;p&gt;Orkas also rebuilt memory and self-evolution around a simple principle:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;bounded, observable, and off by default where appropriate.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Memory is local and separated into categories such as user preferences and agent notes. Retrieval combines semantic and keyword search.&lt;/p&gt;

&lt;p&gt;Self-evolution is agent-private. It can update private skills or competence notes based on corrections, error recovery, and repeated task patterns, but it is bounded by cost controls and explicit session behavior.&lt;/p&gt;

&lt;p&gt;“Agents that improve with use” is only useful if users can understand and control what is changing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;p&gt;Agent infrastructure has a different shape from chat infrastructure.&lt;/p&gt;

&lt;p&gt;A production agent runtime needs to handle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tool ordering&lt;/li&gt;
&lt;li&gt;side effects&lt;/li&gt;
&lt;li&gt;provider failures&lt;/li&gt;
&lt;li&gt;context pressure&lt;/li&gt;
&lt;li&gt;token cost&lt;/li&gt;
&lt;li&gt;user interruption&lt;/li&gt;
&lt;li&gt;orchestration state&lt;/li&gt;
&lt;li&gt;local security boundaries&lt;/li&gt;
&lt;li&gt;memory limits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main challenge is deciding where complexity should live.&lt;/p&gt;

&lt;p&gt;For Orkas, the answer became:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generic agent behavior in the runtime engine&lt;/li&gt;
&lt;li&gt;product-specific wiring in the adapter&lt;/li&gt;
&lt;li&gt;orchestration in the group-chat message bus&lt;/li&gt;
&lt;li&gt;risky external actions behind explicit consent&lt;/li&gt;
&lt;li&gt;memory and self-evolution behind local controls&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The Orkas 1.0 foundation refactor was not about adding more surface features. It was about rebuilding the operating layer underneath long-running local agents.&lt;/p&gt;

&lt;p&gt;If you are building agent systems, especially local-first or desktop agents, the takeaway is simple:&lt;/p&gt;

&lt;p&gt;You eventually stop building around the model API and start building the runtime around the agent.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>The Real Cost Problem in AI Agents</title>
      <dc:creator>Orkas</dc:creator>
      <pubDate>Fri, 03 Jul 2026 10:16:23 +0000</pubDate>
      <link>https://dev.to/cxw_orkas/the-real-cost-problem-in-ai-agents-4ho8</link>
      <guid>https://dev.to/cxw_orkas/the-real-cost-problem-in-ai-agents-4ho8</guid>
      <description>&lt;p&gt;AI agents have a cost problem.&lt;/p&gt;

&lt;p&gt;A single "task" often means many model calls: reading context, calling tools, summarizing results, deciding the next step, retrying, validating output. If every step hits a frontier LLM, the unit economics get ugly fast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One big model for everything is probably the wrong shape&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The better question isn't "which model is smartest?" — it's "which part of the task actually needs the smartest model?"&lt;/p&gt;

&lt;p&gt;LLMs should handle the hard parts: planning, backtracking, judgment, ambiguous decisions.&lt;/p&gt;

&lt;p&gt;Small language models can handle the boring but frequent parts: extraction, routing, JSON formatting, tool parameters, log summaries, simple validation.&lt;/p&gt;

&lt;p&gt;Most agent workflows contain a lot of that second category.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why desktop agents are interesting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cloud agents pay for tokens at almost every step — every retry, every summary, every tool-call decision, every formatting pass usually goes through a remote model.&lt;/p&gt;

&lt;p&gt;Desktop agents have another option: local compute. They can run small local models or deterministic code for cheap, repetitive work, and only call cloud LLMs when the task actually needs deeper reasoning.&lt;/p&gt;

&lt;p&gt;That changes the cost structure. Instead of:&lt;/p&gt;

&lt;p&gt;every step → cloud LLM token cost&lt;/p&gt;

&lt;p&gt;you get something closer to:&lt;/p&gt;

&lt;p&gt;routine work → local compute · hard decisions → cloud LLMs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The long-term loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;start with LLMs → log agent traces → find repeated task patterns → distill them into SLMs / LoRAs → run them locally or cheaply → keep LLMs as fallback&lt;/p&gt;

&lt;p&gt;In other words, agents should get cheaper as they're used more. The more traces you collect, the clearer it gets which tasks are repeated, narrow, and safe to move off frontier models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The next wave of agents won't just be about stronger models — it'll be about better compute allocation: LLMs for judgment, SLMs for narrow repeated work, code for deterministic checks, local compute wherever possible.&lt;/p&gt;

&lt;p&gt;That may be what makes agent economics work.&lt;/p&gt;

&lt;p&gt;Paper: Small Language Models are the Future of Agentic AI — &lt;a href="https://arxiv.org/abs/2506.02153" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2506.02153&lt;/a&gt;&lt;/p&gt;

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