Skip to content

Agents API

Agent configuration and management.

AgentConfig

Configuration for an agent.

from legionhercules.core.agent import AgentConfig

config = AgentConfig(
    name="my_agent",
    description="A helpful agent",
    model="llama3.2",
    temperature=0.7,
    max_tokens=4096,
    system_prompt="You are a helpful assistant.",
    tools=["file_read", "bash"],
    max_iterations=10,
)

Parameters

Parameter Type Default Description
name str required Agent name
description str "" Agent description
model str "llama3.2" Ollama model
temperature float 0.7 Response creativity
max_tokens int 4096 Max tokens
system_prompt str "" System instructions
tools list [] Enabled tools
max_iterations int 10 Max tool iterations