Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/concepts/zee-workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ The Zero-Employee Enterprise (ZEE) is a new business model where traditional wor
A ZEE workflow contains a couple of components:

- The [Agents](/concepts/agents) that are used to solve the problem.
- The **breakdown** agent breaks down the final goal into smaller tasks and assigns them to the agents provided to the workflow.
- The **mastermind** agent facilitate communication between all the agents via necessary context for the final goal.
- The **planner** agent breaks down the final goal into smaller tasks and assigns them to the agents provided to the workflow.
- The **router** agent facilitates communication between all the agents via necessary context for the final goal.
- The **endgame** agent is the final agent that takes in the results from all the agents and formulates the final output.

> These agent names are reserved by the ZEE workflow. Make sure not to use these names for your agents.

## Creating a Workflow

To create a workflow, you need to create a new instance of the `ZeeWorkflow` class.
Expand Down
20 changes: 10 additions & 10 deletions docs/get-started/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The Agent SDK supports single model inference calls to multi-agent systems that
flowchart LR
%% Styling
classDef input fill:#ffffff,stroke:#000000,stroke-width:2px, color:#000
classDef breakdown fill:#f0f0f0,stroke:#000000,stroke-width:2px, color:#000
classDef planner fill:#f0f0f0,stroke:#000000,stroke-width:2px, color:#000
classDef agent fill:#e0e0e0,stroke:#000000,stroke-width:2px, color:#000
classDef tool fill:#d0d0d0,stroke:#000000,stroke-width:2px, color:#000
classDef state fill:#fafafa,stroke:#000000,stroke-width:2px,stroke-dasharray: 5 5, color:#000
Expand All @@ -25,8 +25,8 @@ flowchart LR

subgraph "Zero-Employee Enterprise"
direction LR
breakdown{"🔍 Breakdown Agent"}
mastermind{"🧠 Mastermind Agent"}
planner{"🔍 Planner Agent"}
router{"🧠 Router Agent"}
agent1("🤖 Primary Agent")
agent2("🤖 Support Agent")
agent3("🤖 Task Agent")
Expand All @@ -45,20 +45,20 @@ flowchart LR
end

%% Connections
inp1 --> breakdown
breakdown --> mastermind
mastermind <--> agent1
mastermind <--> agent2
mastermind <--> agent3
inp1 --> planner
planner --> router
router <--> agent1
router <--> agent2
router <--> agent3
agent1 <--> tool1
agent2 <--> tool2
agent3 <--> tool3
agent3 <--> tool4

%% Apply styles
class inp1 input
class breakdown breakdown
class mastermind breakdown
class planner planner
class router router
class agent1,agent2,agent3 agent
class tool1,tool2,tool3,tool4 tool
class id1 state
Expand Down
19 changes: 8 additions & 11 deletions packages/ai-agent-sdk/src/core/agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { AgentConfig, AgentGenerateParameters, AgentResponse } from ".";
import { systemMessage } from "../../functions";
import { Base } from "../base";
import { LLM } from "../llm";
import { type CoreMessage } from "ai";

export class Agent extends Base {
private _config: AgentConfig;
Expand All @@ -26,21 +27,17 @@ export class Agent extends Base {
}

async generate(args: AgentGenerateParameters): Promise<AgentResponse> {
const _messages = [
systemMessage(this.description),
...(this.instructions?.map(systemMessage) ?? []),
...(args.messages ?? []),
] as CoreMessage[];

const response = await this._llm.generate(
{
...args,
tools: this._config.tools,
messages: [
systemMessage(this.description),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
...(this.instructions?.map((instruction) =>
systemMessage(instruction)
) ?? []),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
...(args.messages ?? []),
],
messages: _messages,
temperature: this._config.temperature,
},
true
Expand Down
Loading