plan_provider
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AgentContext llmling_agent.agent.context Runtime context for agent execution. |
||
| PlanEntry llmling_agent.resource_providers.plan_provider A single entry in the execution plan. |
||
| PlanProvider llmling_agent.resource_providers.plan_provider Provides plan-related tools for agent planning and task management. |
||
| PlanUpdateEvent llmling_agent.resource_providers.plan_provider Event indicating plan state has changed. |
||
| ResourceProvider llmling_agent.resource_providers.base Base class for resource providers. |
🛈 DocStrings¶
Plan provider for agent planning and task management.
PlanEntry
dataclass
¶
A single entry in the execution plan.
Represents a task or goal that the assistant intends to accomplish as part of fulfilling the user's request.
Source code in src/llmling_agent/resource_providers/plan_provider.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
PlanProvider
¶
Bases: ResourceProvider
Provides plan-related tools for agent planning and task management.
This provider creates tools for managing agent plans and tasks, emitting domain events that can be handled by protocol adapters.
Source code in src/llmling_agent/resource_providers/plan_provider.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
__init__
¶
__init__() -> None
Initialize plan provider.
Source code in src/llmling_agent/resource_providers/plan_provider.py
56 57 58 59 | |
add_plan_entry
async
¶
add_plan_entry(
agent_ctx: AgentContext,
content: str,
priority: PlanEntryPriority = "medium",
index: int | None = None,
) -> str
Add a new plan entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_ctx
|
AgentContext
|
Agent execution context |
required |
content
|
str
|
Description of what this task aims to accomplish |
required |
priority
|
PlanEntryPriority
|
Relative importance (high/medium/low) |
'medium'
|
index
|
int | None
|
Optional position to insert at (default: append to end) |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Success message indicating entry was added |
Source code in src/llmling_agent/resource_providers/plan_provider.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
get_tools
async
¶
Get plan management tools.
Source code in src/llmling_agent/resource_providers/plan_provider.py
61 62 63 64 65 66 67 | |
remove_plan_entry
async
¶
remove_plan_entry(agent_ctx: AgentContext, index: int) -> str
Remove a plan entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_ctx
|
AgentContext
|
Agent execution context |
required |
index
|
int
|
Position of entry to remove (0-based) |
required |
Returns:
| Type | Description |
|---|---|
str
|
Success message indicating entry was removed |
Source code in src/llmling_agent/resource_providers/plan_provider.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
update_plan_entry
async
¶
update_plan_entry(
agent_ctx: AgentContext,
index: int,
content: str | None = None,
status: PlanEntryStatus | None = None,
priority: PlanEntryPriority | None = None,
) -> str
Update an existing plan entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_ctx
|
AgentContext
|
Agent execution context |
required |
index
|
int
|
Position of entry to update (0-based) |
required |
content
|
str | None
|
New task description |
None
|
status
|
PlanEntryStatus | None
|
New execution status |
None
|
priority
|
PlanEntryPriority | None
|
New priority level |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Success message indicating what was updated |
Source code in src/llmling_agent/resource_providers/plan_provider.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
PlanUpdateEvent
dataclass
¶
Event indicating plan state has changed.
Source code in src/llmling_agent/resource_providers/plan_provider.py
39 40 41 42 43 44 45 46 | |