sofias-sdk-lite 0.4.1__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/PKG-INFO +18 -3
  2. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/README.md +17 -2
  3. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/pyproject.toml +1 -1
  4. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/pyproject.toml.orig +1 -1
  5. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/__init__.py +14 -0
  6. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/LICENSE +0 -0
  7. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/__init__.py +0 -0
  8. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/agent.py +0 -0
  9. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/agent_builder.py +0 -0
  10. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/agent_config.py +0 -0
  11. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/execution_context.py +0 -0
  12. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/middleware.py +0 -0
  13. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/response_workflow.py +0 -0
  14. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/agent/streaming.py +0 -0
  15. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/config/__init__.py +0 -0
  16. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/config/agent_settings.py +0 -0
  17. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/config/defaults.py +0 -0
  18. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/config/runtime_config.py +0 -0
  19. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/config/sdk_config.py +0 -0
  20. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/config/source.py +0 -0
  21. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/contracts/__init__.py +0 -0
  22. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/contracts/agent_contracts.py +0 -0
  23. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/contracts/base_contracts.py +0 -0
  24. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/contracts/node_contracts.py +0 -0
  25. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/contracts/strict_contract.py +0 -0
  26. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/errors/__init__.py +0 -0
  27. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/errors/circuit_breaker.py +0 -0
  28. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/errors/error_handler.py +0 -0
  29. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/errors/exceptions.py +0 -0
  30. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/files.py +0 -0
  31. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/llm/__init__.py +0 -0
  32. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/llm/factory.py +0 -0
  33. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/llm/gateway.py +0 -0
  34. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/llm/openai_compatible.py +0 -0
  35. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/llm/protocol.py +0 -0
  36. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/llm/tokens.py +0 -0
  37. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/llm/tools.py +0 -0
  38. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/mcp.py +0 -0
  39. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/messaging/__init__.py +0 -0
  40. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/messaging/models.py +0 -0
  41. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/__init__.py +0 -0
  42. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/aggregator_config.py +0 -0
  43. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/aggregator_node.py +0 -0
  44. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/base_node.py +0 -0
  45. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/delegation_config.py +0 -0
  46. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/delegation_node.py +0 -0
  47. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/delegation_transport.py +0 -0
  48. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/function_node.py +0 -0
  49. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/llm_node.py +0 -0
  50. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/llm_node_config.py +0 -0
  51. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/plan_executor.py +0 -0
  52. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/planner_node.py +0 -0
  53. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/planning_models.py +0 -0
  54. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/nodes/prompt_assembler.py +0 -0
  55. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/observability/__init__.py +0 -0
  56. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/observability/_log.py +0 -0
  57. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/observability/events.py +0 -0
  58. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/observability/tool_events.py +0 -0
  59. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/observability/trace_context.py +0 -0
  60. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/observability/tracing.py +0 -0
  61. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/py.typed +0 -0
  62. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/__init__.py +0 -0
  63. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/client.py +0 -0
  64. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/config.py +0 -0
  65. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/consumer.py +0 -0
  66. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/delegation_transport.py +0 -0
  67. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/publisher.py +0 -0
  68. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/rpc_client.py +0 -0
  69. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/rabbitmq/types.py +0 -0
  70. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/routing/__init__.py +0 -0
  71. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/routing/router.py +0 -0
  72. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/routing/strategies.py +0 -0
  73. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/runner/__init__.py +0 -0
  74. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/runner/config.py +0 -0
  75. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/runner/runner.py +0 -0
  76. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/state/__init__.py +0 -0
  77. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/state/conversation_state.py +0 -0
  78. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/state/history.py +0 -0
  79. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/state/memory.py +0 -0
  80. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/tools.py +0 -0
  81. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/workflows/__init__.py +0 -0
  82. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/workflows/chat.py +0 -0
  83. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/workflows/null.py +0 -0
  84. {sofias_sdk_lite-0.4.1 → sofias_sdk_lite-0.4.2}/src/sofias_sdk_lite/workflows/streaming_chat.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sofias-sdk-lite
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Build agents on the Sofias agent graph and run them over RabbitMQ.
5
5
  Keywords: agents,ai,llm,rabbitmq,sofias
6
6
  Author: Sofias Tech, S.L.
@@ -148,7 +148,9 @@ resolved at `build()`:
148
148
  3. Or explicitly: `.with_llm(create_llm(model="default", api_key=...))`.
149
149
 
150
150
  ```python
151
- from sofias_sdk_lite import AgentBuilder, LLMNodeConfig, NodeContract
151
+ from sofias_sdk_lite import (
152
+ AgentBuilder, LLMNodeConfig, NodeContract, NodePromptConfig,
153
+ )
152
154
 
153
155
  agent = (
154
156
  AgentBuilder("qa_agent")
@@ -157,6 +159,9 @@ agent = (
157
159
  .add_llm_node(
158
160
  "answerer",
159
161
  LLMNodeConfig(name="answerer", input_contract=Question, output_contract=Answer,
162
+ # {question} is Question.question — this is how the input
163
+ # reaches the model. Without it the model answers blind.
164
+ prompt=NodePromptConfig(prompt="Answer this: {question}"),
160
165
  system_prompt="Answer in one sentence."),
161
166
  NodeContract(input_schema=Question, output_schema=Answer),
162
167
  )
@@ -166,8 +171,18 @@ agent = (
166
171
  )
167
172
  ```
