Creating workflows

DigitalFate enables you to move beyond isolated LLM calls and build structured, reusable, and intelligent workflows using tasks, agents, and tools. Workflows in DigitalFate mirror real-world processes whether you're building a research assistant, automating documentation, or orchestrating multi-agent collaboration.


🔄 What Is a Workflow?

A workflow in DigitalFate is a sequence or system of tasks, often executed by one or more agents with optional tools, memory, and logic. These workflows can be:

  • Linear (task A → task B → task C)

  • Parallel (task A & task B simultaneously)

  • Conditional (task A → if result: task B else: task C)

  • Recursive (agents spawn subtasks dynamically)


🧱 Building Blocks of a Workflow

  1. Task A structured objective.

    pythonCopyEdittask = Task(description="Summarize a recent AI article")
  2. Tools External integrations to gather or transform data.

    pythonCopyEdittask.tools = [Search, PDFReader]
  3. Agent A configuration that determines how a task is approached.

    pythonCopyEditagent = AgentConfiguration(job_title="Researcher", memory=True)
  4. Knowledge Base (optional) Provides additional private or public context.

    pythonCopyEditkb = KnowledgeBase(urls=["https://openai.com/research"])
    agent.knowledge_base = kb
  5. Execution Run the task with your agent(s).

    pythonCopyEditclient.agent(agent, task)

🔁 Workflow Example: Research Pipeline

pythonCopyEditfrom digitalfate import Task, AgentConfiguration, digitalfateClient
from digitalfate.client.tools import Search, PDFReader

client = digitalfateClient("localserver")
client.set_config("OPENAI_API_KEY", "your_key")

# Task 1: Research
task1 = Task(description="Find top 3 articles on AI regulation", tools=[Search])

# Task 2: Extract key points
task2 = Task(description="Extract key insights from the AI articles", tools=[PDFReader])

# Agent
research_agent = AgentConfiguration(
    job_title="AI Policy Analyst",
    memory=True,
)

# Run tasks in sequence
client.agent(research_agent, task1)
client.agent(research_agent, task2)

# Print results
print(task2.response)

This can be extended into branching workflows or scheduled task loops.


🤖 Multi-Agent Workflows

Assign different agents to different steps for modular specialization.

pythonCopyEditclient.parallel_agents(
    [marketing_agent, technical_writer],
    [task_market_research, task_tech_docs]
)

Example:

  • Agent A researches.

  • Agent B drafts content.

  • Agent C reviews or summarizes.

Each agent maintains their own memory, tools, and goals like a functioning AI team.


🔁 Recursive Workflows (Self-Decomposing Tasks)

DigitalFate agents (v2) can break down a complex task into subtasks recursively.

pythonCopyEdittask = Task(description="Build a competitive analysis of Anthropic, OpenAI, and DeepMind")
client.agent(autonomous_strategy_agent, task)

Subtasks generated dynamically:

  • “Find revenue data for each company”

  • “Analyze AI model strengths and weaknesses”

  • “Compare hiring trends”

This enables hands-free research, ideation, and analysis.


🧠 Memory-Based Workflows

Memory-enabled workflows allow your agent to remember key decisions, preferences, and facts across sessions or task chains.

pythonCopyEditagent = AgentConfiguration(agent_id="workflow_agent", memory=True)

Memory is automatically retrieved and updated per interaction ideal for long-term projects, planning assistants, or LLM-based advisors.


🧰 Tool-Driven Workflow Customization

DigitalFate tools can be chained or scoped by workflow stage:

pythonCopyEdittask_research.tools = [Search]
task_analysis.tools = [PDFReader, CodeInterpreter]

Custom tools can be added in a single line of code, enabling domain-specific automations like:

  • Database queries

  • Internal API lookups

  • Enterprise knowledge access


🖥️ Human-Like Interaction Workflow

Use enable_computer_use = True in tasks to simulate a human navigating web interfaces, filling forms, or clicking buttons.

Example:

  • Task: “Apply to three AI job postings”

  • Tools: Browser + Computer Use

  • Output: Application logs with screenshots and status


⚙️ Workflow Chaining with MCP

With MCP (Multi-Client Processing), you can:

  • Chain multiple workflows as microservices

  • Trigger workflows across distributed agents

  • Scale task execution across endpoints and teams

Use this for SaaS-style agents or high-throughput enterprise use cases.


🌐 SaaS Workflow Example

Workflow:

  1. User uploads a PDF.

  2. Agent extracts insights.

  3. Agent emails a summary report.

All of this can be automated and served via a REST API or UI connected to DigitalFate’s back end.


📊 Use Cases

Use Case
Workflow Style
Agent Type

Competitive research

Recursive

Analyst

Email drafting

Linear

Assistant

Report generation

Parallel

Editor + Reviewer

Website testing

Human-simulated

QA Agent

SaaS automation

API-triggered

Workflow Bot


Workflows are the heartbeat of DigitalFate. They allow you to transform single-task agents into fully orchestrated AI systems that scale, think, and perform like intelligent teams.

Last updated