Agents API
Agent, Task, and AgentExecutor public fields.
agenticx.core — Agent API
This page is the SDK surface in agenticx.core. Near / Studio chat uses AgentRuntime, not this executor. Source lives under agenticx/core/, not agenticx/agents/.
Agent
agenticx.core.agent.Agent (Pydantic). Common fields:
| Field | Type | Notes | |
|---|---|---|---|
id | str | UUID if omitted | |
name / role / goal | str | Required persona | |
backstory | `str \ | None` | Optional |
organization_id | str | Default "default-org" | |
tools | list | Bound BaseTool instances | |
max_iterations | int | Default 25. There is no max_iter or verbose |
Task
agenticx.core.task.Task:
| Field | Type | Notes | |
|---|---|---|---|
id | str | UUID if omitted | |
description | str | Required | |
expected_output | str | What “done” looks like | |
agent_id | `str \ | None` | Optional assignment |
context | dict | Extra context | |
dependencies | list[str] | Other task IDs |
AgentExecutor
Construct with a provider. Pass the agent at run time.
python
1from agenticx import Agent, Task, AgentExecutor2from agenticx.llms import OpenAIProvider3from agenticx.tools import tool45@tool6def echo(text: str) -> str:7 """Return the input text."""8 return text910agent = Agent(11 name="Assistant",12 role="Helper",13 goal="Assist users",14 tools=[echo],15)16task = Task(description="Say hello", expected_output="A short greeting")1718executor = AgentExecutor(19 llm_provider=OpenAIProvider(model="gpt-4o"),20 tools=[echo],21 max_iterations=50,22)23result = executor.run(agent=agent, task=task)
__init__ also accepts prompt_manager, compaction_config, enable_context_compilation, execution_lane. It does not take agent=, llm=, memory=, or human_in_the_loop=.
run(agent, task, session_key=None) returns a dict. Concurrent calls with the same session_key serialize when an ExecutionLane is set.
Tool decorator
python
1from agenticx.tools import tool23@tool4def my_tool(param: str) -> str:5 """One-line description.67 Args:8 param: What the argument is9 """10 return f"Processed: {param}"
See Tools and Agent runtime.