Nexevo.aiNexevo.ai
← All examples
Agent / Automation

Multi-modal combo — research + math + image generation

One task chains web_search + python_exec + generate_image; the agent orchestrates steps automatically.

Python
python
from nexevo_ai import Nexevo
client = Nexevo()

# Multi-modal combo agent — web search → compute pricing table → generate cover image.
# internally 4-6 steps:
#   1. tool_call web_search(query="2026 latest LLM gateway competitors")
#   2. tool_call python_exec(expression="...")  # compute price avg/median
#   3. tool_call generate_image(prompt="...")  # generate cover poster
#   4. final_answer text summary + image URL

job = client.agents.run(
    task=(
        "Research mainstream H1 2026 LLM gateway SaaS (OpenRouter / Together / "
        "Nexevo / Helicone), fetch live data + compute average cost / 1M token,"
        "then generate_image to produce a minimalist comparison poster."
    ),
    tools=["web_search", "python_exec", "generate_image"],
    model="nexevo-auto",
    max_steps=8,
)

print(job["result"])
# Step 1 → Step 2 → Step 3 → Step 4 auto-chained,
# You only need final_answer to get: live research + numbers + poster — all in one delivery.

# Streaming version — see each step in real time
for ev in client.agents.run_stream(task="...", tools=["web_search", "python_exec", "generate_image"]):
    if ev["type"] == "step":
        print(f"[{ev['step']['type']}]", ev['step'].get("tool_name", ""), ev['step'].get("content", "")[:80])
Multi-modal combo — research + math + image generation — Nexevo Cookbook | Nexevo.ai