168
173
 
174
+ > **`prompt` is how the node's input reaches the model.** The input is
175
+ > substituted into the `{placeholders}` of `NodePromptConfig` and nowhere
176
+ > else: there is no separate "user message" channel, and `system_prompt` does
177
+ > not carry it — that one is standing instruction (*how* to answer), not the
178
+ > task. Name every input field the model needs to see.
179
+ >
180
+ > A node with no prompt at all still works: the SDK appends the input as a
181
+ > JSON `## Input` section so nothing is silently lost. But the template is
182
+ > what gives you control over how the model reads the task, so write it.
183
+
169
184
  See `examples/03_llm_agent.py` and the
170
- [LLM integration](docs/concepts/llm-integration.md) guide (streaming,
185
+ [LLM integration](docs/concepts/llm-integration.md) guide (prompts, streaming,
171
186
  retries, bringing your own client).
172
187
 
173
188
  ## Running an agent against RabbitMQ
@@ -112,7 +112,9 @@ resolved at `build()`:
112
112
  3. Or explicitly: `.with_llm(create_llm(model="default", api_key=...))`.
113
113
 
114
114
  ```python
115
- from sofias_sdk_lite import AgentBuilder, LLMNodeConfig, NodeContract
115
+ from sofias_sdk_lite import (
116
+ AgentBuilder, LLMNodeConfig, NodeContract, NodePromptConfig,
117
+ )
116
118
 
117
119
  agent = (
118
120
  AgentBuilder("qa_agent")
@@ -121,6 +123,9 @@ agent = (
121
123
  .add_llm_node(
122
124
  "answerer",
123
125
  LLMNodeConfig(name="answerer", input_contract=Question, output_contract=Answer,
126
+ # {question} is Question.question — this is how the input
127
+ # reaches the model. Without it the model answers blind.
128
+ prompt=NodePromptConfig(prompt="Answer this: {question}"),
124
129
  system_prompt="Answer in one sentence."),
125
130
  NodeContract(input_schema=Question, output_schema=Answer),
126
131
  )
@@ -130,8 +135,18 @@ agent = (
130
135
  )
131
136
  ```
132
137
 
138
+ > **`prompt` is how the node's input reaches the model.** The input is
139
+ > substituted into the `{placeholders}` of `NodePromptConfig` and nowhere
140
+ > else: there is no separate "user message" channel, and `system_prompt` does
141
+ > not carry it — that one is standing instruction (*how* to answer), not the
142
+ > task. Name every input field the model needs to see.
143
+ >
144
+ > A node with no prompt at all still works: the SDK appends the input as a
145
+ > JSON `## Input` section so nothing is silently lost. But the template is
146
+ > what gives you control over how the model reads the task, so write it.
147
+
133
148
  See `examples/03_llm_agent.py` and the
134
- [LLM integration](docs/concepts/llm-integration.md) guide (streaming,
149
+ [LLM integration](docs/concepts/llm-integration.md) guide (prompts, streaming,
135
150
  retries, bringing your own client).
136
151
 
137
152
  ## Running an agent against RabbitMQ
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sofias-sdk-lite"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "Build agents on the Sofias agent graph and run them over RabbitMQ."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sofias-sdk-lite"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "Build agents on the Sofias agent graph and run them over RabbitMQ."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -126,8 +126,13 @@ from sofias_sdk_lite.nodes import (
126
126
  DelegationNodeConfig,
127
127
  DelegationTransport,
128
128
  FunctionNode,
129
+ FunctionNodeConfig,
129
130
  LLMNode,
130
131
  LLMNodeConfig,
132
+ LLMSettings,
133
+ NodePromptConfig,
134
+ NodeRetryConfig,
135
+ NodeToolLoopConfig,
131
136
  NodeType,
132
137
  NullDelegationTransport,
133
138
  PlannerNode,
@@ -262,7 +267,16 @@ __all__ = [
262
267
  "NodeType",
263
268
  "LLMNode",
264
269
  "LLMNodeConfig",
270
+ # The pieces of an LLMNodeConfig. NodePromptConfig above all: the node's
271
+ # input only reaches the model through the {placeholders} of its prompt,
272
+ # so a developer who cannot import it from here writes a node the model
273
+ # answers blind (TKT-066).
274
+ "NodePromptConfig",
275
+ "LLMSettings",
276
+ "NodeToolLoopConfig",
277
+ "NodeRetryConfig",
265
278
  "FunctionNode",
279
+ "FunctionNodeConfig",
266
280
  "AggregatorNode",
267
281
  "AggregatorNodeConfig",
268
282
  "DelegationNode",
File without changes