Skip to content

Add spec.api section to init template #34

@skokaina

Description

@skokaina

Problem

agentspec init --yes generates a manifest without a spec.api section. The LangGraph skill only generates server.py when spec.api is set. Without it, agentspec generate --framework langgraph produces no HTTP server — so the GIF 2 flow can't end with curl localhost:8000/v1/chat.

Blocks Hook 2 — the "YAML to running agent" demo requires a working HTTP endpoint.

Proposed fix

File: packages/cli/src/commands/init.ts (~line 196)

Add after the prompts section, always included (not gated by a flag):

  # ── API ───────────────────────────────────────────────────────────────────
  api:
    port: 8000
    pathPrefix: /v1
    corsOrigins: ["*"]

Acceptance criteria

  • agentspec init --yes && grep 'api:' agent.yaml → api section present
  • agentspec init --yes && agentspec validate agent.yaml → passes
  • Generated LangGraph code includes server.py with the chat endpoint
  • Init tests updated to expect the new section

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0-launch-blockerMust fix before public launchenhancementNew feature or requesthook-2-yaml-to-agentGIF 2: YAML to running agent (init → generate → run)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions