Skip to content

[FEATURE] Support Local Directory Deployment via local-dir / runtime Target for Agent-to-Agent Dependency Management #1703

@tansm

Description

@tansm

Problem Statement / Background

Currently, APM (Agent Package Manager) is primarily designed with a "Developer Tooling" mindset. The manifest (apm.yml) defines dependencies (prompts, skills, MCP servers), and adapters (like claude.py, cursor.py) distribute these assets into the user's global configuration directories or local IDE hidden folders (e.g., .claude/). In this paradigm, the consumer of the APM package is always an AI developer tool or IDE extension.

However, when developers are building an Enterprise AI Agent System or Agent Harness (e.g., server-side workflows), they often face a "Shared Library" problem. They want to decouple and reuse standard corporate skills or third-party tools maintained by other teams.

Currently, to bundle these shared skills into the runtime package of the Agent itself, developers have to manually copy files or clone git submodules into their project's skills/ or tools/ directory, which breaks the very dependency management value that APM provides.

Proposed Solution

We propose introducing a runtime (or local-path) deployment target in apm.yml.

This switches the consumer of the APM package from Dev Tooling to Application Runtime Assets. When running apm install, APM should be able to resolve these shared skills and copy/symlink them directly into a specified directory inside the current active project codebase, so they can be bundled and distributed together with the custom Agent application.

Detailed Design / Usage Example

1. Manifest Specification (apm.yml)

We can extend the targets schema to accept a local directory mapping, or introduce a dedicated runtime block:

name: core-enterprise-agent
version: 1.0.0
description: "An enterprise ERP agent harness"

# Define dependencies managed by separate teams or external repos
dependencies:
  apm:
    - [github.com/my-org/shared-erp-skills@v1.4.2](https://github.com/my-org/shared-erp-skills@v1.4.2)
    - [github.com/my-org/privacy-masking-tool@v0.9.0](https://github.com/my-org/privacy-masking-tool@v0.9.0)

# Proposed Enhancement: Target the codebase itself as the consumer
targets:
  - type: runtime
    output_dir: "./src/app/runtime_skills"
    clean: true # Optional: clean the target directory before copying

2. Adapter Layer Evolution

Similar to how src/apm_cli/adapters/client/claude.py maps files to .claude/tasks/, a new runtime or local adapter can be introduced.

  • Behavior: Instead of searching for globally installed desktop apps or IDE states, this adapter reads the output_dir (resolved relative to the apm.yml root) and unpacks the target .json / .py / .ts skill definitions directly into that folder.
  • Benefit: The codebase treats these files as read-only managed assets, making it fully compatible with local debugging, docker bundling, and CI/CD pipelines.

Alternative Approaches Considered

  • Git Submodules: Hard to manage version constraints at scale and doesn't leverage APM’s capability to lock and validate policies (apm-policy.yml).
  • Custom Build Scripts: Developers could write apm pack + custom bash scripts to move files, but standardizing this inside APM prevents everyone from reinventing the wheel for agent-to-agent dependency resolution.

Additional Context

This feature would bridge the gap between "AI-assisted coding" and "AI Agent Application Development", positioning APM as the definitive package manager not just for developers' local machines, but for autonomous production agent systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.priority/lowAccepted but not time-sensitivestatus/needs-designDirection approved, design discussion required before code.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions