data_juicer_agents#
DataJuicer Agent - A multi-agent data processing system
- data_juicer_agents.create_agent(name: str, sys_prompt: str, toolkit: Toolkit, description: str | None = None, model: ChatModelBase | None = None, formatter: FormatterBase | None = None, memory: MemoryBase | None = None, max_iters: int = 10, parallel_tool_calls: bool = False, **kwargs) ReActAgent[source]#
Create a ReActAgent with standardized configuration.
- Parameters:
name â Agent identifier
sys_prompt â System prompt template (supports {name} placeholder)
toolkit â Toolkit instance
model â Language model (defaults to GPT-4o)
formatter â Message formatter (defaults to OpenAIChatFormatter)
memory â Memory instance (defaults to InMemoryMemory)
max_iters â Maximum reasoning iterations
parallel_tool_calls â Enable parallel tool execution
**kwargs â Additional ReActAgent arguments
- Returns:
Configured ReActAgent instance
Example
>>> agent = create_agent( ... name="sql_expert", ... sys_prompt="You are {name}, a SQL database expert", ... tools=sql_tools ... )