task
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
Job llmling_agent.models.task A task is a piece of work that can be executed by an agent. |
||
Job llmling_agent.models.task |
||
Knowledge llmling_agent.models.knowledge Collection of context sources for an agent. |
||
ToolInfo llmling_agent.tools.base Information about a registered tool. |
🛈 DocStrings¶
Job
¶
Bases: BaseModel
A task is a piece of work that can be executed by an agent.
Requirements: - The agent must have compatible dependencies (required_dependency) - The agent must produce the specified result type (required_return_type)
Equipment: - The task provides necessary tools for execution (tools) - Tools are temporarily available during task execution
Source code in src/llmling_agent/models/task.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 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 |
|
description
class-attribute
instance-attribute
¶
description: str | None = None
Human-readable description of what this task does
knowledge
class-attribute
instance-attribute
¶
knowledge: Knowledge | None = None
Optional knowledge sources for this task: - Simple file/URL paths - Rich resource definitions - Prompt templates
min_context_tokens
class-attribute
instance-attribute
¶
min_context_tokens: int | None = None
Minimum amount of required context size.
name
class-attribute
instance-attribute
¶
name: str | None = Field(None)
Technical identifier (automatically set from config key during registration)
prompt
instance-attribute
¶
The task instruction/prompt.
required_dependency
class-attribute
instance-attribute
¶
required_dependency: ImportString[type[TDeps]] | None = Field(
default=None, validate_default=True
)
Dependencies or context data needed for task execution
required_return_type
class-attribute
instance-attribute
¶
required_return_type: ImportString[type[TResult]] = Field(
default="str", validate_default=True
)
Expected type of the task result.
requires_vision
class-attribute
instance-attribute
¶
requires_vision: bool = False
Whether the agent requires vision
tools
class-attribute
instance-attribute
¶
Tools needed for this task.
can_be_executed_by
async
¶
Check if agent meets all requirements for this task.
Source code in src/llmling_agent/models/task.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
get_tools
¶
Get all tools as ToolInfo instances.
Source code in src/llmling_agent/models/task.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|