Skip to content
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(forge): Unbreak forge agent #7196

Merged
merged 7 commits into from
Jun 12, 2024
Merged

Conversation

kcze
Copy link
Contributor

@kcze kcze commented Jun 6, 2024

Background

After refactor #7117 agents created using forge don't work.

Changes 🏗️

Revert some changes to fix forge agents and enable rudimentary components support for them. LLM calls aren't supported because the providers are in autogpt.

  • Renamed forge Agent to ProtocolAgent (it's providing agent protocol server)
  • Brought back and update forge/app.py and forge/agent/forge_agent.py
  • ForgeAgent inherits from BaseAgent, supports component execution and runs the same pipelines as autogpt Agent
  • Updated forge version from 0.1.0 to 0.2.0
  • Updated code comments

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

Copy link

netlify bot commented Jun 6, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit e70140e
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/666996d1a0fc8e0008d99a94

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 11.60714% with 99 lines in your changes missing coverage. Please review.

Project coverage is 21.27%. Comparing base (f2cb553) to head (e70140e).
Report is 14 commits behind head on master.

Files Patch % Lines
forge/forge/agent/forge_agent.py 0.00% 79 Missing ⚠️
forge/forge/agent_protocol/api_router.py 0.00% 10 Missing ⚠️
forge/forge/app.py 0.00% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7196       +/-   ##
===========================================
- Coverage   39.97%   21.27%   -18.70%     
===========================================
  Files         103       62       -41     
  Lines        6601     3454     -3147     
  Branches      979      447      -532     
===========================================
- Hits         2639      735     -1904     
+ Misses       3855     2679     -1176     
+ Partials      107       40       -67     
Flag Coverage Δ
Linux 21.27% <11.60%> (-18.70%) ⬇️
Windows 21.31% <12.74%> (-21.91%) ⬇️
agbenchmark ?
autogpt-agent ?
forge 21.27% <11.60%> (-23.87%) ⬇️
macOS 21.27% <11.60%> (-18.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added size/xl and removed size/l labels Jun 9, 2024
@github-actions github-actions bot added size/l and removed size/xl labels Jun 9, 2024
@kcze kcze marked this pull request as ready for review June 9, 2024 10:36
@kcze kcze requested review from Pwuts and Swiftyos June 9, 2024 10:36
ntindle
ntindle previously approved these changes Jun 9, 2024
@kcze kcze linked an issue Jun 10, 2024 that may be closed by this pull request
1 task
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> protocol_agent.py
or
-> forge/agent_protocol/agent.py if you think that makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to forge/agent_protocol/agent.py

"""
task = await super().create_task(task_request)
logger.info(
f"📦 Task created: {task.task_id} "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f"📦 Task created: {task.task_id} "
f"📦 Task created with ID {task.task_id} and "

@Pwuts
Copy link
Member

Pwuts commented Jun 10, 2024

Pretty clean! Nice :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file should be moved to where agent.py is now

@@ -24,7 +24,7 @@
)

if TYPE_CHECKING:
from forge.agent.agent import ProtocolAgent
from forge.agent_protocol.agent import ProtocolAgent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
from forge.agent_protocol.agent import ProtocolAgent
from .agent import ProtocolAgent

@@ -13,7 +13,7 @@
from forge.file_storage.base import FileStorageConfiguration
from forge.file_storage.local import LocalFileStorage

from .agent import ProtocolAgent
from ..agent_protocol.agent import ProtocolAgent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from ..agent_protocol.agent import ProtocolAgent
from forge.agent_protocol.agent import ProtocolAgent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the agent_test.py and updated imports

ntindle
ntindle previously approved these changes Jun 10, 2024
@ntindle
Copy link
Member

ntindle commented Jun 12, 2024

@kcze can we work on getting this ready to merge asap? Lots of complaints lol

@Torantulino
Copy link
Member

Fixes #7154

@kcze kcze merged commit 9f71cd2 into master Jun 12, 2024
18 of 20 checks passed
@kcze kcze deleted the kpczerwinski/open-1213-fix-forge-agents branch June 12, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Error loading ASGI app. Could not import module "forge.app".
4 participants