Skip to content

Agents and Workflows

Multi-agent orchestration, nested agents, and A2A protocol tools.

← Prebuilt Tools overview

ToolExtraDescription
graphbaseMulti-agent graphs with nodes and handoff edges.
agent_graphbasePersistent agent graphs with shared state.
journalbaseStructured task lists and execution logs.
swarmbaseCoordinate specialist agents with handoffs.
handoff_to_userbasePause for human input or full handoff.
use_agentbaseSpawn a nested agent event loop.
thinkbaseParallel reasoning branches.
use_llmbaseNested LLM call with custom prompt.
workflowbaseSequenced task pipelines with dependencies.
batchbaseInvoke multiple tools in one model turn.
a2a_discover_agenta2a-clientDiscover remote A2A agents. Register via A2AClientToolProvider.
a2a_list_discovered_agentsa2a-clientList discovered A2A agents.
a2a_send_messagea2a-clientSend a message to a remote A2A agent.

graph

Multi-agent graphs with nodes and handoff edges.

python
from elsai_tools.graph import graph
ParameterTypeRequiredDescription
actionstrYescreate, execute, status, list, or delete
graph_idstrNoGraph identifier
topologyDictNoNodes and edges
taskstrNoTask for execute
model_providerstrNoModel provider
toolsList[str]NoTool names

agent_graph

Persistent agent graphs with shared state.

python
from elsai_tools.agent_graph import agent_graph
ParameterTypeRequiredDescription
actionstrYesGraph action
graph_idstrNoGraph identifier
topologydictNoGraph topology
taskstrNoExecution task
messagestrNoMessage to send

journal

Structured task lists and execution logs.

python
from elsai_tools.journal import journal
ParameterTypeRequiredDescription
actionstrYesJournal action
taskstrNoTask entry
logstrNoLog entry
datestrNoDate filter

swarm

Coordinate specialist agents with handoffs.

python
from elsai_tools.swarm import swarm
ParameterTypeRequiredDescription
taskstrYesTask description
agentsList[Dict[str, Any]]YesList of agent configs
max_handoffsintNoMax handoffs
max_iterationsintNoMax iterations
execution_timeoutfloatNoTotal timeout in seconds

handoff_to_user

Pause for human input or full handoff.

python
from elsai_tools.handoff_to_user import handoff_to_user
ParameterTypeRequiredDescription
messagestrYesMessage to show the user
breakout_of_loopboolNoExit agent loop entirely

use_agent

Spawn a nested agent event loop.

python
from elsai_tools.use_agent import use_agent
ParameterTypeRequiredDescription
promptstrYesUser prompt
system_promptstrYesSystem prompt
toolsList[str]NoTool names
model_providerstrNoModel provider
model_settingsDict[str, Any]NoModel settings dict

think

Parallel reasoning branches.

python
from elsai_tools.think import think
ParameterTypeRequiredDescription
thoughtstrYesReasoning prompt
cycle_countintYesNumber of branches
system_promptstrYesSystem prompt
toolsList[str]NoTool names
model_providerstrNoModel provider

use_llm

Nested LLM call with custom prompt.

python
from elsai_tools.use_llm import use_llm
ParameterTypeRequiredDescription
promptstrYesLLM prompt
system_promptAnyNoSystem prompt
model_providerAnyNoModel provider
model_settingsAnyNoModel settings dict

workflow

Sequenced task pipelines with dependencies.

python
from elsai_tools.workflow import workflow
ParameterTypeRequiredDescription
actionstrYesWorkflow action
workflow_idstrNoWorkflow identifier
tasksList[Dict[str, Any]]NoTask definitions with dependencies

batch

Invoke multiple tools in one model turn.

python
from elsai_tools.batch import batch
ParameterTypeRequiredDescription
tool_callslist[dict]YesList of tool invocations

a2a_discover_agent

Discover remote A2A agents. Register via A2AClientToolProvider.

python
from elsai_tools.a2a_client import A2AClientToolProvider

provider = A2AClientToolProvider(known_agent_urls=["http://agent.example.com"])
agent = Agent(tools=provider.tools)

Extra: a2a-client

ParameterTypeRequiredDescription
urlstrYesA2A agent endpoint URL

a2a_list_discovered_agents

List discovered A2A agents.

Extra: a2a-client

No parameters.

a2a_send_message

Send a message to a remote A2A agent.

Extra: a2a-client

ParameterTypeRequiredDescription
message_textstrYesMessage content
target_agent_urlstrYesAgent endpoint URL
message_idstrNoOptional message ID

Copyright © 2026 Elsai Foundry.