-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(ph-ai): agent modes #41284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ph-ai): agent modes #41284
Conversation
c09562c to
f0b3d9d
Compare
|
Size Change: +1.18 kB (+0.03%) Total Size: 3.42 MB
|
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
Visual regression: Storybook UI snapshots updatedMode: Changes: 2 snapshots (2 modified, 0 added, 0 deleted) What this means:
Next steps:
|
6013386 to
338e8c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
52 files reviewed, 1 comment
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
kappa90
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was already checking this during the weekend, all super good, just left a few comments
| return start_message.content | ||
| return "" | ||
|
|
||
| def _has_agent_modes_feature_flag(self) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated three times, one in utils, one here and one somewhere in the modes files
| from ee.hogai.utils.prompt import format_prompt_string | ||
| from ee.hogai.utils.types.base import AssistantNodeName, AssistantState, NodePath | ||
|
|
||
| INSIGHT_TOOL_PROMPT = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth moving this to its own file, since it's massive
tatoalo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really nice, awaiting on evals! Thanks for putting this behind FF so we can actually test this nicely E2E 🙏🏻
| return insert_messages_before_start(state.messages, context_messages, start_id=state.start_id) | ||
|
|
||
| def _get_mode_prompt(self, mode: AgentMode | None) -> str: | ||
| return format_prompt_string(CONTEXT_MODE_PROMPT, mode=mode.value if mode else AgentMode.PRODUCT_ANALYTICS.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: having product analytics as default does make sense, we could probably have a DEFAULT_AGENT_MODE constant to be more direct about this, not a biggie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
53 files reviewed, 1 comment
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
e7e4fcb to
c982e8f
Compare

Problem
We want to create more specialized agents within the single execution loop, so the context is preserved and the context window is not overwhelmed by it. This PR introduces three new modes under the feature flag
phai-agent-modes: product analytics, SQL, and session replay.Demo screenshot
Changes
How did you test this code?
Manual testing & unit tests