openagentflow 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="docs/assets/oaf-logo.svg" alt="OpenAgentFlow Logo" width="160"/>
|
|
2
|
+
<img src="https://raw.githubusercontent.com/OpenAgentFlow/OpenAgentFlow/main/docs/assets/oaf-logo.svg" alt="OpenAgentFlow Logo" width="160"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# OpenAgentFlow
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
[](#multi-llm--runtime-integration)
|
|
12
12
|
[](#multi-llm--runtime-integration)
|
|
13
13
|
[](https://marketplace.visualstudio.com/items?itemName=OpenAgentFlow.openagentflow-support)
|
|
14
|
-
[](docs/index.md)
|
|
14
|
+
[](https://github.com/OpenAgentFlow/OpenAgentFlow/blob/main/docs/index.md)
|
|
15
15
|
[](https://opensource.org/licenses/MIT)
|
|
16
16
|
|
|
17
17
|
> *What OpenAPI is for REST APIs, OpenAgentFlow (`.oaf`) is for AI agent workflows.*
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
-
<img src="docs/assets/demo.gif" alt="OpenAgentFlow Demo" width="800"/>
|
|
20
|
+
<img src="https://raw.githubusercontent.com/OpenAgentFlow/OpenAgentFlow/main/docs/assets/demo.gif" alt="OpenAgentFlow Demo" width="800"/>
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
### ⚡ The 60-Second Example
|
|
@@ -150,16 +150,16 @@ If you prefer creating workflows from scratch in your own workspace without clon
|
|
|
150
150
|
oaf run my-workflow.oaf --input data.json
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
> 📖 **For the full guide, see [Documentation](docs/index.md)**.
|
|
153
|
+
> 📖 **For the full guide, see [Documentation](https://github.com/OpenAgentFlow/OpenAgentFlow/blob/main/docs/index.md)**.
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
157
|
## 📖 Documentation
|
|
158
158
|
|
|
159
|
-
The complete documentation is available in
|
|
160
|
-
* **[Language Reference](docs/language/oaf-language.md):** Complete `.oaf` syntax.
|
|
161
|
-
* **[Formal Specs](spec/SPEC.md):** EBNF grammar, semantic rules, and IR schema.
|
|
162
|
-
* **[API & CLI Ref](docs/cli/cli-reference.md):** Programmatic API and command-line flags.
|
|
159
|
+
The complete documentation is available in our GitHub `docs/` directory, including:
|
|
160
|
+
* **[Language Reference](https://github.com/OpenAgentFlow/OpenAgentFlow/blob/main/docs/language/oaf-language.md):** Complete `.oaf` syntax.
|
|
161
|
+
* **[Formal Specs](https://github.com/OpenAgentFlow/OpenAgentFlow/blob/main/spec/SPEC.md):** EBNF grammar, semantic rules, and IR schema.
|
|
162
|
+
* **[API & CLI Ref](https://github.com/OpenAgentFlow/OpenAgentFlow/blob/main/docs/cli/cli-reference.md):** Programmatic API and command-line flags.
|
|
163
163
|
|
|
164
164
|
---
|
|
165
165
|
|
|
@@ -253,7 +253,7 @@ When compiling to LangGraph, the runtime automatically manages providers. You ca
|
|
|
253
253
|
|
|
254
254
|
## 🤝 Contributing
|
|
255
255
|
|
|
256
|
-
We welcome contributions from developers, researchers, and engineers! Whether you want to pick up a [`good first issue`](https://github.com/OpenAgentFlow/openagentflow/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22), help build our planned Phase 5 target adapters (**Microsoft AutoGen** or **CrewAI**), or propose language enhancements, please check out our detailed [Contributing Guide](CONTRIBUTING.md) to get started.
|
|
256
|
+
We welcome contributions from developers, researchers, and engineers! Whether you want to pick up a [`good first issue`](https://github.com/OpenAgentFlow/openagentflow/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22), help build our planned Phase 5 target adapters (**Microsoft AutoGen** or **CrewAI**), or propose language enhancements, please check out our detailed [Contributing Guide](https://github.com/OpenAgentFlow/OpenAgentFlow/blob/main/CONTRIBUTING.md) to get started.
|
|
257
257
|
|
|
258
258
|
---
|
|
259
259
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openagentflow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "An open, portable specification for describing AI agent workflows using a human-readable text language.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "compiler/index.js",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"compiler",
|
|
20
20
|
"parser",
|
|
21
21
|
"adapters",
|
|
22
|
-
"examples",
|
|
23
22
|
"README.md",
|
|
24
23
|
"LICENSE"
|
|
25
24
|
],
|
package/examples/hello.oaf
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Three-agent pipeline: research → design → implement
|
|
2
|
-
workflow "Software Development" {
|
|
3
|
-
|
|
4
|
-
state {
|
|
5
|
-
requirements: string
|
|
6
|
-
analysis: string
|
|
7
|
-
architecture: string
|
|
8
|
-
implementation: string
|
|
9
|
-
status: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
agent Analyst {
|
|
13
|
-
instructions: """
|
|
14
|
-
Analyze the requirements document.
|
|
15
|
-
Identify key features, constraints, and acceptance criteria.
|
|
16
|
-
Produce a structured analysis.
|
|
17
|
-
"""
|
|
18
|
-
model: "gemma-4-26b-a4b-it"
|
|
19
|
-
temperature: 0.3
|
|
20
|
-
inputs: [requirements]
|
|
21
|
-
outputs: [analysis]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
agent Architect {
|
|
25
|
-
instructions: """
|
|
26
|
-
Based on the analysis, design a technical architecture.
|
|
27
|
-
Include component diagrams, data flow, and API contracts.
|
|
28
|
-
"""
|
|
29
|
-
model: "gemma-4-26b-a4b-it"
|
|
30
|
-
|
|
31
|
-
temperature: 0.5
|
|
32
|
-
inputs: [analysis]
|
|
33
|
-
outputs: [architecture]
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
agent Developer {
|
|
37
|
-
instructions: """
|
|
38
|
-
Implement the solution based on the architecture.
|
|
39
|
-
Write clean, tested, production-ready code.
|
|
40
|
-
"""
|
|
41
|
-
model: "gemma-4-26b-a4b-it"
|
|
42
|
-
temperature: 0.2
|
|
43
|
-
tools: ["code_interpreter", "file_writer"]
|
|
44
|
-
inputs: [architecture]
|
|
45
|
-
outputs: [implementation, status]
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
flow {
|
|
49
|
-
start -> Analyst
|
|
50
|
-
Analyst -> Architect
|
|
51
|
-
Architect -> Developer
|
|
52
|
-
Developer -> end
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
config {
|
|
56
|
-
version: "0.1"
|
|
57
|
-
timeout_seconds: 600
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source_text": "The landscape of artificial intelligence is rapidly shifting from single, monolithic large language models to complex, multi-agent systems. Rather than relying on one generalized AI to handle an entire task from start to finish, developers are increasingly building collaborative environments where specialized agents handle distinct parts of a pipeline. For example, one agent might be responsible for gathering and parsing external data, while another focuses exclusively on executing code or validating the output against strict constraints. This modular approach not only improves the reliability of the final output but also allows for smaller, highly optimized models to outperform larger ones on specific sub-tasks.\n\nHowever, orchestrating these multi-agent workflows introduces significant architectural challenges. As agents interact, system designers must maintain a robust state management layer to track the context and history of the process, ensuring that no critical information is lost between handoffs. Furthermore, defining clear communication protocols is essential to prevent infinite loops and ensure that agents trigger each other in the correct sequence. Error handling also becomes exponentially more complex, requiring fallback mechanisms that can gracefully recover when a single agent fails to complete its designated role or produces a hallucination.\n\nTo address these bottlenecks, the developer community is moving toward standardized, open-source frameworks designed to specify and execute multi-agent workflows efficiently. By providing a unified syntax for agent definitions, prompt caching strategies, and environment configurations, these frameworks lower the barrier to entry for engineering complex AI applications. As these tools mature, we can expect a future where deploying a resilient, autonomous team of AI agents is as straightforward as containerizing a traditional web application, fundamentally changing how software is built and maintained."
|
|
3
|
-
}
|
package/examples/summarize.oaf
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
workflow "Quick Summarize" {
|
|
2
|
-
|
|
3
|
-
state {
|
|
4
|
-
source_text: string @required
|
|
5
|
-
extracted_points: string
|
|
6
|
-
summary: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
agent Extractor {
|
|
10
|
-
instructions: "Read the `source_text` and extract the most important facts into a concise bulleted list."
|
|
11
|
-
model: "gemini-2.0-flash"
|
|
12
|
-
inputs: [source_text]
|
|
13
|
-
outputs: [extracted_points]
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
agent Synthesizer {
|
|
17
|
-
instructions: "Take the extracted points and weave them into a clear, cohesive summary paragraph."
|
|
18
|
-
model: "gpt-4o"
|
|
19
|
-
inputs: [extracted_points]
|
|
20
|
-
outputs: [summary]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
flow {
|
|
24
|
-
start -> Extractor
|
|
25
|
-
Extractor -> Synthesizer
|
|
26
|
-
Synthesizer -> end
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"customer_email": "Subject: URGENT: Extremely disappointed with Order #48291 - Damaged Items and Poor Service\n\nTo Whom It May Concern,\n\nI am writing to express my immense frustration regarding my recent order (#48291), placed on July 5th. \n\nNot only did the package arrive a full week past your guaranteed delivery date, but when I finally opened it today, two of the three items I ordered were completely shattered. The box had barely any bubble wrap or protective packaging, which is frankly unacceptable for fragile goods. \n\nI ordered these specifically for an important event happening tomorrow, and now I am left scrambling for a last-minute replacement because of your shipping department's negligence. Furthermore, I tried calling your customer support line three times today, only to be left on hold for over 30 minutes each time before being disconnected.\n\nI expect a full refund for this order immediately. I have attached photos of the damaged items and the inadequate packaging to this email. \n\nI look forward to your prompt response. If I do not hear back within 24 hours to resolve this issue, I will be forced to dispute the charge with my credit card company.\n\nRegretfully,\n\nAlex Mercer\nalex.mercer@email.com\n(555) 123-4567"
|
|
3
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// A linear workflow that triages inbound messages and drafts replies.
|
|
2
|
-
workflow "SupportTriage" {
|
|
3
|
-
|
|
4
|
-
state {
|
|
5
|
-
customer_email: string @required
|
|
6
|
-
categories: list[string]
|
|
7
|
-
urgency: int
|
|
8
|
-
draft_response: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
flow {
|
|
12
|
-
start -> Classifier
|
|
13
|
-
Classifier -> Drafter
|
|
14
|
-
Drafter -> end
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
config {
|
|
18
|
-
version: "1.0"
|
|
19
|
-
runtime: "langgraph"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
agent Classifier {
|
|
23
|
-
model: "gemini-3.1-flash-lite"
|
|
24
|
-
temperature: 0.1
|
|
25
|
-
instructions: """
|
|
26
|
-
Analyze the inbound customer_email.
|
|
27
|
-
Determine the issue category (e.g., Billing, TechSupport, FeatureRequest).
|
|
28
|
-
Assign an urgency score from 1 (routine) to 5 (critical escalation).
|
|
29
|
-
"""
|
|
30
|
-
inputs: [customer_email]
|
|
31
|
-
outputs: [categories, urgency]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
agent Drafter {
|
|
35
|
-
model: "gemma-4-26b-a4b-it"
|
|
36
|
-
temperature: 0.7
|
|
37
|
-
instructions: """
|
|
38
|
-
Write a polite, empathetic response addressing the customer's issue.
|
|
39
|
-
Tailor the tone based on the categories and urgency.
|
|
40
|
-
If urgency is 4 or 5, assure them a senior human agent is being alerted.
|
|
41
|
-
Leave placeholders like [Your Name] for account details.
|
|
42
|
-
"""
|
|
43
|
-
inputs: [customer_email, categories, urgency]
|
|
44
|
-
outputs: [draft_response]
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|