Skip to main content

About Example Scenario

A content creation workflow using Deep Agent with specialized subagents for research, writing, and review to produce high-quality content.

Deep Agent Configuration

from upsonic import DeepAgent, Agent, Task

# Create content creation team
researcher = Agent(
    "openai/gpt-4o",
    name="researcher",
    system_prompt="You are a research and fact-checking expert"
)

writer = Agent(
    "openai/gpt-4o",
    name="writer",
    system_prompt="You are a content writing and editing expert"
)

reviewer = Agent(
    "openai/gpt-4o",
    name="reviewer",
    system_prompt="You are a content review and quality assurance expert"
)

# Create Deep Agent with content team
agent = DeepAgent(
    "openai/gpt-4o",
    subagents=[researcher, writer, reviewer]
)

Full Code

from upsonic import DeepAgent, Agent, Task

# Create content creation team
researcher = Agent(
    "openai/gpt-4o",
    name="researcher",
    system_prompt="You are a research and fact-checking expert"
)

writer = Agent(
    "openai/gpt-4o",
    name="writer",
    system_prompt="You are a content writing and editing expert"
)

reviewer = Agent(
    "openai/gpt-4o",
    name="reviewer",
    system_prompt="You are a content review and quality assurance expert"
)

# Create Deep Agent with content team
agent = DeepAgent(
    "openai/gpt-4o",
    subagents=[researcher, writer, reviewer]
)

# Execute content creation project
task = Task("""
Create a comprehensive blog post series about machine learning:
- Research latest trends and developments
- Write 5 detailed articles with examples
- Include code samples and tutorials
- Review for accuracy and clarity
- Format for web publication
""")

result = agent.do(task)
print(result)