Building an autonomous AI executor (Manus-style, but task-based) #4141
Replies: 5 comments
-
|
Great project concept! Here's an architectural approach I've used for autonomous multi-agent systems: Core Architecture1. Shared State Over Message Passing Instead of agents communicating directly, use a central state object: state = {
"task": "Create Shopify product listings",
"subtasks": [
{"id": 1, "description": "Extract product info", "status": "completed"},
{"id": 2, "description": "Generate descriptions", "status": "in_progress"},
{"id": 3, "description": "Upload to Shopify", "status": "pending"}
],
"requires_human": False,
"human_input_needed": None
}This pattern (called stigmergy) reduces token usage by ~80% and makes debugging trivial — you just inspect the state file. 2. Human-in-the-Loop via State if state["confidence"] < 0.8 or state["cost_estimate"] > THRESHOLD:
state["requires_human"] = True
state["human_input_needed"] = "Approve $50 API spend?"The human reviews and modifies state directly, then agents continue. 3. Autonomous Task Decomposition One "planner" agent writes subtasks to state. Worker agents pick up tasks based on their capabilities: for subtask in state["subtasks"]:
if subtask["status"] == "pending" and agent.can_handle(subtask):
subtask["status"] = "in_progress"
subtask["assigned_to"] = agent.idWhy This Works for Shopify Operators
Working implementation: https://github.com/KeepALifeUS/autonomous-agents Happy to discuss specific patterns for your use case! |
Beta Was this translation helpful? Give feedback.
-
|
Cool project. One thing that'll hit you fast once this is running against real Shopify tasks: the agent will work great for 90% of flows and then randomly fail on the other 10% in ways you can't predict or permanently fix. The architecture @KeepALifeUS shared is solid for the orchestration layer. The piece I'd add is something at the model/routing level that tracks which model + provider combo is actually succeeding for each task type and shifts traffic when something degrades. Otherwise you end up manually debugging failures that resolve themselves and then reappear differently. Built Kalibr for exactly this. Happy to chat more if you want to talk about the reliability side of autonomous execution. |
Beta Was this translation helpful? Give feedback.
-
|
Autonomous task-based executors are fascinating! At RevolutionAI (https://revolutionai.io) we have built similar systems. Key patterns that worked: Task decomposition:
Execution safety:
Observability:
Recovery:
The Manus-style approach is promising but needs guardrails for production. Happy to share our architecture if useful! |
Beta Was this translation helpful? Give feedback.
-
|
Great project scope! Here is an architecture that works: Core components: CrewAI implementation: from crewai import Agent, Crew, Task, Process
planner = Agent(
role="Task Planner",
goal="Break complex tasks into actionable steps",
tools=[task_decomposition_tool],
allow_delegation=True
)
executor = Agent(
role="Task Executor",
goal="Execute steps using available tools",
tools=[shopify_api, web_browser, email_sender],
verbose=True
)
reviewer = Agent(
role="Quality Reviewer",
goal="Verify task completion, escalate if stuck",
tools=[human_escalation_tool]
)
crew = Crew(
agents=[planner, executor, reviewer],
process=Process.sequential,
manager_llm=gpt4 # For coordination
)Human-in-the-loop pattern: @tool
def request_human_input(question: str, context: str) -> str:
"""Ask human for guidance when stuck or uncertain."""
# Send notification, wait for response
return await human_interface.ask(question, context, timeout=3600)
# Agent decides when to use this
executor.tools.append(request_human_input)For Shopify automation:
Key learnings:
We build autonomous agents at Revolution AI — happy to share more architecture patterns. |
Beta Was this translation helpful? Give feedback.
-
|
Good architecture target. A few hard-won lessons building autonomous executors for production: The task decomposition layer is where most projects fail first The Planner agent needs to produce tasks with explicit, machine-checkable completion criteria — not just descriptions. Otherwise the Executor never knows if it is done. from pydantic import BaseModel
from typing import Literal
class Task(BaseModel):
id: str
description: str
success_criteria: str # e.g., "Shopify API returns 200 with product.id"
estimated_cost_usd: float
requires_human_approval: bool
tools_required: list[str]
depends_on: list[str] = []
# Planner writes these to shared state
# Executor verifies success_criteria before marking doneFor Shopify specifically: API budget is the critical guardrail Shopify has rate limits, but the bigger risk for autonomous agents is unintended mutations — bulk updates, accidental deletions, mass emails. The practical pattern is tiered tool access: class ToolTier(Enum):
READ_ONLY = 0 # Free to use, no approval
LOW_RISK_WRITE = 1 # Log + proceed
HIGH_RISK_WRITE = 2 # Require human confirmation
# Agent proposes action → checks tier → decides to proceed or escalate
if tool.tier == ToolTier.HIGH_RISK_WRITE:
state["requires_human"] = True
state["pending_approval"] = {"tool": tool.name, "args": args, "estimated_impact": ...}
return # Halt until human approvesOn paying for external AI services autonomously Once your executor is calling LLMs, image generation, or other paid APIs as tools, the payment model matters a lot. We use GPU-Bridge for this — 30 AI services (LLM, image gen, embeddings, TTS, STT, video, PDF parsing...) via a single
# Example: autonomous product description generation
response = requests.post(
"https://api.gpubridge.xyz/run",
headers={"Authorization": "Bearer TASK_BUDGET_KEY"},
json={
"service": "llm",
"model": "llama-3.3-70b",
"messages": [{"role": "user", "content": f"Write Shopify product description for: {product_data}"}]
}
)
# $0.001/call, task stops when budget exhaustedWhat to build first
The "ask human only when required" goal is the last piece, not the first. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi crewAI community,
I’m not looking to hire freelancers or sell anything.
I want to build an autonomous AI tool (Manus-style behavior, not UI) that can:
Use case: Shopify operators & solo founders who want real automation.
I’m looking for:
Any guidance is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions