Why
Addresses Linear ticket PLEN-1172 to improve Config Agent auth schema handling. Currently, config generation and app creation are separate workflows requiring manual coordination. This creates friction for users who need to:
- Run ConfigGenerator workflow to create config.ts
- Wait for PR to merge
- Run CreateApp workflow to build actions
What
Integrates ConfigGeneratorRunner into CreateApp workflow to enable seamless end-to-end app creation in a single API call.
Changes:
Config Fields Added to CreateAppWorkflowConfig:
generate_config_if_missing: bool = False - Enables automatic config generation
config_credentials: Optional[Dict] - Credentials for auth research (e.g., {'api_key': 'xxx'})
config_docs_url: Optional[str] - Primary auth documentation source
config_instruction: Optional[str] - Custom requirements for config generation
Workflow Logic:
- CreateApp checks if
config.ts exists at start
- If missing AND
generate_config_if_missing=True:
- Validates
config_credentials are provided
- Runs
ConfigGeneratorRunner inline
- Commits generated config before proceeding to action building
- Logs results to run_summary for visibility
- If config exists, skips generation and proceeds normally
Output Enhanced:
- Added
config_generation_result: Optional[ConfigGeneratorOutput] to CreateAppWorkflowResult
- Includes auth types, OAuth2 scopes, staging test results when config was generated
Auth Discovery Verification:
Confirmed that comprehensive auth discovery already works as required:
- Researcher subagent explicitly finds ALL auth methods (line 33-35, 102 in
researcher/prompt.py)
- Config generator implements ALL discovered auth schemes (line 37, 45, 68-74 in
prompt.py)
- Handles multiple auth methods per app (OAuth2 + API Key, etc.)
How to Test
Test 1: Generate config for new app
curl -X POST 'https://staging-integrations-api.composio.io/workflows/create-app/run' \
-H 'Content-Type: application/json' \
-d '{
"app_name": "example_new_app",
"generate_config_if_missing": true,
"config_credentials": {"api_key": "test_key_xxx"},
"config_docs_url": "https://example.com/docs/auth",
"connection_id": "conn_xxx",
"force_run": true
}'
Expected:
- Config generated first (check Datadog logs for "ConfigGenerator: config.ts not found, generating")
- Config committed before action building
- Response includes
config_generation_result with auth types and scopes
Test 2: Existing config (backward compatibility)
curl -X POST 'https://staging-integrations-api.composio.io/workflows/create-app/run' \
-H 'Content-Type: application/json' \
-d '{
"app_name": "slack",
"generate_config_if_missing": true,
"config_credentials": {"api_key": "test_key_xxx"},
"connection_id": "conn_xxx"
}'
Expected:
- Detects existing config (check logs for "ConfigGenerator: config.ts already exists, skipped")
- Proceeds directly to action building
- No config generation result in response
Test 3: Disabled flag (backward compatibility)
curl -X POST 'https://staging-integrations-api.composio.io/workflows/create-app/run' \
-H 'Content-Type: application/json' \
-d '{
"app_name": "github",
"connection_id": "conn_xxx"
}'
Expected:
- No config generation check (behaves exactly like before)
- Proceeds directly to action building
Notes
- Backward compatible:
generate_config_if_missing defaults to False, existing calls work unchanged
- Config generator remains standalone: ConfigGenerator workflow still usable independently
- API route unchanged: FastAPI automatically accepts new optional fields via Pydantic config
- Connection ID still required: CreateApp needs connection_id for action testing (even when generating config)
- Auth discovery already comprehensive: No changes needed to researcher/config generator - they already find ALL auth methods
Linear ticket: https://linear.app/composio/issue/PLEN-1172