<?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: Agent Project Context</title>
    <description>The latest articles on DEV Community by Agent Project Context (agentprojectcontext).</description>
    <link>https://dev.to/agentprojectcontext</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%2Forganization%2Fprofile_image%2F13570%2F023c1758-dc35-459b-a5fc-8407f902df4a.png</url>
      <title>DEV Community: Agent Project Context</title>
      <link>https://dev.to/agentprojectcontext</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agentprojectcontext"/>
    <language>en</language>
    <item>
      <title>APX MCP Resolution Should Start With Runtime, Not Global Defaults</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Tue, 25 Aug 2026 12:04:13 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/apx-mcp-resolution-should-start-with-runtime-not-global-defaults-41id</link>
      <guid>https://dev.to/agentprojectcontext/apx-mcp-resolution-should-start-with-runtime-not-global-defaults-41id</guid>
      <description>&lt;h1&gt;
  
  
  APX MCP Resolution Should Start With Runtime, Not Global Defaults
&lt;/h1&gt;

&lt;p&gt;When one MCP name exists in more than one place, APX should not guess.&lt;/p&gt;

&lt;p&gt;It should prefer the most local, most operationally specific definition first.&lt;/p&gt;

&lt;p&gt;That is why APX resolves MCP servers in this order: &lt;code&gt;runtime&lt;/code&gt;, then &lt;code&gt;shared&lt;/code&gt;, then foreign IDE configs, then &lt;code&gt;global&lt;/code&gt; last.&lt;/p&gt;

&lt;p&gt;This is not a small storage detail. It is one of the practical boundaries between APC and APX.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It keeps committed project context such as &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/agents/&lt;/code&gt;, &lt;code&gt;.apc/skills/&lt;/code&gt;, and &lt;code&gt;.apc/mcps.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It decides what actually runs on one machine: CLI behavior, daemon state, local sessions, message logs, engines, MCP discovery, and runtime files under &lt;code&gt;~/.apx/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;MCP resolution belongs on the APX side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;runtime&lt;/code&gt; should win first
&lt;/h2&gt;

&lt;p&gt;The core rule is documented directly in &lt;a href="///Volumes/SSDT7Shield/proyectos_varios/agentprojectcontext/apx/src/core/mcp/sources.js"&gt;&lt;code&gt;apx/src/core/mcp/sources.js&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That file defines three APX-owned writable scopes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;runtime&lt;/code&gt;: &lt;code&gt;~/.apx/projects/&amp;lt;apxId&amp;gt;/mcps.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;apc&lt;/code&gt; / &lt;code&gt;shared&lt;/code&gt;: &lt;code&gt;.apc/mcps.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;global&lt;/code&gt;: &lt;code&gt;~/.apx/mcps.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also defines the merge priority by name conflict:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;runtime&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;apc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;foreign IDE configs such as Claude, Cursor, VS Code, Roo, and Gemini&lt;/li&gt;
&lt;li&gt;&lt;code&gt;global&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The code comment explains the reason in plain terms: per-project local secrets should win.&lt;/p&gt;

&lt;p&gt;That is correct.&lt;/p&gt;

&lt;p&gt;If the same MCP server name appears in both &lt;code&gt;.apc/mcps.json&lt;/code&gt; and a machine-local runtime file, the runtime copy is usually the one that knows the real endpoint, token, or local command path for this machine right now.&lt;/p&gt;

&lt;p&gt;A global fallback should not silently override that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What APC should keep
&lt;/h2&gt;

&lt;p&gt;APC should keep team-safe, durable MCP definitions.&lt;/p&gt;

&lt;p&gt;For example, a repository can commit a shared MCP entry that tells collaborators which server name the project expects, whether it is stdio or HTTP, and which command shape or URL pattern belongs to the project.&lt;/p&gt;

&lt;p&gt;That is project context.&lt;/p&gt;

&lt;p&gt;It is reviewable, portable, and appropriate for &lt;code&gt;.apc/mcps.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But APC should not try to own the last-mile operational truth for each laptop.&lt;/p&gt;

&lt;p&gt;A token-bearing HTTP header, a user-specific local path, or a localhost port forwarded by one developer is not portable context. That belongs to APX runtime state.&lt;/p&gt;

&lt;h2&gt;
  
  
  What APX should keep
&lt;/h2&gt;

&lt;p&gt;APX should keep the effective local override.&lt;/p&gt;

&lt;p&gt;The same &lt;a href="///Volumes/SSDT7Shield/proyectos_varios/agentprojectcontext/apx/src/core/mcp/sources.js"&gt;&lt;code&gt;sources.js&lt;/code&gt;&lt;/a&gt; file writes runtime MCP state under &lt;code&gt;~/.apx/projects/&amp;lt;apxId&amp;gt;/mcps.json&lt;/code&gt;, and &lt;code&gt;writeRuntimeMcps()&lt;/code&gt; protects that file with &lt;code&gt;chmod 0600&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That is a strong signal about intended ownership.&lt;/p&gt;

&lt;p&gt;Runtime scope is not just "another place to store MCPs." It is the place for MCP definitions that may carry secrets or machine-local details and must never leak into the repository.&lt;/p&gt;

&lt;p&gt;That also matches the repo guidance in &lt;a href="///Volumes/SSDT7Shield/proyectos_varios/agentprojectcontext/apx/AGENTS.md"&gt;&lt;code&gt;apx/AGENTS.md&lt;/code&gt;&lt;/a&gt;: tokens belong in runtime scope, not in committed APC files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;global&lt;/code&gt; should lose last
&lt;/h2&gt;

&lt;p&gt;A machine-wide default is useful, but it should be a fallback, not a winner.&lt;/p&gt;

&lt;p&gt;Suppose you use a &lt;code&gt;github&lt;/code&gt; MCP server across many projects. A global definition in &lt;code&gt;~/.apx/mcps.json&lt;/code&gt; can save setup time.&lt;/p&gt;

&lt;p&gt;But if one repository needs a different endpoint, different headers, or a safer project-local override, that repo should not have to fight the machine default.&lt;/p&gt;

&lt;p&gt;Putting &lt;code&gt;global&lt;/code&gt; last solves that.&lt;/p&gt;

&lt;p&gt;The project can keep a shared &lt;code&gt;.apc/mcps.json&lt;/code&gt; entry for collaborators, and one developer can still place a runtime override on top without changing committed project truth.&lt;/p&gt;

&lt;p&gt;That is the useful split:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APC describes shared project intent.&lt;/li&gt;
&lt;li&gt;APX resolves local operational reality.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The CLI reflects the same rule
&lt;/h2&gt;

&lt;p&gt;The CLI in &lt;a href="///Volumes/SSDT7Shield/proyectos_varios/agentprojectcontext/apx/src/interfaces/cli/commands/mcp.js"&gt;&lt;code&gt;apx/src/interfaces/cli/commands/mcp.js&lt;/code&gt;&lt;/a&gt; exposes &lt;code&gt;shared&lt;/code&gt;, &lt;code&gt;runtime&lt;/code&gt;, &lt;code&gt;global&lt;/code&gt;, and &lt;code&gt;all&lt;/code&gt; as explicit scopes.&lt;/p&gt;

&lt;p&gt;Read operations can inspect them all. Write operations default differently depending on context, but &lt;code&gt;runtime&lt;/code&gt; remains first-class because APX expects real setups to need local overrides.&lt;/p&gt;

&lt;p&gt;That matters for practical work.&lt;/p&gt;

&lt;p&gt;If a team commits a safe shared MCP definition and one operator needs a secret-bearing variant, that operator can add it in runtime scope and APX will resolve that one first. No repo churn. No fake portability. No accidental secret commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger lesson
&lt;/h2&gt;

&lt;p&gt;Portable context becomes fragile when it tries to own machine-local execution details.&lt;/p&gt;

&lt;p&gt;APC stays useful when committed files remain small, durable, and broadly true for anyone who clones the repo.&lt;/p&gt;

&lt;p&gt;APX stays useful when it handles the messy part honestly: merge order, local secrets, active machine paths, and effective runtime resolution.&lt;/p&gt;

&lt;p&gt;MCP resolution is where that philosophy becomes concrete.&lt;/p&gt;

&lt;p&gt;So the rule should stay simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep shared project-safe MCP definitions in APC&lt;/li&gt;
&lt;li&gt;keep secret or machine-local overrides in APX runtime scope&lt;/li&gt;
&lt;li&gt;let &lt;code&gt;global&lt;/code&gt; act as fallback, not authority&lt;/li&gt;
&lt;li&gt;resolve &lt;code&gt;runtime&lt;/code&gt; first when names conflict&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That keeps APC portable.&lt;/p&gt;

&lt;p&gt;And it keeps APX trustworthy in daily use.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Project Command Can Travel With APC. Its Execution Should Stay Local.</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Mon, 24 Aug 2026 12:03:13 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/a-project-command-can-travel-with-apc-its-execution-should-stay-local-3623</link>
      <guid>https://dev.to/agentprojectcontext/a-project-command-can-travel-with-apc-its-execution-should-stay-local-3623</guid>
      <description>&lt;h1&gt;
  
  
  A Project Command Can Travel With APC. Its Execution Should Stay Local.
&lt;/h1&gt;

&lt;p&gt;A useful command definition is part of project context.&lt;/p&gt;

&lt;p&gt;Its execution environment is not.&lt;/p&gt;

&lt;p&gt;That is a small distinction, but it matters if you want APC and APX to stay clean.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It is where a repository can keep durable agent-facing files like &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/agents/&lt;/code&gt;, &lt;code&gt;.apc/skills/&lt;/code&gt;, and &lt;code&gt;.apc/commands/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It is what turns that context into real work on one machine: CLI sessions, web admin actions, Telegram turns, MCP calls, engines, and runtime state under &lt;code&gt;~/.apx/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Project commands sit right on that boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should travel
&lt;/h2&gt;

&lt;p&gt;A command body that explains a repeatable workflow belongs with the project.&lt;/p&gt;

&lt;p&gt;For example, a repo might ship a markdown command in &lt;code&gt;.apc/commands/release-checklist.md&lt;/code&gt; or &lt;code&gt;.apc/commands/bug-triage.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That file is portable context. It tells any compatible tool, "when someone asks for this named workflow, here is the project-specific instruction body."&lt;/p&gt;

&lt;p&gt;That is exactly the kind of thing APC should carry.&lt;/p&gt;

&lt;p&gt;It is durable, reviewable, and tied to the repository rather than one operator's laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should not travel
&lt;/h2&gt;

&lt;p&gt;The way that command gets resolved and executed should stay local.&lt;/p&gt;

&lt;p&gt;APX's CLI code makes that boundary explicit.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx command list&lt;/code&gt; and &lt;code&gt;apx command show&lt;/code&gt; read markdown files from &lt;code&gt;.apc/commands/&lt;/code&gt;, but they do not treat execution state as part of APC. First APX resolves which project you mean. In &lt;code&gt;resolveCommandRoot()&lt;/code&gt;, it can use an explicit &lt;code&gt;--project&lt;/code&gt;, the nearest APC root found from the current working directory, or a registered project path resolved through APX.&lt;/p&gt;

&lt;p&gt;That path resolution is runtime behavior, not repository contract.&lt;/p&gt;

&lt;p&gt;The project file travels.&lt;/p&gt;

&lt;p&gt;The machine-specific answer to "which registered project does this command refer to right now?" does not.&lt;/p&gt;

&lt;p&gt;That second part depends on local registration, current &lt;code&gt;cwd&lt;/code&gt;, and APX runtime state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this split matters
&lt;/h2&gt;

&lt;p&gt;If you collapse those two layers, command systems get brittle fast.&lt;/p&gt;

&lt;p&gt;One bad design is to store only runtime aliases and assume the command body lives in some hidden local database. Then the workflow stops being part of the project contract.&lt;/p&gt;

&lt;p&gt;The opposite bad design is to push runtime details into APC, such as local execution history, channel bindings, machine-specific paths, or per-user resolution caches. Then the repository starts carrying private or unstable state it should never own.&lt;/p&gt;

&lt;p&gt;The cleaner rule is simpler:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APC stores the command definition.&lt;/li&gt;
&lt;li&gt;APX decides how to find the active project and run work from the current machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That keeps project intent portable without pretending execution context is portable too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical example
&lt;/h2&gt;

&lt;p&gt;The APX command implementation is deliberately modest.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;listCommandFiles()&lt;/code&gt; scans &lt;code&gt;.apc/commands/&lt;/code&gt; for markdown files. &lt;code&gt;cmdCommandShow()&lt;/code&gt; prints the requested file. And &lt;code&gt;resolveProjectId()&lt;/code&gt; handles runtime-friendly lookup rules such as project id, exact path, exact name, fuzzy match, current APC root, or auto-registration.&lt;/p&gt;

&lt;p&gt;That is a good division of labor.&lt;/p&gt;

&lt;p&gt;The repository owns the workflow text.&lt;/p&gt;

&lt;p&gt;APX owns the local question of which project instance the operator is currently talking about.&lt;/p&gt;

&lt;p&gt;So if two developers clone the same repository, they can share the same command body through APC while APX still resolves each clone locally on each machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  APC portable, APX practical
&lt;/h2&gt;

&lt;p&gt;This is the deeper APC/APX pattern in miniature.&lt;/p&gt;

&lt;p&gt;APC should carry durable project meaning.&lt;/p&gt;

&lt;p&gt;APX should supply local resolution, execution, logging, and runtime coordination.&lt;/p&gt;

&lt;p&gt;A project command can travel with the repo because the instruction body is part of project truth.&lt;/p&gt;

&lt;p&gt;Its execution should stay local because runtimes, registrations, channels, and machine paths are not.&lt;/p&gt;

&lt;p&gt;That separation is what keeps portable context useful instead of leaky.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Visible Agent Name Should Not Double as the Agent Profile</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sun, 23 Aug 2026 12:04:52 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/a-visible-agent-name-should-not-double-as-the-agent-profile-h6o</link>
      <guid>https://dev.to/agentprojectcontext/a-visible-agent-name-should-not-double-as-the-agent-profile-h6o</guid>
      <description>&lt;h1&gt;
  
  
  A Visible Agent Name Should Not Double as the Agent Profile
&lt;/h1&gt;

&lt;p&gt;One easy way to make an agent system confusing is to let one label do two jobs.&lt;/p&gt;

&lt;p&gt;In APX, the visible agent name and the active agent profile should stay separate.&lt;/p&gt;

&lt;p&gt;That separation matters because APC and APX solve different problems.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It gives a project stable files like &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/&lt;/code&gt;, agent definitions, skills, and other committed context that can travel with the repository.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It decides how that context runs on a real machine: CLI, web admin, Telegram, ACP, routines, direct engines, or external coding runtimes.&lt;/p&gt;

&lt;p&gt;A display name belongs to the runtime identity side. A profile belongs to the runtime behavior side.&lt;/p&gt;

&lt;p&gt;If you mix them, both become harder to trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the repo already says
&lt;/h2&gt;

&lt;p&gt;The APX codebase keeps this boundary explicit.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;resolveAgentName()&lt;/code&gt; reads the super-agent display name from &lt;code&gt;~/.apx/identity.json&lt;/code&gt;, with a fallback to &lt;code&gt;super_agent.name&lt;/code&gt;, then to &lt;code&gt;"APX"&lt;/code&gt;. That is the user-facing label.&lt;/p&gt;

&lt;p&gt;The CLI help describes &lt;code&gt;apx profile&lt;/code&gt; differently: it installs, activates, and configures the super-agent's "line of work," and says that with no profile active, APX behaves exactly as it always has.&lt;/p&gt;

&lt;p&gt;Those are not the same concern.&lt;/p&gt;

&lt;p&gt;One answers, "What do users see this agent called?"&lt;/p&gt;

&lt;p&gt;The other answers, "What kind of work package is currently shaping the default runtime behavior?"&lt;/p&gt;

&lt;h2&gt;
  
  
  Why APC makes this easier
&lt;/h2&gt;

&lt;p&gt;APC already keeps project agents separate from runtime identity.&lt;/p&gt;

&lt;p&gt;A project agent in APC has a stable slug, role, model, and optional skills. That definition is part of the repository contract. It should not change just because someone wants the default APX assistant to appear as &lt;code&gt;APX&lt;/code&gt;, &lt;code&gt;Ops Desk&lt;/code&gt;, or another local name in Telegram or the web UI.&lt;/p&gt;

&lt;p&gt;That is exactly why APC works as a portable layer: project truth can stay reviewable while runtime presentation stays local.&lt;/p&gt;

&lt;p&gt;APX then adds its own runtime-only layer on top:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;identity fields for how the default assistant presents itself&lt;/li&gt;
&lt;li&gt;profiles for the default assistant's line of work&lt;/li&gt;
&lt;li&gt;channels and routines that use those choices on the current machine&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What goes wrong when the two collapse
&lt;/h2&gt;

&lt;p&gt;If the visible name also selects behavior, small cosmetic changes become risky.&lt;/p&gt;

&lt;p&gt;Imagine renaming the default assistant from &lt;code&gt;APX&lt;/code&gt; to &lt;code&gt;Release Desk&lt;/code&gt; because that reads better in Telegram. That should change the label users see. It should not silently install a release-management behavior package.&lt;/p&gt;

&lt;p&gt;The inverse problem is just as bad.&lt;/p&gt;

&lt;p&gt;If you activate a profile like &lt;code&gt;secretary&lt;/code&gt;, APX should gain that workflow package without pretending the assistant's public name must also become &lt;code&gt;Secretary&lt;/code&gt; on every surface. Otherwise a behavior switch leaks into UI identity, logs, and user expectations.&lt;/p&gt;

&lt;p&gt;Keeping the two separate preserves a clean rule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;identity answers who the assistant appears to be&lt;/li&gt;
&lt;li&gt;profile answers what line of work it is optimized for right now&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical example
&lt;/h2&gt;

&lt;p&gt;These two commands should remain independent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx identity show
apx profile use secretary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first is about runtime identity.&lt;/p&gt;

&lt;p&gt;The second is about runtime behavior.&lt;/p&gt;

&lt;p&gt;Neither should rewrite APC project agent files, because APC owns project context, not local presentation choices for the default runtime assistant.&lt;/p&gt;

&lt;p&gt;That is the deeper APC/APX split in miniature.&lt;/p&gt;

&lt;p&gt;APC keeps portable project meaning in the repo.&lt;/p&gt;

&lt;p&gt;APX keeps local execution choices flexible: display name, active profile, channels, engines, and surfaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Small design rule, big payoff
&lt;/h2&gt;

&lt;p&gt;When an agent platform lets one field carry both identity and behavior, debugging gets harder fast.&lt;/p&gt;

&lt;p&gt;Users stop knowing whether a rename changed branding, prompts, capabilities, or all three.&lt;/p&gt;

&lt;p&gt;APX is stronger when it keeps those concerns apart.&lt;/p&gt;

&lt;p&gt;Let APC describe project agents.&lt;/p&gt;

&lt;p&gt;Let APX decide how the default assistant should appear today.&lt;/p&gt;

&lt;p&gt;And let profiles shape runtime behavior without hijacking the assistant's visible name.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Use `apx exec` for Direct Reasoning. Use `apx run` for Real Work.</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sat, 22 Aug 2026 12:04:28 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/use-apx-exec-for-direct-reasoning-use-apx-run-for-real-work-22pp</link>
      <guid>https://dev.to/agentprojectcontext/use-apx-exec-for-direct-reasoning-use-apx-run-for-real-work-22pp</guid>
      <description>&lt;h1&gt;
  
  
  Use &lt;code&gt;apx exec&lt;/code&gt; for Direct Reasoning. Use &lt;code&gt;apx run&lt;/code&gt; for Real Work.
&lt;/h1&gt;

&lt;p&gt;A lot of confusion around APC and APX comes from two commands that both look like "run an agent," but do very different jobs.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx exec&lt;/code&gt; calls an LLM directly inside APX.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx run&lt;/code&gt; delegates the task to an external coding runtime such as Claude Code, Codex, OpenCode, Aider, Cursor Agent, Gemini CLI, or Qwen Code.&lt;/p&gt;

&lt;p&gt;That distinction matters because APC and APX split responsibilities on purpose.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It keeps project truth in repository files like &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/project.json&lt;/code&gt;, agent definitions, skills, and other committed context.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It decides how to execute that context today: direct engine call, external coding CLI, daemon route, web admin, Telegram, or another surface.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx exec&lt;/code&gt; and &lt;code&gt;apx run&lt;/code&gt; are one of the clearest examples of that boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;apx exec&lt;/code&gt; really does
&lt;/h2&gt;

&lt;p&gt;The APX docs define an engine as a direct LLM adapter inside APX. When you call &lt;code&gt;apx exec&lt;/code&gt;, APX resolves the model, picks the matching engine, and makes the provider API call itself.&lt;/p&gt;

&lt;p&gt;No external coding process is spawned.&lt;/p&gt;

&lt;p&gt;That makes &lt;code&gt;apx exec&lt;/code&gt; the right tool for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;quick questions&lt;/li&gt;
&lt;li&gt;summaries&lt;/li&gt;
&lt;li&gt;classification&lt;/li&gt;
&lt;li&gt;small rewrites&lt;/li&gt;
&lt;li&gt;one-shot analysis using APC context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; reviewer &lt;span class="s2"&gt;"What are the riskiest changes in this PR?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In that path, APX reads the APC agent definition, builds the system prompt, loads the agent memory it needs, and asks the configured model directly.&lt;/p&gt;

&lt;p&gt;The response stays inside APX conversation storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;apx run&lt;/code&gt; really does
&lt;/h2&gt;

&lt;p&gt;The runtimes docs define a runtime differently: it is an external AI coding CLI that APX can invoke headlessly on behalf of an agent.&lt;/p&gt;

&lt;p&gt;So &lt;code&gt;apx run&lt;/code&gt; is not just "exec, but bigger." It is a different execution lane.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx run reviewer &lt;span class="nt"&gt;--runtime&lt;/span&gt; codex &lt;span class="s2"&gt;"Refactor parseAgentsMd to use a state machine"&lt;/span&gt; &lt;span class="nt"&gt;--timeout&lt;/span&gt; 600
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here APX still provides the same APC-based project context. It still reads the same agent definition and builds the same kind of system prompt. But instead of calling an internal engine, it spawns an external tool and records the session envelope around it.&lt;/p&gt;

&lt;p&gt;That matters because the external runtime can do things &lt;code&gt;apx exec&lt;/code&gt; should not pretend to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;edit files&lt;/li&gt;
&lt;li&gt;run shell commands&lt;/li&gt;
&lt;li&gt;use its own coding workflow&lt;/li&gt;
&lt;li&gt;keep its own native transcript&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The APX docs describe this bluntly in the &lt;code&gt;run vs. exec&lt;/code&gt; table: &lt;code&gt;apx run&lt;/code&gt; is for full coding-agent capabilities, while &lt;code&gt;apx exec&lt;/code&gt; is for quick one-shot reasoning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Same APC context, different execution surface
&lt;/h2&gt;

&lt;p&gt;This is the important design point.&lt;/p&gt;

&lt;p&gt;The agent does not change just because the execution lane changes.&lt;/p&gt;

&lt;p&gt;APC still owns the portable part: the agent role, instructions, project contract, and committed context.&lt;/p&gt;

&lt;p&gt;APX owns the runtime choice.&lt;/p&gt;

&lt;p&gt;That means you can keep one agent identity and switch execution style based on the task:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;apx exec&lt;/code&gt; when you need judgment&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;apx run&lt;/code&gt; when you need action&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is a cleaner model than creating one "thinking agent" and one separate "coding agent" just because the tool path changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical rule
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;apx exec&lt;/code&gt; when the answer should come back as text and the job mostly fits inside one model call.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;apx run&lt;/code&gt; when the job needs a real coding runtime with filesystem and terminal behavior.&lt;/p&gt;

&lt;p&gt;A simple filter works well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;asking, comparing, summarizing, explaining: &lt;code&gt;apx exec&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;editing, refactoring, reviewing live files, running commands: &lt;code&gt;apx run&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you blur the two, you get bad expectations.&lt;/p&gt;

&lt;p&gt;People ask &lt;code&gt;apx exec&lt;/code&gt; to behave like a full coding CLI and wonder why it only answers.&lt;/p&gt;

&lt;p&gt;Or they use &lt;code&gt;apx run&lt;/code&gt; for tiny reasoning tasks and pay the overhead of spawning a whole external runtime for no reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger APC/APX lesson
&lt;/h2&gt;

&lt;p&gt;APC should describe what the project means.&lt;/p&gt;

&lt;p&gt;APX should decide how that meaning gets executed on the current machine.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx exec&lt;/code&gt; and &lt;code&gt;apx run&lt;/code&gt; show that design in a very practical way.&lt;/p&gt;

&lt;p&gt;Portable context stays stable.&lt;/p&gt;

&lt;p&gt;Execution lane stays flexible.&lt;/p&gt;

&lt;p&gt;So if you need one sentence to remember the split, use this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;APC keeps the agent portable. APX chooses whether that agent should think directly or act through a coding runtime.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>If You Do Not Restart APX, You Are Testing Old Code</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Fri, 21 Aug 2026 12:03:28 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/if-you-do-not-restart-apx-you-are-testing-old-code-160f</link>
      <guid>https://dev.to/agentprojectcontext/if-you-do-not-restart-apx-you-are-testing-old-code-160f</guid>
      <description>&lt;h1&gt;
  
  
  If You Do Not Restart APX, You Are Testing Old Code
&lt;/h1&gt;

&lt;p&gt;One of the most practical APX rules has nothing to do with prompts, models, or MCPs.&lt;/p&gt;

&lt;p&gt;It is this: if you change APX code and do not restart the daemon before testing, you are usually testing the old runtime.&lt;/p&gt;

&lt;p&gt;That sounds obvious. In practice, it causes a lot of false debugging.&lt;/p&gt;

&lt;p&gt;APC and APX split responsibilities on purpose.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It keeps project truth in repository files such as &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/project.json&lt;/code&gt;, agent definitions, skills, and other committed context.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It is the daemon, CLI, web admin, channel handling, sessions, message logs, and other machine-local state under &lt;code&gt;~/.apx/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Because APX is a live runtime, code changes do not matter until the running daemon actually reloads them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;The APX project guide says it bluntly: skip restart and your test is a lie.&lt;/p&gt;

&lt;p&gt;That is not style advice. The daemon keeps the JavaScript it booted with. Adapters, routes, prompt builders, and tool handlers all stay in memory until the process restarts.&lt;/p&gt;

&lt;p&gt;So this sequence is broken:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;edit APX code&lt;/li&gt;
&lt;li&gt;run a manual check immediately&lt;/li&gt;
&lt;li&gt;conclude the fix did not work&lt;/li&gt;
&lt;li&gt;debug the wrong problem&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The problem is often not the code. The problem is that the daemon is still serving the previous version.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the docs and repo already say
&lt;/h2&gt;

&lt;p&gt;The APX README describes APX as a daemon plus CLI plus web admin. The daemon starts on first use, and the browser UI talks to that same local process.&lt;/p&gt;

&lt;p&gt;The APX repo guide goes further and turns that into a development rule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;know which checkout the daemon is running from&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;apx restart&lt;/code&gt; after every code change and before manual testing&lt;/li&gt;
&lt;li&gt;verify the restart actually happened&lt;/li&gt;
&lt;li&gt;only then exercise the path you changed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That same guide warns about another easy mistake: the daemon runs from the main checkout, not from a random worktree. A fix committed somewhere the daemon never reads is not live, even if your branch looks correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where APC fits
&lt;/h2&gt;

&lt;p&gt;This restart rule also shows the APC/APX boundary clearly.&lt;/p&gt;

&lt;p&gt;APC does not define a daemon. APC does not define process lifecycle. APC does not define how a local runtime reloads route handlers or tool wiring.&lt;/p&gt;

&lt;p&gt;APC only defines portable project context.&lt;/p&gt;

&lt;p&gt;APX owns the operational layer that makes that context usable today. The APC docs describe APX exactly that way: the reference runtime that keeps sessions, memory, and messages outside &lt;code&gt;.apc/&lt;/code&gt; under &lt;code&gt;~/.apx/&lt;/code&gt;, while the repository keeps the durable project contract.&lt;/p&gt;

&lt;p&gt;So if APC answers, "What does this project mean?" APX answers, "What code is this machine actually running right now?"&lt;/p&gt;

&lt;p&gt;Restart belongs on the APX side because live execution belongs on the APX side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical loop
&lt;/h2&gt;

&lt;p&gt;A safe APX edit loop is small:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx restart
curl &lt;span class="nt"&gt;-s&lt;/span&gt; 127.0.0.1:7430/api/health
apx daemon logs &lt;span class="nt"&gt;--tail&lt;/span&gt; 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then test the exact path you changed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;changed a route: hit the route&lt;/li&gt;
&lt;li&gt;changed agent or tool behavior: run &lt;code&gt;apx exec&lt;/code&gt; or &lt;code&gt;apx run&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;changed a web flow: restart first, then reload the browser and test end to end&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That loop is boring, but it removes a whole class of fake failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger lesson
&lt;/h2&gt;

&lt;p&gt;A lot of agent-tool confusion comes from mixing portable context with live runtime behavior.&lt;/p&gt;

&lt;p&gt;APC can be perfectly correct while APX is still running stale code.&lt;/p&gt;

&lt;p&gt;Your repo may already contain the right project contract, agent files, and rules. But until the APX daemon reloads, the local runtime still reflects yesterday's process image.&lt;/p&gt;

&lt;p&gt;That is why this rule matters so much.&lt;/p&gt;

&lt;p&gt;Portable context tells every compatible tool what the project is.&lt;/p&gt;

&lt;p&gt;APX restart makes sure the local runtime is actually using the code you just changed.&lt;/p&gt;

&lt;p&gt;If you want one sentence to keep:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;APC can stay stable in git, while APX must be restarted to make a code fix real.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Channel That Does Not Log Is Invisible to APX</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Fri, 14 Aug 2026 12:02:52 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/a-channel-that-does-not-log-is-invisible-to-apx-2ni4</link>
      <guid>https://dev.to/agentprojectcontext/a-channel-that-does-not-log-is-invisible-to-apx-2ni4</guid>
      <description>&lt;h1&gt;
  
  
  A Channel That Does Not Log Is Invisible to APX
&lt;/h1&gt;

&lt;p&gt;A runtime can claim it supports many surfaces, but that claim breaks fast if each surface keeps its own private history.&lt;/p&gt;

&lt;p&gt;APX takes a stricter approach.&lt;/p&gt;

&lt;p&gt;If a channel wants cross-channel continuity, it must log its turns into the shared runtime message store. If it does not log, APX cannot search it, retrieve it for memory, or hint that another thread is already active somewhere else.&lt;/p&gt;

&lt;p&gt;That sounds like an implementation detail. It is not. It is a design rule.&lt;/p&gt;

&lt;p&gt;APC and APX split responsibilities on purpose.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It keeps project truth in committed files like &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/project.json&lt;/code&gt;, agent files, and skills.&lt;/p&gt;

&lt;p&gt;APX is the runtime and tooling layer. It owns execution, sessions, channels, local memory, and message history under &lt;code&gt;~/.apx/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That is why channel logs belong in APX, not APC.&lt;/p&gt;

&lt;h2&gt;
  
  
  One global place for cross-channel turns
&lt;/h2&gt;

&lt;p&gt;The APX message store code documents two different lanes.&lt;/p&gt;

&lt;p&gt;Project-specific runtime channels such as &lt;code&gt;runtime&lt;/code&gt;, &lt;code&gt;a2a&lt;/code&gt;, and &lt;code&gt;exec&lt;/code&gt; live under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.apx/projects/&amp;lt;project-id&amp;gt;/messages/YYYY-MM-DD.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cross-project channels such as Telegram or other daemon-level surfaces live under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.apx/messages/&amp;lt;channel&amp;gt;/YYYY-MM-DD.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key function is &lt;code&gt;appendGlobalMessage()&lt;/code&gt;. It writes one JSONL line per turn into &lt;code&gt;~/.apx/messages/&amp;lt;channel&amp;gt;/YYYY-MM-DD.jsonl&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That shared store is not just for archival.&lt;/p&gt;

&lt;p&gt;In the APX project guide, the rule is explicit: the cross-channel message store is the spine. Every surface that wants to participate in shared awareness logs through that path. A channel that does not log is invisible cross-channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  What APX gets from that rule
&lt;/h2&gt;

&lt;p&gt;Three concrete features depend on this.&lt;/p&gt;

&lt;p&gt;First, active thread awareness.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;buildActiveThreadsBlock()&lt;/code&gt; reads recent turns from other channel folders under the global messages directory and injects a short block like “Recent chatter on other surfaces.” It skips the current channel, looks for recent meaningful turns, and tells the agent what may already be happening somewhere else.&lt;/p&gt;

&lt;p&gt;That means a web conversation can notice that Telegram recently asked for a deploy, or a desktop voice session can notice that another surface already started the same task.&lt;/p&gt;

&lt;p&gt;Second, retrieval.&lt;/p&gt;

&lt;p&gt;The memory indexer walks &lt;code&gt;~/.apx/messages/&amp;lt;channel&amp;gt;/YYYY-MM-DD.jsonl&lt;/code&gt; for every channel, turns relevant records into chunks, and embeds them into the vector store. User and agent turns become retrievable context. Tool output can also be indexed in capped form.&lt;/p&gt;

&lt;p&gt;No log, no chunk. No chunk, no recall.&lt;/p&gt;

&lt;p&gt;Third, explicit search.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;search_messages&lt;/code&gt; tool resolves a project and runs full-text search over project messages so an agent can answer questions like “what did we decide yesterday?” without pretending to remember. Cross-channel awareness stays lightweight, while exact recovery stays searchable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this should stay out of APC
&lt;/h2&gt;

&lt;p&gt;It would be tempting to put all of this into the repository and call it “shared context.” That would be a mistake.&lt;/p&gt;

&lt;p&gt;Raw channel traffic is runtime state. It can contain noise, private details, ephemeral commands, and local operational history. APC should stay portable, reviewable, and durable. It should not become a dumping ground for every chat surface.&lt;/p&gt;

&lt;p&gt;So the boundary stays clean.&lt;/p&gt;

&lt;p&gt;APC carries project contract.&lt;/p&gt;

&lt;p&gt;APX carries live traffic.&lt;/p&gt;

&lt;p&gt;Then APX can build useful runtime behavior on top: active thread hints, retrieval, search, compaction, and audit trails across surfaces.&lt;/p&gt;

&lt;p&gt;That is deeper reason this logging rule matters.&lt;/p&gt;

&lt;p&gt;Without one shared runtime log, “multi-channel” mostly means several disconnected inboxes.&lt;/p&gt;

&lt;p&gt;With it, APX can treat channels as different entry points into one working system, while APC remains the portable layer that any compatible tool can read.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>APX Web Features Should Reuse the Daemon, Not Fork the CLI</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Thu, 13 Aug 2026 12:04:44 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/apx-web-features-should-reuse-the-daemon-not-fork-the-cli-1ken</link>
      <guid>https://dev.to/agentprojectcontext/apx-web-features-should-reuse-the-daemon-not-fork-the-cli-1ken</guid>
      <description>&lt;h1&gt;
  
  
  APX Web Features Should Reuse the Daemon, Not Fork the CLI
&lt;/h1&gt;

&lt;p&gt;A local web admin looks tempting: once you have buttons, tabs, and forms, it becomes easy to slip extra behavior into the browser and call it a feature.&lt;/p&gt;

&lt;p&gt;APX explicitly rejects that path.&lt;/p&gt;

&lt;p&gt;The rule in the APX project guide is blunt: the web is a GUI over the system, not a second implementation of the system. If a feature already exists in APX core or the daemon, the browser should call that. If it does not exist there yet, the answer is not to invent a web-only shortcut. The answer is to add the capability to the shared runtime first.&lt;/p&gt;

&lt;p&gt;That design matters because APC and APX solve different problems.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It carries repository-owned truth such as &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/project.json&lt;/code&gt;, agent files, skills, and other committed project context.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It runs the daemon, exposes the CLI and web admin, manages sessions, messages, routes, and local machine state under &lt;code&gt;~/.apx/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Once you accept that split, the web admin has a clear job: present APX runtime capabilities in a browser without creating a parallel source of truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Same behavior, different surface
&lt;/h2&gt;

&lt;p&gt;The APX architecture decision for &lt;code&gt;core / host / interfaces&lt;/code&gt; makes this explicit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;core/&lt;/code&gt; owns reusable logic&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;host/daemon/&lt;/code&gt; exposes that logic over HTTP&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;interfaces/&lt;/code&gt; are just surfaces such as CLI, web, desktop, or ACP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why the project guide also says: one domain function, one home.&lt;/p&gt;

&lt;p&gt;If a behavior exists in both an API route and a CLI command, the logic belongs in &lt;code&gt;core/&lt;/code&gt;, while the route and the command stay thin adapters.&lt;/p&gt;

&lt;p&gt;The browser follows the same rule.&lt;/p&gt;

&lt;p&gt;For example, the web hook &lt;code&gt;useProjects()&lt;/code&gt; calls &lt;code&gt;Projects.list()&lt;/code&gt;, and that client calls &lt;code&gt;GET /projects&lt;/code&gt;. On the daemon side, &lt;code&gt;src/host/daemon/api/projects.js&lt;/code&gt; answers that route by returning &lt;code&gt;projects.list()&lt;/code&gt;. No browser-specific project registry exists. No duplicated model exists. The web surface asks the same runtime that the rest of APX uses.&lt;/p&gt;

&lt;p&gt;That sounds small, but it prevents a lot of drift.&lt;/p&gt;

&lt;p&gt;If the web panel kept its own project cache, project rules, or rebuild logic, it could slowly stop matching the CLI. Then users would have to ask a bad question: "which APX is correct, terminal or browser?"&lt;/p&gt;

&lt;p&gt;A runtime should never force that question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this protects APC too
&lt;/h2&gt;

&lt;p&gt;The benefit is not only architectural neatness. It also protects APC.&lt;/p&gt;

&lt;p&gt;APC works because the repository stays declarative and portable. Project context lives on disk in committed files that different tools can read.&lt;/p&gt;

&lt;p&gt;If the web admin started adding browser-only behavior, hidden state, or mutations that bypass shared runtime logic, the practical contract would move away from APC files and into one surface. That would make the browser quietly more authoritative than the repo.&lt;/p&gt;

&lt;p&gt;APX is supposed to do the opposite.&lt;/p&gt;

&lt;p&gt;It should read APC, apply runtime rules, and expose those results consistently across surfaces.&lt;/p&gt;

&lt;p&gt;So when the web panel fetches a bearer token and sends requests through &lt;code&gt;src/interfaces/web/src/lib/http.ts&lt;/code&gt;, it is not becoming its own system. It is authenticating into the same daemon. When &lt;code&gt;buildApi()&lt;/code&gt; mounts projects, agents, messages, routines, voice, desktop, and admin routes, the browser becomes one client among several, not a privileged fork.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical payoff
&lt;/h2&gt;

&lt;p&gt;This rule makes daily work better in ordinary ways.&lt;/p&gt;

&lt;p&gt;First, bugs get fixed once. If the daemon behavior changes, both CLI and web improve together.&lt;/p&gt;

&lt;p&gt;Second, tests stay meaningful. APX project rules require behavior tests around shared functionality, not separate logic branches that only the browser understands.&lt;/p&gt;

&lt;p&gt;Third, new surfaces stay easier to add. Desktop, ACP, CLI, and web can keep reusing the same APX runtime because the behavior lives underneath them.&lt;/p&gt;

&lt;p&gt;That is the deeper APC/APX lesson.&lt;/p&gt;

&lt;p&gt;APC should keep project truth portable.&lt;/p&gt;

&lt;p&gt;APX should keep execution centralized.&lt;/p&gt;

&lt;p&gt;And every surface, including the web admin, should stay honest about its role.&lt;/p&gt;

&lt;p&gt;Not a second brain.&lt;/p&gt;

&lt;p&gt;Not a forked implementation.&lt;/p&gt;

&lt;p&gt;Just another window into the same runtime.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Use `apx setup` for Machine State. Use `apx init` for Project State.</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Wed, 12 Aug 2026 12:04:24 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/use-apx-setup-for-machine-state-use-apx-init-for-project-state-403j</link>
      <guid>https://dev.to/agentprojectcontext/use-apx-setup-for-machine-state-use-apx-init-for-project-state-403j</guid>
      <description>&lt;h1&gt;
  
  
  Use &lt;code&gt;apx setup&lt;/code&gt; for Machine State. Use &lt;code&gt;apx init&lt;/code&gt; for Project State.
&lt;/h1&gt;

&lt;p&gt;A lot of confusion around APC and APX starts with two commands that look similar but do different jobs.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx setup&lt;/code&gt; configures your machine.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx init&lt;/code&gt; scaffolds your project.&lt;/p&gt;

&lt;p&gt;That split is not cosmetic. It is one of the cleanest examples of the APC/APX boundary.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It defines project truth that should travel with the repository: &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/project.json&lt;/code&gt;, agent files, skills, commands, and shared MCP hints.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It owns machine-local configuration, daemon behavior, runtime channels, engines, sessions, conversations, and message logs.&lt;/p&gt;

&lt;p&gt;If you keep those two jobs separate, the system stays understandable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;apx setup&lt;/code&gt; actually owns
&lt;/h2&gt;

&lt;p&gt;The APX quick start and CLI docs describe &lt;code&gt;apx setup&lt;/code&gt; as an interactive wizard for provider, model, channels, and daemon startup.&lt;/p&gt;

&lt;p&gt;The implementation in &lt;code&gt;src/interfaces/cli/commands/setup.js&lt;/code&gt; makes that concrete. The wizard asks for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI provider and model&lt;/li&gt;
&lt;li&gt;optional API keys or Ollama base URL&lt;/li&gt;
&lt;li&gt;Telegram bot settings&lt;/li&gt;
&lt;li&gt;language&lt;/li&gt;
&lt;li&gt;optional voice settings&lt;/li&gt;
&lt;li&gt;optional Claude Code permission tweaks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then it writes config to &lt;code&gt;~/.apx/config.json&lt;/code&gt; and starts the daemon.&lt;/p&gt;

&lt;p&gt;That is machine state.&lt;/p&gt;

&lt;p&gt;None of those choices belong in committed APC files by default. Your laptop may use Ollama. Another teammate may use OpenAI. One operator may wire Telegram. Another may not. Those differences are operational, not project truth.&lt;/p&gt;

&lt;p&gt;So &lt;code&gt;apx setup&lt;/code&gt; lives on the APX side because APX is supposed to own local runtime reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;apx init&lt;/code&gt; actually owns
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;apx init&lt;/code&gt; does almost the opposite job.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;src/interfaces/cli/commands/init.js&lt;/code&gt;, the command calls &lt;code&gt;initApf()&lt;/code&gt; and reports the files it created. The scaffolding code in &lt;code&gt;src/core/apc/scaffold.js&lt;/code&gt; creates &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/&lt;/code&gt;, &lt;code&gt;.apc/project.json&lt;/code&gt;, and the APC gitignore guard. It also generates the stable &lt;code&gt;apx_id&lt;/code&gt; that links the committed project definition to runtime storage under &lt;code&gt;~/.apx/projects/&amp;lt;id&amp;gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That is project state.&lt;/p&gt;

&lt;p&gt;It belongs in the repository because it describes the project, not one machine.&lt;/p&gt;

&lt;p&gt;The APX docs say the same thing in plain language: the &lt;code&gt;.apc/&lt;/code&gt; tree holds committed project context, while &lt;code&gt;~/.apx/projects/&amp;lt;id&amp;gt;/&lt;/code&gt; holds sessions, conversations, messages, caches, and other local runtime state.&lt;/p&gt;

&lt;p&gt;That is the APC/APX contract in one sentence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the distinction matters in practice
&lt;/h2&gt;

&lt;p&gt;Imagine a fresh clone.&lt;/p&gt;

&lt;p&gt;If a teammate gets the repo, they should inherit the project definition after checkout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx init &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"My Project"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That leaves durable context on disk in a form other tools can read too.&lt;/p&gt;

&lt;p&gt;But the same teammate should not inherit your personal runtime choices just because they cloned your repo. They should choose those locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is why &lt;code&gt;setup&lt;/code&gt; and &lt;code&gt;init&lt;/code&gt; should not collapse into one command or one storage location.&lt;/p&gt;

&lt;p&gt;If setup data leaks into APC, the repo starts carrying machine assumptions: provider keys, Telegram choices, localhost URLs, voice settings, or editor-specific permission tweaks.&lt;/p&gt;

&lt;p&gt;If project scaffolding stays only in APX runtime state, the opposite problem appears: the repo stops being self-describing.&lt;/p&gt;

&lt;p&gt;Both failures make APC less portable and APX harder to trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful mental model
&lt;/h2&gt;

&lt;p&gt;Use this rule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if the file should survive clone, review, and multi-tool use, it belongs in APC&lt;/li&gt;
&lt;li&gt;if the setting depends on one machine, one operator, or one local runtime, it belongs in APX&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That rule explains these two commands perfectly.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx init&lt;/code&gt; creates the portable contract.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx setup&lt;/code&gt; prepares the local executor.&lt;/p&gt;

&lt;p&gt;One tells any compatible agent system what this project is.&lt;/p&gt;

&lt;p&gt;The other tells APX how this machine should run it today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Small detail that proves the design
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;apx init&lt;/code&gt; also detects scattered existing context and can write &lt;code&gt;.apc/migrate.md&lt;/code&gt; when migration work is needed.&lt;/p&gt;

&lt;p&gt;That only makes sense on the project side, because migration is about curating durable context into APC.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apx setup&lt;/code&gt;, by contrast, ends by saving local config and starting a local daemon.&lt;/p&gt;

&lt;p&gt;That only makes sense on the runtime side.&lt;/p&gt;

&lt;p&gt;The commands are different because the ownership is different.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger lesson
&lt;/h2&gt;

&lt;p&gt;APC and APX work well together when the repository stays declarative and the runtime stays operational.&lt;/p&gt;

&lt;p&gt;APC should answer: what is this project, which agents exist here, and which committed rules travel with it?&lt;/p&gt;

&lt;p&gt;APX should answer: how does this machine run those agents right now?&lt;/p&gt;

&lt;p&gt;So if you are explaining the system to a new team member, keep it simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run &lt;code&gt;apx init&lt;/code&gt; when you need project structure&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;apx setup&lt;/code&gt; when you need local runtime configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Portable context first.&lt;/p&gt;

&lt;p&gt;Machine-local execution second.&lt;/p&gt;

&lt;p&gt;That is not just good CLI naming. It is the boundary that keeps APC portable and APX useful.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Auto-Registered MCP Servers Should Stay in APX Runtime, Not APC</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Tue, 11 Aug 2026 12:03:28 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/auto-registered-mcp-servers-should-stay-in-apx-runtime-not-apc-496d</link>
      <guid>https://dev.to/agentprojectcontext/auto-registered-mcp-servers-should-stay-in-apx-runtime-not-apc-496d</guid>
      <description>&lt;h1&gt;
  
  
  Auto-Registered MCP Servers Should Stay in APX Runtime, Not APC
&lt;/h1&gt;

&lt;p&gt;An integration can expose an MCP server without meaning that server belongs in the repository.&lt;/p&gt;

&lt;p&gt;That boundary matters more than it looks.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It keeps durable project meaning in committed files such as &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/agents/&lt;/code&gt;, skills, and &lt;code&gt;.apc/mcps.json&lt;/code&gt;. APX is the daily-use runtime and tooling layer. It owns machine-local state, plugin lifecycle, daemon behavior, and the MCP merge order that turns those files into something runnable.&lt;/p&gt;

&lt;p&gt;Auto-registered MCP servers belong on the APX side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is the right boundary
&lt;/h2&gt;

&lt;p&gt;A plugin-generated MCP definition often points at local facts: a vault path, a localhost endpoint, or a token-bearing environment variable. Those are operational details. They help one machine run a tool today, but they are not safe portable project truth.&lt;/p&gt;

&lt;p&gt;APX's MCP source model makes that explicit.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;src/core/mcp/sources.js&lt;/code&gt;, APX defines three writable scopes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;shared&lt;/code&gt; in &lt;code&gt;.apc/mcps.json&lt;/code&gt; for project-wide, committable MCP definitions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;runtime&lt;/code&gt; in &lt;code&gt;~/.apx/projects/&amp;lt;apxId&amp;gt;/mcps.json&lt;/code&gt; for per-project local definitions, protected with &lt;code&gt;chmod 0600&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;global&lt;/code&gt; in &lt;code&gt;~/.apx/mcps.json&lt;/code&gt; for machine-wide fallbacks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same file also documents the merge order: &lt;code&gt;runtime&lt;/code&gt; wins first, then project-shared APC entries, then foreign IDE configs, then &lt;code&gt;global&lt;/code&gt; last.&lt;/p&gt;

&lt;p&gt;That tells you what APC and APX each own.&lt;/p&gt;

&lt;p&gt;APC can carry stable, reviewable MCP hints. APX decides which local definition actually runs on this machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What APX does with auto-MCP integrations
&lt;/h2&gt;

&lt;p&gt;The clearest example is plugin sync.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;src/core/integrations/mcp-sync.js&lt;/code&gt;, APX maps integration scope to MCP scope with one deliberate rule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;integration &lt;code&gt;global&lt;/code&gt; maps to MCP &lt;code&gt;global&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;everything else maps to MCP &lt;code&gt;runtime&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The comment above that function explains why: auto-registered servers point at machine-local paths, so project integrations should become per-project runtime MCPs, not committed APC MCPs.&lt;/p&gt;

&lt;p&gt;That same file says it directly: APX deliberately avoids the committed &lt;code&gt;.apc/mcps.json&lt;/code&gt; scope for those generated servers.&lt;/p&gt;

&lt;p&gt;That is a good design.&lt;/p&gt;

&lt;p&gt;If APX wrote plugin-generated MCPs into &lt;code&gt;.apc/mcps.json&lt;/code&gt;, one developer could accidentally commit a local vault path, a machine-only endpoint, or a secret-shaped environment contract into the repo. Another clone on another laptop would inherit a definition that looked official but was only true on the first machine.&lt;/p&gt;

&lt;p&gt;That would weaken APC.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical example: Obsidian
&lt;/h2&gt;

&lt;p&gt;Today the Obsidian integration is the concrete case.&lt;/p&gt;

&lt;p&gt;APX documents an optional &lt;code&gt;auto_mcp&lt;/code&gt; flow, and &lt;code&gt;reconcilePluginMcp()&lt;/code&gt; keeps the MCP server in sync with the plugin lifecycle. When the integration becomes active, APX writes or updates the MCP definition in the runtime or global store, depending on the integration scope. When the integration is removed or disabled, APX removes the generated MCP there too.&lt;/p&gt;

&lt;p&gt;That gives you the convenience people want from integrations without moving ownership into the wrong layer.&lt;/p&gt;

&lt;p&gt;The repo can still keep a clean shared MCP file for team-safe tools. But a plugin that depends on one operator's local setup does not silently rewrite project truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  This matches the CLI too
&lt;/h2&gt;

&lt;p&gt;The CLI keeps the same idea.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;src/interfaces/cli/commands/mcp.js&lt;/code&gt;, write operations default to &lt;code&gt;shared&lt;/code&gt; when you are inside an APC project and &lt;code&gt;global&lt;/code&gt; outside one. But &lt;code&gt;runtime&lt;/code&gt; is still a first-class explicit scope, and APX's own MCP skill docs say to use it for tokens and machine-specific endpoints.&lt;/p&gt;

&lt;p&gt;That is the important nuance.&lt;/p&gt;

&lt;p&gt;Human-authored MCPs can be shared when they are genuinely repo-safe. Auto-generated MCPs should be more conservative because they are derived from live runtime state.&lt;/p&gt;

&lt;p&gt;So APX uses two different defaults for two different jobs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;manual project intent can go to APC shared scope&lt;/li&gt;
&lt;li&gt;generated integration state stays runtime-local unless it is truly machine-wide&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That split keeps convenience from turning into accidental portability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger lesson
&lt;/h2&gt;

&lt;p&gt;Agent systems get messy when they commit outputs that were only valid as runtime side effects.&lt;/p&gt;

&lt;p&gt;APC works best when committed files stay small, reviewable, and broadly true for everyone who clones the repo. APX works best when it handles the messy local part: plugin activation, machine-local files, tokens, and effective MCP resolution.&lt;/p&gt;

&lt;p&gt;Auto-registered MCPs sit exactly on that seam.&lt;/p&gt;

&lt;p&gt;So the rule should stay simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep team-safe MCP definitions in &lt;code&gt;.apc/mcps.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;keep token-bearing or local-path MCPs in APX runtime scope&lt;/li&gt;
&lt;li&gt;let plugin lifecycle update runtime MCP state automatically&lt;/li&gt;
&lt;li&gt;do not let generated local integrations rewrite committed project context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is how APC stays portable and APX stays practical.&lt;/p&gt;

&lt;p&gt;Portable context should describe the project.&lt;/p&gt;

&lt;p&gt;Runtime-generated MCP servers should describe the machine currently running it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Tool Catalogs Belong in APX Runtime, Not APC</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Mon, 10 Aug 2026 12:04:18 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/tool-catalogs-belong-in-apx-runtime-not-apc-30gl</link>
      <guid>https://dev.to/agentprojectcontext/tool-catalogs-belong-in-apx-runtime-not-apc-30gl</guid>
      <description>&lt;h1&gt;
  
  
  Tool Catalogs Belong in APX Runtime, Not APC
&lt;/h1&gt;

&lt;p&gt;One easy way to bloat an agent system is to treat the tool catalog like portable project context.&lt;/p&gt;

&lt;p&gt;That is the wrong boundary.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It carries durable project meaning through &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/&lt;/code&gt;, skills, MCP hints, and other repo-owned artifacts. APX is the runtime and tooling layer. It decides what to execute, where to store local state, and which tools to expose on each surface.&lt;/p&gt;

&lt;p&gt;The tool catalog belongs on the APX side.&lt;/p&gt;

&lt;p&gt;That sounds small, but it matters a lot in daily use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this boundary matters
&lt;/h2&gt;

&lt;p&gt;A project contract should travel well. A runtime capability list should adapt to the moment.&lt;/p&gt;

&lt;p&gt;Those are different jobs.&lt;/p&gt;

&lt;p&gt;If you push a giant tool catalog into APC, every compatible runtime inherits a lot of operational detail that may be local, temporary, or channel-specific. That makes the portable layer noisier than it should be.&lt;/p&gt;

&lt;p&gt;APX takes a better approach. In &lt;code&gt;src/core/agent/tools/registry.js&lt;/code&gt;, the full tool schema set is commented as roughly &lt;code&gt;25 KB / ~6.3 K tokens&lt;/code&gt;. That is already large enough to dominate a lightweight turn. So APX does not send the whole catalog everywhere.&lt;/p&gt;

&lt;p&gt;Instead, it keeps APC stable and lets runtime exposure stay dynamic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What APX actually does
&lt;/h2&gt;

&lt;p&gt;On lightweight channels, APX starts with a small base set of tools and reveals the rest on demand.&lt;/p&gt;

&lt;p&gt;The code calls this &lt;code&gt;BASE_TOOL_NAMES&lt;/code&gt;. It includes common things an agent often needs immediately: project and agent inventory, memory reads, session and message search, file reads and writes, basic shell access, tasks, skills, and &lt;code&gt;discover_tools&lt;/code&gt; itself.&lt;/p&gt;

&lt;p&gt;Everything else stays out of the first prompt.&lt;/p&gt;

&lt;p&gt;That matters most on chat-like surfaces such as Telegram, desktop, and other lightweight channels where prompt budget is tighter and the user usually wants one small action, not a full coding cockpit.&lt;/p&gt;

&lt;p&gt;Then APX adds a narrow expansion path: &lt;code&gt;discover_tools()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That handler does two useful things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;with no arguments, it returns a grouped catalog of tools that exist but are not loaded yet&lt;/li&gt;
&lt;li&gt;with &lt;code&gt;category&lt;/code&gt; or exact &lt;code&gt;names&lt;/code&gt;, it activates those tools for the next model step&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So a lightweight agent does not need browser automation, fetch tools, runtime delegation, or voice tools on every turn. It can ask for them only when the task actually requires them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is better than a giant always-on list
&lt;/h2&gt;

&lt;p&gt;The benefit is not only token savings.&lt;/p&gt;

&lt;p&gt;It also improves separation of concerns.&lt;/p&gt;

&lt;p&gt;APC says what the project is.&lt;br&gt;
APX says what the runtime can do right now.&lt;/p&gt;

&lt;p&gt;Those should not collapse into one file or one prompt blob.&lt;/p&gt;

&lt;p&gt;A project may define agents, memory, commands, and MCP hints in a portable way. But whether a Telegram session should receive browser schemas up front is not a repository truth. It is a runtime decision.&lt;/p&gt;

&lt;p&gt;APX makes that decision per channel.&lt;/p&gt;

&lt;p&gt;In the same registry file, some channels deliberately get the full catalog up front: &lt;code&gt;routine&lt;/code&gt;, &lt;code&gt;api&lt;/code&gt;, &lt;code&gt;web&lt;/code&gt;, &lt;code&gt;code&lt;/code&gt;, and &lt;code&gt;web_code&lt;/code&gt;. That also makes sense. If the user already chose a richer surface, APX can spend the budget there.&lt;/p&gt;

&lt;p&gt;So the system stays practical in both directions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;portable context stays small and durable in APC&lt;/li&gt;
&lt;li&gt;runtime capability exposure stays adaptive in APX&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical example
&lt;/h2&gt;

&lt;p&gt;Imagine a Telegram conversation with a project agent.&lt;/p&gt;

&lt;p&gt;The user asks for a quick answer about current tasks. The base tool set is enough: list projects, inspect tasks, read memory, maybe search messages.&lt;/p&gt;

&lt;p&gt;Later, the user asks the same agent to inspect a live website.&lt;/p&gt;

&lt;p&gt;That is when &lt;code&gt;discover_tools({ category: "browser" })&lt;/code&gt; becomes useful. APX activates the browser tool group, merges those schemas into the next model step, and the agent continues with the richer capability set.&lt;/p&gt;

&lt;p&gt;The repository did not change. APC did not get polluted. Only the runtime surface changed, which is exactly what should happen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger lesson
&lt;/h2&gt;

&lt;p&gt;A lot of agent architectures become messy because they confuse durable context with executable capability.&lt;/p&gt;

&lt;p&gt;APC and APX work better when those stay separate.&lt;/p&gt;

&lt;p&gt;APC should carry the portable contract: agents, rules, memory worth committing, and machine-safe project facts.&lt;/p&gt;

&lt;p&gt;APX should handle runtime mechanics: sessions, channels, prompt budget, local state, tool exposure, and dynamic activation.&lt;/p&gt;

&lt;p&gt;Tool catalogs are runtime mechanics.&lt;/p&gt;

&lt;p&gt;So the clean rule is simple:&lt;/p&gt;

&lt;p&gt;Keep project meaning in APC.&lt;/p&gt;

&lt;p&gt;Keep channel-specific tool exposure in APX.&lt;/p&gt;

&lt;p&gt;When a surface needs more power, load more tools there. Do not turn the portable context layer into a giant runtime manifest.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Append-Only Project Notes Beat Copying Raw Sessions Into APC</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sun, 09 Aug 2026 12:03:14 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/append-only-project-notes-beat-copying-raw-sessions-into-apc-4dpi</link>
      <guid>https://dev.to/agentprojectcontext/append-only-project-notes-beat-copying-raw-sessions-into-apc-4dpi</guid>
      <description>&lt;h1&gt;
  
  
  Append-Only Project Notes Beat Copying Raw Sessions Into APC
&lt;/h1&gt;

&lt;p&gt;A project often needs one small thing after an agent session ends: a durable note. Not the whole transcript. Not private runtime memory. Just the part worth keeping.&lt;/p&gt;

&lt;p&gt;That is why append-only project notes are a useful boundary between APC and APX.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It keeps durable project meaning in the repository through &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/&lt;/code&gt;, agent files, skills, and other committed artifacts. APX is the daily-use runtime and tooling layer. It owns sessions, messages, conversations, caches, and machine-local state under &lt;code&gt;~/.apx/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That split already appears clearly in the APC docs. Project context should survive changing editors, machines, or providers. Runtime state should not live in &lt;code&gt;.apc/&lt;/code&gt;. Raw sessions, tool transcripts, and temporary notes stay local unless a human exports something useful back into the repo.&lt;/p&gt;

&lt;p&gt;The missing question is: what should that exported thing look like?&lt;/p&gt;

&lt;p&gt;A good answer is a small append-only note.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why append-only helps
&lt;/h2&gt;

&lt;p&gt;In APX, &lt;code&gt;src/core/apc/notes.js&lt;/code&gt; writes project notes under &lt;code&gt;.apc/notes/YYYY-MM-DD.md&lt;/code&gt;. It creates a timestamped markdown block and appends it to that day's file. No session dump. No database row. No generated identifier maze.&lt;/p&gt;

&lt;p&gt;That shape is healthier than copying whole runtime history into APC.&lt;/p&gt;

&lt;p&gt;If you push full transcripts into &lt;code&gt;.apc/&lt;/code&gt;, three problems show up fast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;portable project context gets polluted with runtime noise&lt;/li&gt;
&lt;li&gt;private or machine-local details become easier to commit by mistake&lt;/li&gt;
&lt;li&gt;other tools inherit far more context than the project actually meant to share&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An append-only note avoids that.&lt;/p&gt;

&lt;p&gt;It is small enough to review, durable enough to keep, and simple enough that another APC-aware tool can ignore it safely if it does not support the extension.&lt;/p&gt;

&lt;p&gt;That last point matters. APC portable core documents the canonical structure and explicitly says unknown paths under &lt;code&gt;.apc/&lt;/code&gt; should be ignored unless a formal extension defines them. So APX can add &lt;code&gt;.apc/notes/&lt;/code&gt; as a practical repo-owned lane without pretending raw runtime state now belongs in APC.&lt;/p&gt;

&lt;h2&gt;
  
  
  What APX actually stores
&lt;/h2&gt;

&lt;p&gt;The implementation is intentionally boring, which is a good sign.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;appendProjectNote(projectPath, { title, body })&lt;/code&gt; creates &lt;code&gt;.apc/notes/&lt;/code&gt; if needed, chooses today's file, formats a markdown block with an ISO timestamp, and appends it. When a title exists, the block uses &lt;code&gt;## Title&lt;/code&gt;; otherwise it falls back to a timestamp heading.&lt;/p&gt;

&lt;p&gt;On the daemon side, &lt;code&gt;src/host/daemon/api/deck.js&lt;/code&gt; exposes &lt;code&gt;POST /projects/:pid/notes&lt;/code&gt;. The route accepts &lt;code&gt;body&lt;/code&gt; and optional &lt;code&gt;title&lt;/code&gt;, trims them, rejects an empty body, and then writes through &lt;code&gt;appendProjectNote&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That is a narrow bridge back into the repository:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APX runtime decides when a durable note is worth saving&lt;/li&gt;
&lt;li&gt;APC project tree receives only the curated markdown artifact&lt;/li&gt;
&lt;li&gt;raw session history remains in APX local storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is exactly the kind of boundary APC and APX need more often.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is better than "memory everything"
&lt;/h2&gt;

&lt;p&gt;Teams sometimes reach for one of two bad extremes.&lt;/p&gt;

&lt;p&gt;The first is saving nothing, which forces every runtime to rediscover the same decisions. The second is saving everything, which turns portable context into a landfill.&lt;/p&gt;

&lt;p&gt;Append-only project notes offer a middle path.&lt;/p&gt;

&lt;p&gt;Use them for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a decision the team wants visible in the repo&lt;/li&gt;
&lt;li&gt;a short migration finding worth keeping&lt;/li&gt;
&lt;li&gt;a constraint discovered during debugging&lt;/li&gt;
&lt;li&gt;a follow-up instruction another runtime should see later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not use them for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;full chat transcripts&lt;/li&gt;
&lt;li&gt;secret-bearing command output&lt;/li&gt;
&lt;li&gt;temporary scratch reasoning&lt;/li&gt;
&lt;li&gt;private operator notes that do not belong in version control&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That distinction matches the APC docs closely: move back only useful, safe, durable project knowledge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical takeaway
&lt;/h2&gt;

&lt;p&gt;If APC is the portable context layer, it needs artifacts shaped for portability.&lt;/p&gt;

&lt;p&gt;Raw sessions are not shaped for portability. Append-only project notes are much closer.&lt;/p&gt;

&lt;p&gt;APX gets this right by keeping runtime state local while still providing a very small write-back path into the repo. That path is markdown, dated, reviewable, and easy to understand later.&lt;/p&gt;

&lt;p&gt;So the rule is simple:&lt;/p&gt;

&lt;p&gt;Keep sessions in APX.&lt;/p&gt;

&lt;p&gt;Keep durable project notes in APC.&lt;/p&gt;

&lt;p&gt;When something is worth preserving, append one small note instead of copying one giant conversation.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>APX Agent Vault Should Reuse Agents Without Replacing APC</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sat, 08 Aug 2026 12:03:39 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/apx-agent-vault-should-reuse-agents-without-replacing-apc-2n90</link>
      <guid>https://dev.to/agentprojectcontext/apx-agent-vault-should-reuse-agents-without-replacing-apc-2n90</guid>
      <description>&lt;h1&gt;
  
  
  APX Agent Vault Should Reuse Agents Without Replacing APC
&lt;/h1&gt;

&lt;p&gt;Reusable agent templates are useful. A second source of truth for project agents is not.&lt;/p&gt;

&lt;p&gt;That is why APX's Agent Vault is a good idea only if it stays in the right layer.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. It keeps the repo-owned contract in &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/&lt;/code&gt;, agent files, skills, and other durable artifacts. APX is the daily-use runtime and tooling layer on top of that contract. It gives you the CLI, daemon, web admin, runtimes, and machine-local state that make APC practical every day.&lt;/p&gt;

&lt;p&gt;The Agent Vault belongs on the APX side.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the vault actually is
&lt;/h2&gt;

&lt;p&gt;APX documents the vault as a machine-wide library of reusable agent templates. Bundled templates live inside the APX package, while user templates and overrides live in &lt;code&gt;~/.apx/agents/&amp;lt;slug&amp;gt;.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That split matters.&lt;/p&gt;

&lt;p&gt;The vault is not part of the repository. It is a local convenience layer for reuse across projects on one machine. You can list it with &lt;code&gt;apx agent vault list&lt;/code&gt;, add a new reusable template with &lt;code&gt;apx agent vault add reviewer ...&lt;/code&gt;, and hide bundled defaults with tombstones that APX stores in &lt;code&gt;~/.apx/agents/.removed.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In other words, the vault is runtime furniture. Useful, local, and intentionally not portable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should stay in APC
&lt;/h2&gt;

&lt;p&gt;Project agents are different.&lt;/p&gt;

&lt;p&gt;APX's own docs say the canonical project definition is &lt;code&gt;.apc/agents/&amp;lt;slug&amp;gt;.md&lt;/code&gt;. That is the file that belongs to the repo, can be reviewed in git, and can travel to Codex, Claude Code, Cursor, or any other APC-aware runtime.&lt;/p&gt;

&lt;p&gt;That is the boundary worth protecting.&lt;/p&gt;

&lt;p&gt;If a team starts treating &lt;code&gt;~/.apx/agents/&lt;/code&gt; as the real home of project agents, APC loses authority. The same repository can behave differently on two laptops, and the portable layer becomes only a partial hint instead of the contract.&lt;/p&gt;

&lt;p&gt;That would be a regression.&lt;/p&gt;

&lt;p&gt;APC should own what the project means. APX should help you work faster with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The practical workflow that keeps both layers clean
&lt;/h2&gt;

&lt;p&gt;The vault model works well because APX gives you two import paths.&lt;/p&gt;

&lt;p&gt;If a shared template is already good enough, &lt;code&gt;apx agent import cody-developer&lt;/code&gt; lets the project use it without pretending that every reusable default belongs in the repo.&lt;/p&gt;

&lt;p&gt;If the project needs its own variation, &lt;code&gt;apx agent import tessa-qa --copy&lt;/code&gt; copies the template into &lt;code&gt;.apc/agents/&lt;/code&gt; so the project can change it locally.&lt;/p&gt;

&lt;p&gt;That second path is the important one.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--copy&lt;/code&gt; turns reuse into a starting point, not a hidden dependency. Once the file lives in &lt;code&gt;.apc/agents/&lt;/code&gt;, the project owns it. Reviewers can see the diff. Another machine can clone the repo and get the same agent definition. Another APC-compatible runtime can read the same contract.&lt;/p&gt;

&lt;p&gt;That is exactly the APC/APX split working as intended:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APC stores the durable project-owned agent definition.&lt;/li&gt;
&lt;li&gt;APX stores the reusable machine-local template catalog.&lt;/li&gt;
&lt;li&gt;Import bridges them without collapsing them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why copy-on-write and tombstones are good signs
&lt;/h2&gt;

&lt;p&gt;Two design details in APX reinforce this boundary.&lt;/p&gt;

&lt;p&gt;First, editing a bundled vault template is copy-on-write. APX materializes a user-layer file in &lt;code&gt;~/.apx/agents/&lt;/code&gt; instead of mutating the bundled default inside the package. That keeps the reusable layer explicit.&lt;/p&gt;

&lt;p&gt;Second, removing a bundled template does not delete package files. APX tombstones the slug and lets you restore it later. That shows the vault is a managed local catalog, not project state.&lt;/p&gt;

&lt;p&gt;Both decisions push in the same direction: reuse should be flexible, but the location and ownership of state should stay clear.&lt;/p&gt;

&lt;h2&gt;
  
  
  The deeper lesson
&lt;/h2&gt;

&lt;p&gt;Agent systems get messy when convenience starts owning identity.&lt;/p&gt;

&lt;p&gt;A global vault is convenient. A repo contract is portable. APX works because it does not confuse those jobs.&lt;/p&gt;

&lt;p&gt;Use the vault to bootstrap work faster across projects. Use &lt;code&gt;.apc/agents/&lt;/code&gt; when the project itself needs to define, review, or preserve an agent. That keeps APC clean as the portable context layer and lets APX stay what it should be: the runtime and tooling layer that makes daily agent work usable without quietly taking ownership away from the repo.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
