AgentContext
Base classes¶
Name | Children | Inherits |
---|---|---|
NodeContext llmling_agent.messaging.context NodeContext(*, node_name: 'str', pool: 'AgentPool | None' \= None, config: 'NodeConfig', definition: 'AgentsManifest', current_prompt: 'str | None' \= None, in_async_context: 'bool' \= False, input_provider: 'InputProvider | None' \= None) |
||
Generic typing Abstract base class for generic types. |
⋔ Inheritance diagram¶
graph TD
94004562490944["context.AgentContext"]
94004561878944["context.NodeContext"]
94004505984624["typing.Generic"]
140104485245120["builtins.object"]
94004561878944 --> 94004562490944
94004505984624 --> 94004561878944
140104485245120 --> 94004505984624
94004505984624 --> 94004562490944
🛈 DocStrings¶
Bases: NodeContext[TDeps]
Runtime context for agent execution.
Generically typed with AgentContext[Type of Dependencies]
Source code in src/llmling_agent/agent/context.py
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 |
|
model_settings
class-attribute
instance-attribute
¶
Model-specific settings.
runtime
class-attribute
instance-attribute
¶
runtime: RuntimeConfig | None = None
Reference to the runtime configuration.
create_default
classmethod
¶
create_default(
name: str,
capabilities: Capabilities | None = None,
deps: TDeps | None = None,
pool: AgentPool | None = None,
input_provider: InputProvider | None = None,
) -> AgentContext[TDeps]
Create a default agent context with minimal privileges.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the agent |
required |
capabilities
|
Capabilities | None
|
Optional custom capabilities (defaults to minimal access) |
None
|
deps
|
TDeps | None
|
Optional dependencies for the agent |
None
|
pool
|
AgentPool | None
|
Optional pool the agent is part of |
None
|
input_provider
|
InputProvider | None
|
Optional input provider for the agent |
None
|
Source code in src/llmling_agent/agent/context.py
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 |
|
handle_confirmation
async
¶
Handle tool execution confirmation.
Returns True if: - No confirmation handler is set - Handler confirms the execution
Source code in src/llmling_agent/agent/context.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|