* Refactor on the link structure and API
* Refactor on the link structure and API
* Cleanup IDS
* Remove run_id
* Update block interface
* Added websockets dependency
* Adding routes
* Adding in websocket code
* Added cli to test the websocket
* Added an outline of the message formats I plan on using
* Added webscoket message types
* Updated poetry lock
* Adding subscription logic
* Updating subscription mechanisms
* update cli
* Send updates to server
* Get single execution data
* Fix type hints and renamed function
* add callback function and type hints
* fix type hints
* Updated manager to use property
* Added in websocket updates
* Added connection manager tests
* Added tests for ws_api
* trying to work around process issues
* test formatting
* Added a create and execute command for the cli
* Updated send format
* websockets command working
* cli update
* Added model.py
* feat: Update server.py and manager.py
- Initialize blocks in AgentServer lifespan context
- Remove unnecessary await in AgentServer get_graph_blocks
- Fix type hinting in manager.py
- Validate input data in validate_exec function
* fix tests
* feat: Add autogpt_server.blocks.sample and autogpt_server.blocks.text modules
This commit adds the `autogpt_server.blocks.sample` and `autogpt_server.blocks.text` modules to the project. These modules contain blocks that are used in the execution of the Autogpt server. The `ParrotBlock` and `PrintingBlock` classes are imported from `autogpt_server.blocks.sample`, while the `TextFormatterBlock` class is imported from `autogpt_server.blocks.text`. This addition enhances the functionality of the server by providing additional blocks for text processing and sample operations.
* fixed circular import issue
* Update readme
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
* feat(autogpt_builder): Add `AutoGPTServerAPI` client
* migrate API calls in Flow.tsx to new API client
* feat(autogpt_server): Add `/graphs/{graph_id}/executions` endpoint
In `data/execution.py`:
- Add `list_executions` function
- Rename `get_executions` to `get_execution_results`
In `server/server.py`:
- Add route
- Add `AgentServer.list_graph_runs`
- Rename `AgentServer.get_executions` to `get_run_execution_results`
* feat(autogpt_builder): Add `listFlowRunIDs` endpoint to `AutoGPTServerAPI` client
* Move `Schema` to `types.ts` and rename to `ObjectSchema`
* feat(rnd): Add type hint and strong pydantic type validation for block input/output + add reddit agent-blocks.
* feat(rnd): Add type hint and strong pydantic type validation for block input/output + add reddit agent-blocks.
* Fix reddit block
* Fix serialization
* Eliminate deprecated class property
* Remove RedditCredentialsBlock
* Cache jsonschema computation, add dictionary construction
* Add dict_split and list_split to output, add more blocks
* Add objc_split for completeness, int both input and output
* Update reddit block
* Add reddit test (untested)
* Resolved json issue on pydantic
* Add creds check on client
* Add dict <--> pydantic object flexibility
* Fix error retry
* Skip reddit test
* Code cleanup
* Chang prompt
* Make this work
* Fix linting
* Hide input_links and output_links from Node
* Add docs
* updating UI to handle deeply nested data structures for reddit usecase
* changing expected key in reddit post to comment
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
* feat(rnd): Add type hint and strong pydantic type validation for block input/output + add reddit agent-blocks.
* feat(rnd): Add type hint and strong pydantic type validation for block input/output + add reddit agent-blocks.
* Fix reddit block
* Fix serialization
* Eliminate deprecated class property
* Remove RedditCredentialsBlock
* Cache jsonschema computation, add dictionary construction
* Add dict_split and list_split to output, add more blocks
* Add objc_split for completeness, int both input and output
* Update reddit block
* Add reddit test (untested)
* Resolved json issue on pydantic
* Add creds check on client
* Add dict <--> pydantic object flexibility
* Fix error retry
* Skip reddit test
* Code cleanup
* Chang prompt
* Make this work
* Fix linting
* Hide input_links and output_links from Node
* Add docs
---------
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
- Add `google-api-python-client-stubs` dev dependency
- Add version specification to `google-api-python-client` dependency
- Fix type error (by ignoring it) in forge/components/web/search.py
Update Pydantic dependency of `autogpt`, `forge` and `benchmark` to `^2.7`
[Pydantic Migration Guide](https://docs.pydantic.dev/2.7/migration/)
- Migrate usages of now-deprecated functions to their replacements
- Update `Field` definitions
- Ellipsis `...` for required fields is deprecated
- `Field` no longer supports extra `kwargs`, replace use of this feature with field metadata
- Replace `Config` class for specifying model configuration with `model_config = ConfigDict(..)`
- Removed `ModelContainer` in `BaseAgent`, component configuration dict is now directly serialized using Pydantic v2 helper functions
- Forked `agent-protocol` and updated `packages/client/python` for Pydantic v2 support: https://github.com/Significant-Gravitas/agent-protocol
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
- Implement message based history in `ActionHistoryComponent`
- Make non-summarized message count configurable (`ActionHistoryComponent.full_message_count`)
- Run `ActionHistoryComponent` after `SystemComponent` so that history messages are last in the prompt
- Omit final instruction message if prompt already contains assistant messages
- Filter `raw_message` from `ActionProposal.schema()`
---------
Co-authored-by: Krzysztof Czerwinski <kpczerwinski@gmail.com>
* Create optional `build` dependency group
* Move `cx-freeze` dependency to `build` dependency group
To include the `build` group when installing dependencies, run `poetry install --with=build`.
Fixes#7297 (`cx-freeze` dependency install fails after #7271)
On AgentServer, To create a Block like StringFormatterBlock or LllmCallBlock, we need some way to dynamically link input pins and aggregate them into a single list input. This will give a better experience for the user to construct an input and link it from the output of the other nodes. The scope of this change is adding support for that in the least intrusive way.
Proposal
To differentiate the input list name and its singular entry we are using the $_<index> prefix. For example:
For the input items: list[int], you can set a pin items with values like [1,2,3,4]. But you can also add input pins like items_$_0 or items_$_4 with values 1 or 2, which will be appended to the items input in alphabetical order.
The execution engine will guarantee to wait for the execution until all the input pin value is produced, so input pin with list input will produce fix-sized list.
* Getting started with nextjs
* fix linting
* remove gitignore for package.json
* pulling in reactflow components
* updating css
* use environment variables
* clean up css / ui a lil
* Fixed nodes/run button animation
so they are always visible
---------
Co-authored-by: Bentlybro <tomnoon9@gmail.com>
### Background
The current implementation of AgentServer doesn't allow for a single pin to be connected to multiple nodes, this will be problematic when you have a single output node that needs to be propagated into many nodes. Or multiple nodes that possibly feed the data into a single pin (first come first serve).
This infra change is also part of the preparation for changing the `block` interface to return a stream of output instead of a single output. Treating blocks as streams requires this capability.
### Changes 🏗️
* Update block run interface from returning `(output_name, output_data)` to `Generator[(output_name, output_data)]`
* Removed `agent` term in the API, replace it with `graph` for consistency.
* Reintroduced `AgentNodeExecutionInputOutput`. `AgentNodeExecution` input & output will be a list of `AgentNodeExecutionInputOutput` which describes the input & output data of its execution. Making an execution has 1-many relation to its input output data.
* Propagating the relation and block interface change into the execution engine.
### Background
Agent execution should be able to be triggered in a recurring manner.
This PR introduced an ExecutionScheduling service, a process responsible for managing the execution schedule and triggering its execution based on a predefined cron expression.
### Changes 🏗️
* Added `scheduler.py` / `ExecutionScheduler` implementation.
* Added scheduler test.
* Added `AgentExecutionSchedule` table and its logical model & prisma queries.
* Moved `add_execution` from API server to `execution_manager`
### Background
This PR adds support on IPC on autogpt_server.
To make this happen, there are a couple of refactoring efforts being made (will be described in the `Changes` section).
Currently, there are three independent processes:
```
AgentServer ----> ExecutionManager
|
--> ExecutionScheduler
```
### Changes 🏗️
* Added Pyro5 for IPC support.
* Introduced `AppService`: a class to construct an independent process that can expose a method to other running processes (this is analogous to a microservice).
* Introduced `AppProcess`: used by `AppService` a class for creating a child process that can be executed in the background.
* Adapting existing codebase to user `AppService`.
Remove many env vars and use component-level configuration that could be loaded from file instead.
### Changed
- `BaseAgent` provides `serialize_configs` and `deserialize_configs` that can save and load all component configuration as json `str`. Deserialized components/values overwrite existing values, so not all values need to be present in the serialized config.
- Decoupled `forge/content_processing/text.py` from `Config`
- Kept `execute_local_commands` in `Config` because it's needed to know if OS info should be included in the prompt
- Updated docs to reflect changes
- Renamed `Config` to `AppConfig`
### Added
- Added `ConfigurableComponent` class for components and following configs:
- `ActionHistoryConfiguration`
- `CodeExecutorConfiguration`
- `FileManagerConfiguration` - now file manager allows to have multiple agents using the same workspace
- `GitOperationsConfiguration`
- `ImageGeneratorConfiguration`
- `WebSearchConfiguration`
- `WebSeleniumConfiguration`
- `BaseConfig` in `forge` and moved `Config` (now inherits from `BaseConfig`) back to `autogpt`
- Required `config_class` attribute for the `ConfigurableComponent` class that should be set to configuration class for a component
`--component-config-file` CLI option and `COMPONENT_CONFIG_FILE` env var and field in `Config`. This option allows to load configuration from a specific file, CLI option takes precedence over env var.
- Added comments to config models
### Removed
- Unused `change_agent_id` method from `FileManagerComponent`
- Unused `allow_downloads` from `Config` and CLI options (it should be in web component config if needed)
- CLI option `--browser-name` (the option is inside `WebSeleniumConfiguration`)
- Unused `workspace_directory` from CLI options
- No longer needed variables from `Config` and docs
- Unused fields from `Config`: `image_size`, `audio_to_text_provider`, `huggingface_audio_to_text_model`
- Removed `files` and `workspace` class attributes from `FileManagerComponent`
When an agent is resumed from a mid-cycle state (having made a proposal but not executed it yet), we need to use the previously determined `current_episode.action` proposal instead of calling `agent.propose_action()` again.
* Rename `assert_config_has_openai_api_key` to `assert_config_has_required_llm_api_keys`
* Make OpenAI credential check conditional (only if an OpenAI model is selected in the config)
* Implement checks for Groq and Anthropic credentials
* Use API calls for Groq and OpenAI credential checks to make sure the keys are valid
Revert some changes to fix forge agent and enable components support.
- Rename forge `Agent` to `ProtocolAgent`
- Bring 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
- Update forge version from 0.1.0 to 0.2.0
- Update code comments
### Background
This PR implements the main logic of the block execution engine for AutoGPT-Server.
An integration test is added to test the behavior.
*What you can do now with this PR*:
You can manually create a graph, by using the existing blocks as nodes (or write your own). Then execute the graph with an input.
*What you can't do yet*:
Listen to the graph execution result/update (you can follow the `AgentNodeExecution` table result, though).
### Changes 🏗️
* Split `data.py` (model file) into three modules:
* `execution`: a model for node execution.
* `graph`: a model for graph structure.
* `block`: a model for agent block/component.
* Implemented executor main logic
* Simplify db structure:
* Remove `AgentBlockInputOutput` in favor of `inputSchema` & `outputSchema` using serialized json/dict structure.
* Remove `id` on `AgentBlock` in favor of using name (class name of the block) as its identifier.
* Added `constantInput` column for `AgentNode` for hard-coded input/block configuration. Hence, removing`executionStateData` on `AgentNodeExecution`.
* Rename AgentNodeLink input/output to source/sink to avoid confusion
* Change multithreading to multiprocessing, to allow the use of multiple `prisma` asynchronous client.