Skip to content

Commit

Permalink
add diagram for agent terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonlee5 committed Sep 4, 2024
1 parent 92ea671 commit 2d9bb5d
Show file tree
Hide file tree
Showing 5 changed files with 480 additions and 12 deletions.
18 changes: 18 additions & 0 deletions docs/app/agents/Agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,30 @@ For system requirements, see [Agent Network Config & Prerequisites](../configura

### Terminology

#### Agent structure

<div class="text--center">
```mermaid
stateDiagram-v2
direction LR
[*] --> Trigger
Trigger --> Processor
Processor --> Trigger
Processor --> Action
Action --> Trigger
Action --> [*]
```
</div>

- **Agent**: A combination of a trigger, processor, and action configuration to move data from a remote user device into Ganymede.
- **Trigger**: A component configured to initiate the Agent pipeline based on a specific change or event.
- **Processor**: User-defined code that converts data produced by a trigger into a format suitable for the action.
- **Action**: Interaction with Ganymede's cloud or application that moves the processed data to the desired location.
- **Connection**: A running instance of the Agent that is or has been connected to Ganymede, waiting for the configured trigger.
- **Pipeline**: A data flow of trigger -> processor -> action, tailored to the use case. Pipelines may share the same trigger and action but differ in the processor template based on the use case.

#### Agent / Connection configuration

- **Runtime Uptime**: An in-place update to the latest processor and configuration (Agent and Connection levels) without stopping the process. The pipeline loop temporarily pauses to reload files, but no data is lost.
- **Full Update**: A complete update of the Connection binary, useful for incorporating new dependency updates or core-codebase changes. A new Connection executable must be brought up in parallel.
- **Connection Configuration**: Each installed executable maintains its own name, labels, variables, and file tags. This configuration, along with the “parent-level” Agent configuration and processor, makes a Connection unique. Some metadata, like ID, start time, version, and generated metadata, is not configurable.
Expand Down
6 changes: 2 additions & 4 deletions docs/sdk/GanymedeClass.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ import NodeChip from '@site/src/components/NodeChip.js'

## Overview

The **Ganymede** object is a powerful tool used within editor notebooks to access and interact with data from previous runs, allowing users to test code changes effectively.

The object contains the following attributes related to run context:
The **Ganymede** object is a powerful tool used within editor notebooks to access and interact with data from previous runs, allowing users to test code changes effectively. It contains the following attributes related to run context:

- **flow_run_id**: str - Epoch time associated with run, which corresponds to runs shown in [Flow View](../app/flows/FlowView)
- **initiator**: str - Flow run initiator; agent name + MAC address for agent-initiated Flows, user email for user-initiated flows, event name for event-triggered Flows, or Flow name if triggered from another Flow
- **initiator_type**: str - Type of the user who initiated the flow run (AGENT, USER, EVENT, FLOW)
- **ganymede_context**: GanymedeContext - Run context information, detailed in the [GanymedeContext section of this page](#class-ganymedecontext)

For example, you can create a Ganymede object associated with the most recent run:
As an example, you can create a Ganymede object associated with the most recent run to mirror the prior execution in user-defined code:

```python
import pandas as pd
Expand Down
5 changes: 4 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ module.exports = {
favicon: 'img/favicon.png',
organizationName: 'Ganymede-Bio',
projectName: 'website-docusaurus',
markdown: {
mermaid: true
},
plugins: [
[
'docusaurus-plugin-openapi-docs',
Expand All @@ -36,7 +39,7 @@ module.exports = {
},
]
],
themes: ["docusaurus-theme-openapi-docs"],
themes: ["docusaurus-theme-openapi-docs", '@docusaurus/theme-mermaid'],
themeConfig: {
prism: {
additionalLanguages: ['python', 'bash', 'powershell'],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@docusaurus/plugin-vercel-analytics": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@docusaurus/theme-common": "^3.5.2",
"@docusaurus/theme-mermaid": "^3.5.2",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mdx-js/react": "^3.0.1",
Expand Down
Loading

0 comments on commit 2d9bb5d

Please sign in to comment.