Skip to content

feat: add placeholder main.py for BYO agent on project create #629

@notgitika

Description

@notgitika

Description

When a user creates a project with "Bring your own agent" (--type byo), the agent code directory (app/<AgentName>/) is left completely empty. The CLI output tells the user:

Copy your agent code to app/MyAgent/ before deploying.
Ensure main.py is the entrypoint file in that folder.

This is confusing — the user has to know to create main.py themselves. A better experience would be to vend a minimal placeholder main.py with a basic entrypoint stub so the directory isn't empty and the user has a starting point.

Acceptance Criteria

  • When "Bring your own agent" is selected during agentcore create or agentcore add agent --type byo, a placeholder main.py is created in the agent's code directory
  • The placeholder should contain a minimal working entrypoint (e.g., a simple handler function with a TODO comment)
  • The placeholder should match the expected entrypoint contract so agentcore dev works out of the box

Additional Context

Current behavior screenshot from agentcore create with BYO agent:

Created:
  SampleAgents/
    app/MyAgent/  Agent code location (empty)
    agentcore/    Config and CDK project

The (empty) note highlights the gap — every other agent type gets template code vended, but BYO gets nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions