Skip to content

Commit

Permalink
First version of agent schema and some refinement to workflow schema [f…
Browse files Browse the repository at this point in the history
…ixes #136] (#139)

* first version of the JSON schema. Fixes issue #27

* addressing feedback from review

* addressed steps and agents definition

* made agents also array

* first version of the agent schema that validares the agents used in POC0

* added code section

* included suggestions and changes from @akihikokuroda's PR #139 review comments
  • Loading branch information
maximilien authored Jan 24, 2025
1 parent 43f9e3e commit 8969b49
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/schema/simple_agent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"apiVersion": "beehive/v1alpha1",
"kind": "Agent",
"metadata": {
"name": "test",
"labels": {
"app": "test-example"
}
},
"spec": {
"model": "meta-llama/llama-3-1-70b-instruct",
"description": "this is a test",
"tools": [
"code_interpreter",
"test"
],
"instructions": "this is a test."
}
}
13 changes: 13 additions & 0 deletions test/schema/simple_agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: beehive/v1alpha1
kind: Agent
metadata:
name: test
labels:
app: test-example
spec:
model: meta-llama/llama-3-1-70b-instruct
description: this is a test
tools:
- code_interpreter
- test
instructions: this is a test.
63 changes: 63 additions & 0 deletions tools/agent_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/i-am-bee/bee-hive/tools/agent_schema.json",
"title": "BeeAI Agent",
"description": "A schema for defining Bee Hive workflows in YAML or JSON",
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"description": "API version beehive/v1alpha1"
},
"kind": {
"type": "string",
"description": "must be Agent"
},
"metadata": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "agent name"
},
"labels": {
"type": "object",
"description": "agent labels, key: value pairs"
}
},
"required": [
"name"
]
},
"spec": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Short human-readable desciption of this agent"
},
"model": {
"type": "string",
"description": "The LLM model for this agent"
},
"tools": {
"type": "array",
"items": {
"type": "string"
}
},
"instruction": {
"type": "string",
"description": "The instruction (context) to pass to this agent"
},
"code": {
"type": "string",
"description": "The (optional) code defintion for the agent"
}
},
"required": [
"model"
]
}
}
}

0 comments on commit 8969b49

Please sign in to comment.