-
Notifications
You must be signed in to change notification settings - Fork 43k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kpczerwinski/open-745-clean-forge' into kpczerwinski/op…
…en-428-clean-autogpt
- Loading branch information
Showing
138 changed files
with
1,970 additions
and
3,181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[pr_reviewer] | ||
num_code_suggestions=0 | ||
|
||
[pr_code_suggestions] | ||
commitable_code_suggestions=false | ||
num_code_suggestions=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 5 additions & 8 deletions
13
autogpts/autogpt/autogpt/agent_factory/profile_generator.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 🤖 Agents | ||
|
||
Agent is composed of [🧩 Components](./components.md) and responsible for executing pipelines and some additional logic. The base class for all agents is `BaseAgent`, it has the necessary logic to collect components and execute protocols. | ||
|
||
## Important methods | ||
|
||
`BaseAgent` provides two abstract methods needed for any agent to work properly: | ||
1. `propose_action`: This method is responsible for proposing an action based on the current state of the agent, it returns `ThoughtProcessOutput`. | ||
2. `execute`: This method is responsible for executing the proposed action, returns `ActionResult`. | ||
|
||
## AutoGPT Agent | ||
|
||
`Agent` is the main agent provided by AutoGPT. It's a subclass of `BaseAgent`. It has all the [Built-in Components](./built-in-components.md). `Agent` implements the essential abstract methods from `BaseAgent`: `propose_action` and `execute`. | ||
|
||
## Building your own Agent | ||
|
||
The easiest way to build your own agent is to extend the `Agent` class and add additional components. By doing this you can reuse the existing components and the default logic for executing [⚙️ Protocols](./protocols.md). | ||
|
||
```py | ||
class MyComponent(AgentComponent): | ||
pass | ||
|
||
class MyAgent(Agent): | ||
def __init__( | ||
self, | ||
settings: AgentSettings, | ||
llm_provider: ChatModelProvider, | ||
file_storage: FileStorage, | ||
legacy_config: Config, | ||
): | ||
# Call the parent constructor to bring in the default components | ||
super().__init__(settings, llm_provider, file_storage, legacy_config) | ||
# Add your custom component | ||
self.my_component = MyComponent() | ||
``` | ||
|
||
For more customization, you can override the `propose_action` and `execute` or even subclass `BaseAgent` directly. This way you can have full control over the agent's components and behavior. Have a look at the [implementation of Agent](https://github.com/Significant-Gravitas/AutoGPT/tree/master/autogpts/autogpt/autogpt/agents/agent.py) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from .agent import Agent | ||
from .prompt_strategies.one_shot import OneShotAgentActionProposal | ||
|
||
__all__ = [ | ||
"Agent", | ||
"OneShotAgentActionProposal", | ||
] |
Oops, something went wrong.