The Agent Is an Implementation Detail: Task-First Orchestration in Java
Most agent frameworks start with the agent. You define a role, write a goal, add a backstory, choose a model. Then you write a task and wire the agent to it. Then you pass both to a crew or ensembl...

Source: DEV Community
Most agent frameworks start with the agent. You define a role, write a goal, add a backstory, choose a model. Then you write a task and wire the agent to it. Then you pass both to a crew or ensemble. Three objects defined and wired together before the actual work is even described. It works. But for a lot of use cases, that agent definition is accidental complexity. You're not thinking "I need a Researcher persona with a carefully tuned goal statement." You're thinking "I need this research done, then I need a report written from it." The agent is an implementation detail. The task is the actual unit of work. That's the central insight behind the task-first design in AgentEnsemble. The Old Pattern The v1.x API required explicit agent definitions. Here's a two-task research-writer pipeline: Agent researcher = Agent.builder() .role("Senior Researcher") .goal("Find comprehensive information about {{topic}}") .background("Expert at synthesizing information from multiple sources") .build();