Skip to content

feat: add poly create-project command#64

Draft
oeisenberg wants to merge 2 commits intomainfrom
feat/create-project
Draft

feat: add poly create-project command#64
oeisenberg wants to merge 2 commits intomainfrom
feat/create-project

Conversation

@oeisenberg
Copy link
Copy Markdown
Contributor

Summary

Adds a new poly create-project CLI command that creates a new Agent Studio project under an interactively selected account, then initializes it locally.

Motivation

Currently users must create projects through the Agent Studio UI and then poly init to link them locally. This command streamlines the workflow by handling both creation and initialization in one step.

Changes

  • Add PlatformAPIHandler.create_project() — POST to /accounts/{account_id}/projects
  • Add AgentStudioInterface.create_project() wrapper
  • Add create-project subparser with --region, --account_id, --name, --json flags
  • Add AgentStudioCLI.create_project() with interactive and non-interactive flows
  • After creation, automatically calls init_project to set up the local project

Test strategy

  • Added/updated unit tests
  • Manual CLI testing (poly <command>)
  • Tested against a live Agent Studio project
  • N/A (docs, config, or trivial change)

Checklist

  • ruff check . and ruff format --check . pass
  • pytest passes
  • No breaking changes to the poly CLI interface (or migration path documented)
  • Commit messages follow conventional commits

🤖 Generated with Claude Code

Add a new CLI command to create an Agent Studio project under an
interactively selected account. Supports both interactive (region →
account → name prompts) and non-interactive (--region, --account_id,
--name flags) workflows. After creation, automatically initializes
the project locally via `init_project`.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions

This comment has been minimized.

The ADK proxy (api.us.poly.ai/adk/v1) does not expose a project
creation endpoint. Route create-project through the Sourcerer API
(sourcerer.{region}.platform.polyai.app/api/v1) with the required
payload fields (config, knowledge_base, topic_names, project_id).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Coverage Report

Base (main) PR Change
71.5% 71.5% +0.0% ✅

Changed file coverage

File Coverage Change
poly/output/console.py 23.1% +0.8% ✅
poly/handlers/platform_api.py 33.8% -2.7% ⚠️
poly/cli.py 43.0% +3.3% ✅
poly/handlers/interface.py 54.7% +0.4% ✅
poly/output/json_output.py 87.5% +25.0% ✅

@oeisenberg oeisenberg marked this pull request as draft April 2, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant