- Renamed `Schema` to `BlockSchema` and moved to `lib/types.ts`
- Add `SchemaTooltip` component that renders markdown tooltip for node fields
- Add `SecretField` function (which uses `BlockSecret` as value) that replaces `BlockFieldSecret` functionality for models
- Rename `get` to `get_secret_value` to make name clearer and inline with pydantic `Secret` types
- Add shadcn tooltip
- Add `react-markdown` dependency
- Add `SchemaField` that works like Pydantic `Field` but allows to add extra json schema values. This PR adds `placeholder` entry but it could be extended with other data.
- Render `placeholder` inside input fields if available.
- Restyle placeholders so they are visually distinct from user-entered values
### Background
The main scope of this change is enhancing the system capability (by fixing bug, correcting execution behaviour) to allow for creating a graph with a loop, to allow the use case of block auto-generation agent.
### Changes 🏗️
* Main changes: Add block_autogen.py (block auto-generation agent graph example).
* Refactor on test boilerplate: introduced `util/test` for initiating a server, and waiting graph execution.
* Removing unnecessary db lookup and duplicated codes used for sending execution updates on agent executor.
* Removed redundant code on test and cli code.
* Moved block test execution helper into the main code (so blockinstallerblock can use it).
* Eliminate the need of explicitly add a module into the `AVAILABLE_BLOCKS` list, any block class under the `block` folder will be auto-discovered.
* Few patches on the existing blocks.
1. Add graph versioning functionality:
- Add `version`, `isActive` fields in the `AgentGraph` model
- Add `agentGraphVersion` field in related models
- Amend & add API endpoints for graph versioning (see below)
- Amend & add data layer functions (`autogpt_server.data`) to support new operations & data schema
2. Add graph template functionality:
- Add `isTemplate` fields in the `AgentGraph` model
- Add `GraphMeta` model for template/graph metadata
- Add API endpoints for template management (see below)
- Amend & add data layer functions (`autogpt_server.data`) to support new operations & data schema
3. Enhance graph creation:
- Amended `create_graph` route to handle template-based graph creation
4. Code refactoring:
- Improved import statements
- Enhanced error handling in graph creation
5. Minor improvements:
- Add validator to auto-assign `Graph.id` if not set
## API Changes
New endpoints:
- `GET /templates`: Retrieve all templates (metadata only)
- `POST /templates`: Create a new template
- `PUT /graphs/{graph_id}`: Create a new version of a graph
- `GET /templates/{graph_id}`: Get a specific template
- `PUT /templates/{graph_id}`: Create a new version of a graph template
- `GET /graphs/{graph_id}/versions`: Get all versions of a graph
- `GET /templates/{graph_id}/versions`: Get all versions of a graph template
- `GET /graphs/{graph_id}/versions/{version}`: Get a specific graph version
- `PUT /graphs/{graph_id}/versions/active`: Set active graph version
Modified endpoints:
- `POST /graphs`: Now supports creating graphs directly from templates
- `GET /graphs/{graph_id}`: Add `version` query parameter
- `GET /graphs/{graph_id}/executions`: Add `graph_version` query parameters
## UI changes
- Improve `/build` / `FlowEditor` save mechanism
- Implement updating current agent instead of creating a new agent on every save
- Add check to only save a new version if local graph has been edited
- Add `deepEquals` function to lib/utils.ts
- Add version indicators and selector on `/monitor`
![image](https://github.com/user-attachments/assets/742a66ee-4d12-4129-981d-fa6399e717fa)
- Add shad/cn `DropdownMenu` component
- Update `AutoGPTServerAPI` client
- Update input/output types with added attributes (see above)
- Add parameter `version` to `getFlow`
- Add parameter `flowVersion?` to `listFlowRunIDs`
- Add endpoint `updateFlow(flowID, FlowUpdateable)`
- Add endpoint `createFlow(fromTemplateID, templateVersion)` (overload)
- Add endpoint `getFlowAllVersions(id)`
- Add endpoint `setFlowActiveVersion(flowID, version)`
This commit adds support for the following models:
```python
# OpenAI Models
GPT4O = "gpt-4o"
GPT4_TURBO = "gpt-4-turbo"
GPT3_5_TURBO = "gpt-3.5-turbo"
# Anthropic models
CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20240620"
CLAUDE_3_HAIKU = "claude-3-haiku-20240307"
# Groq models
LLAMA3_8B = "llama3-8b-8192"
LLAMA3_70B = "llama3-70b-8192"
MIXTRAL_8X7B = "mixtral-8x7b-32768"
GEMMA_7B = "gemma-7b-it"
GEMMA2_9B = "gemma2-9b-it"
```
Every model has been tested with a single LLM block and is confirmed to be working in that setup.
- Add `autogpt` and `forge` dependency to the `autogpt_server`
- Add `AutoGPTAgentBlock` that initializes and runs a single agent loop on execution
- Add `BlockAgent` that inherits from `autogpt` `Agent` and is a thin extension on the agent that allows to disable components
- Add `OutputComponent` that adds `output` command for the agent
- Improve responsive grid layout
- Remove `container` class from `<main>` to utilize full screen width
- Improve detail views & add view for run details
- Make flow run list entries selectable
- Create `FlowInfo` and `FlowRunInfo` components
- Improve layout of `FlowRunsStats`
- Improve ScrollableLegend spacing & styling
- Hide scroll bar of scrollable legend
- Center legend items if there is space left
- Round icons
- Vertically align icons with labels
- FIX: Add condition to not display legend items for series with `legendType="none"`
- Add periodic 5s refresh of non-terminal flow run statuses
- Split off `refreshFlowRuns(flowID)` from `fetchFlowsAndRuns()`
- Add effect to run `refreshFlowRuns` every 5 seconds
- Improve and expand FlowRun info
- Add `FlowRun.totalRunTime`: sum of the individual execution durations of all nodes
- Add `FlowRun.endTime`
- Use `NodeExecutionResult.add_time` instead of `start_time` as `FlowRun.startTime`
- Sort Flows by last executed
- Add icons to navbar items & hide unused items Backtrack and Explore
- Change UI mentions of "(Agent) Flow" to "Agent"
### Background
Credentials for blocks could only be defined through the block input. The scope of this change is providing system-wide that becomes the default value for these input blocks.
### Changes 🏗️
* Add system-wide credential support for agent blocks `BlockFieldSecret`.
* Update llmcall & reddit block to adopt `BlockFieldSecret`.
* reverts dark theme for now
* change "Show/Hide nodes" button to be "Icon"
* swap over to light mode + fix sizing
* fix color for agent name + description text
* Change navbar to white
* Added darkmode tag for the navbar
* Added dark mode text color
* Changed to tailwind classes
---------
Co-authored-by: Bentlybro <tomnoon9@gmail.com>
* reverts dark theme for now
* change "Show/Hide nodes" button to be "Icon"
* swap over to light mode + fix sizing
* fix color for agent name + description text
* Change navbar to white
* Added darkmode tag for the navbar
* Added dark mode text color
---------
Co-authored-by: Bentlybro <tomnoon9@gmail.com>
* reverts dark theme for now
* change "Show/Hide nodes" button to be "Icon"
* swap over to light mode + fix sizing
* fix color for agent name + description text
* update icon