Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions connector_builder_agents/prompts/phase-1-stream-read.md

This file was deleted.

33 changes: 0 additions & 33 deletions connector_builder_agents/prompts/phase-2-pagination.md

This file was deleted.

34 changes: 0 additions & 34 deletions connector_builder_agents/prompts/phase-3-remaining-streams.md

This file was deleted.

4 changes: 2 additions & 2 deletions connector_builder_agents/src/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def create_developer_agent(
session_state: SessionState,
mcp_servers: list,
) -> OpenAIAgent:
"""Create the developer agent that executes specific phases."""
"""Create the developer agent that will work on the connector build tasks."""
return OpenAIAgent(
name="MCP Connector Developer",
instructions=get_default_developer_prompt(
Expand All @@ -61,7 +61,7 @@ def create_manager_agent(
session_state: SessionState,
mcp_servers: list,
) -> OpenAIAgent:
"""Create the manager agent that orchestrates the 3-phase workflow."""
"""Create the manager agent that orchestrates connector builds."""
return OpenAIAgent(
name="Connector Builder Manager",
instructions=get_default_manager_prompt(
Expand Down
31 changes: 17 additions & 14 deletions connector_builder_agents/src/guidance.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,30 @@

Instructions: {instructions}

Execute the phases in order:
1. Use start_phase_1_stream_read to delegate Phase 1 (first successful stream read)
2. After Phase 1 completes, use start_phase_2_pagination to delegate Phase 2 (working pagination)
3. After Phase 2 completes, use start_phase_3_remaining_streams to delegate Phase 3 (add remaining streams)
Execute tasks in small steps, narrating your internal monologue as you go. In general,
you can break the work into small incremental steps:
1. Aim for a first successful stream read, ignoring pagination and additional streams.
2. Once you have a successful read, see if you can add pagination support to that stream.
3. Once you are able to read all records from that stream, try to add more streams incrementally,
focusing on adding and then testing one new stream at a time.

Monitor progress and ensure each phase completes successfully before moving to the next.
Monitor progress and ensure each step completes successfully before moving to the next.

When checking on the progress of your developer:
- Use the `get_progress_log_text` tool to get the latest progress log.
- Use the `get_latest_readiness_report` tool to get the latest readiness report.
- Use your tools to retrieve the latest progress log and the "readiness report".
- Based on the progress log and readiness report, determine what next steps are needed.

If the build is complete, summarize the results and evaluate whether they meet the requirements. If
not, you can repeat a phase, calling out what they missed and suggesting next steps. Determine the
next phase or next appropriate action based on their progress.
not, you can repeat a task, calling out what they missed and suggesting next steps. Determine the
next steps or next appropriate action based on their progress.

## Exit Criteria

- You are done when all phases are complete and the connector is ready for review. When this is the
case, call the `mark_job_success` tool. (Only call if you are sure the build is fully complete
and fully tested.)
- If you become fully blocked and cannot proceed, call the
`mark_job_failed` tool, providing a summary of the issues encountered. (Last resort only.)
- You are done when all deliverables are complete, all streams have been added, and the connector
is fully tested and working properly. When this is the case, call the `mark_job_success` tool.
(Only call if you are sure the build is fully complete and fully tested.)
- If you become fully blocked and cannot proceed, use your provided tool to mark the task as failed,
providing a summary of the issues encountered. (Last resort only.)
"""


Expand All @@ -69,6 +71,7 @@ def get_default_manager_prompt(
api_name=api_name,
instructions=instructions,
),
INTERNAL_MONOLOGUE_GUIDANCE,
get_project_directory_prompt(project_directory),
RECOMMENDED_PROMPT_PREFIX,
ROOT_PROMPT_FILE_STR,
Expand Down
50 changes: 0 additions & 50 deletions connector_builder_agents/src/phases.py

This file was deleted.

2 changes: 1 addition & 1 deletion connector_builder_agents/src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ async def run_manager_developer_build(
manager_model: str = DEFAULT_MANAGER_MODEL,
session_id: str | None = None,
) -> list[RunResult]:
"""Run a 3-phase connector build using manager-developer architecture."""
"""Run connector build using manager-developer architecture."""
# Generate session_id if not provided
if session_id is None:
session_id = generate_session_id()
Expand Down
6 changes: 3 additions & 3 deletions connector_builder_agents/src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ def create_mark_job_success_tool(session_state: SessionState):

@function_tool
def mark_job_success() -> None:
"""Mark the current phase as complete.
"""Mark the current job as complete.

This should be called when all objectives for the current phase are met, and only after
This should be called when all objectives for the current job are met, and only after
a successful connector readiness report has been saved to the workspace directory.
"""
session_state.is_success = True
Expand All @@ -236,7 +236,7 @@ def create_mark_job_failed_tool(session_state: SessionState):

@function_tool
def mark_job_failed() -> None:
"""Mark the current phase as failed.
"""Mark the job as failed.

This should only be called in the event that it is no longer possible to make progress.
Before calling this tool, you should attempt to save the latest output of the
Expand Down
Loading