init#

Scaffold a new AgentPM project by generating a starter agent.json manifest for either a tool or an agent.

Overview#

agentpm init creates the minimal manifest you’ll complete later. Choose a kind (tool or agent), set a name/description, and (optionally) an output directory.

Command synopsis#

agentpm init [--kind <tool|agent>] [--name <string>] [--description <string>] [--out-dir <path>]

Arguments#

  • --kind (default: tool). What to scaffold: a single tool or a composed agent.
  • --name (default: my-tool). Name for the tool/agent (used in the manifest).
  • --description (default: Starter AgentPM project). Short human-readable description.
  • --out-dir. Directory to write files to (defaults to current working directory).
Tip

Use --out-dir ./my-project to keep each tool/agent in its own folder.

Examples#

Create an agent#

agentpm init --kind agent --name research-assistant --description "Assistant composed of multiple tools"

Generates agent.json:

{
  "kind": "agent",
  "name": "research-assistant",
  "version": "0.1.0",
  "description": "Assistant composed of multiple tools",
  "tools": []
}

Create a tool#

agentpm init --kind tool --name summarize --description "Summarize input text"

Generates agent.json:

{
  "kind": "tool",
  "name": "summarize",
  "version": "0.1.0",
  "description": "Summarize input text",
  "files": [],
  "entrypoint": {
    "command": "",
    "args": []
  },
  "inputs": {},
  "outputs": {}
}

What's next?#

The generated manifests are intentional skeletons—you’ll need to finish them before you can install or publish.

  • For agents:
    • Add tools to the tools[] array (via agentpm install <tool> or by editing then running agentpm install).
  • For tools:
    • Fill in entrypoint.command (and args if needed).
    • Define inputs and outputs schemas.
    • List any packaged artifacts in files[] (scripts, models, prompts, etc.).

Run a quick check:

agentpm lint
Tip

Lint helps you catch missing fields, schema issues, and versioning problems early.

After linting and completing the manifest:

  • Use agentpm install to fetch declared tools (for agents).
  • When ready to share, head to agentpm publish.

Notes & gotchas#

  • Naming: Choose a unique name—it’s surfaced in the registry and in your namespaces.
  • Versioning: init seeds 0.1.0. Bump versions semantically as your tool/agent evolves.
  • Subprocess runtime: Tools execute in a managed subprocess; define any required environment variables in the manifest so hosts know what to set.