smooai-smooth-operator-core 1.2.0__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 (38) hide show
  1. smooai_smooth_operator_core-1.2.0/.gitignore +41 -0
  2. smooai_smooth_operator_core-1.2.0/PKG-INFO +10 -0
  3. smooai_smooth_operator_core-1.2.0/README.md +1 -0
  4. smooai_smooth_operator_core-1.2.0/pyproject.toml +37 -0
  5. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/__init__.py +98 -0
  6. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/agent.py +673 -0
  7. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/cast.py +124 -0
  8. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/checkpoint.py +46 -0
  9. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/compaction.py +66 -0
  10. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/cost.py +80 -0
  11. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/human_gate.py +74 -0
  12. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/knowledge.py +75 -0
  13. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/llm_provider.py +232 -0
  14. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/memory.py +56 -0
  15. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/rerank.py +61 -0
  16. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/thread.py +55 -0
  17. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/tool_search.py +133 -0
  18. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/vector.py +92 -0
  19. smooai_smooth_operator_core-1.2.0/src/smooth_operator_core/workflow.py +122 -0
  20. smooai_smooth_operator_core-1.2.0/tests/test_agent.py +75 -0
  21. smooai_smooth_operator_core-1.2.0/tests/test_cast.py +168 -0
  22. smooai_smooth_operator_core-1.2.0/tests/test_checkpoint.py +76 -0
  23. smooai_smooth_operator_core-1.2.0/tests/test_compaction.py +60 -0
  24. smooai_smooth_operator_core-1.2.0/tests/test_cost.py +80 -0
  25. smooai_smooth_operator_core-1.2.0/tests/test_evals.py +170 -0
  26. smooai_smooth_operator_core-1.2.0/tests/test_human_gate.py +202 -0
  27. smooai_smooth_operator_core-1.2.0/tests/test_llm_provider.py +123 -0
  28. smooai_smooth_operator_core-1.2.0/tests/test_memory.py +67 -0
  29. smooai_smooth_operator_core-1.2.0/tests/test_parallel_tools.py +150 -0
  30. smooai_smooth_operator_core-1.2.0/tests/test_rerank.py +96 -0
  31. smooai_smooth_operator_core-1.2.0/tests/test_retry.py +45 -0
  32. smooai_smooth_operator_core-1.2.0/tests/test_stream.py +126 -0
  33. smooai_smooth_operator_core-1.2.0/tests/test_subagent.py +66 -0
  34. smooai_smooth_operator_core-1.2.0/tests/test_thread.py +133 -0
  35. smooai_smooth_operator_core-1.2.0/tests/test_tool_search.py +162 -0
  36. smooai_smooth_operator_core-1.2.0/tests/test_vector.py +66 -0
  37. smooai_smooth_operator_core-1.2.0/tests/test_workflow.py +126 -0
  38. smooai_smooth_operator_core-1.2.0/uv.lock +481 -0
@@ -0,0 +1,41 @@
1
+ # Rust
2
+ target/
3
+ **/*.rs.bk
4
+ # Cargo.lock IS committed: this workspace ships a binary (smooth-operator-server)
5
+ # and the Dockerfile builds with `cargo build --locked`, which requires it.
6
+
7
+ # Node / TypeScript
8
+ node_modules/
9
+ dist/
10
+ *.tsbuildinfo
11
+ .turbo/
12
+
13
+ # Go
14
+ /go/bin/
15
+
16
+ # .NET
17
+ bin/
18
+ obj/
19
+
20
+ # Python
21
+ __pycache__/
22
+ *.pyc
23
+ .venv/
24
+ .mypy_cache/
25
+ .ruff_cache/
26
+
27
+ # SST / deploy
28
+ .sst/
29
+ .open-next/
30
+ cdk.out/
31
+
32
+ # Env / secrets
33
+ .env
34
+ .env.local
35
+ *.pem
36
+
37
+ # OS / editor
38
+ .DS_Store
39
+ .idea/
40
+ .vscode/*
41
+ !.vscode/extensions.json
@@ -0,0 +1,10 @@
1
+ Metadata-Version: 2.4
2
+ Name: smooai-smooth-operator-core
3
+ Version: 1.2.0
4
+ Summary: Native Python implementation of the smooth-operator agent engine — an in-process, OpenAI-compatible agentic tool-calling loop with knowledge grounding. The Python sibling of the Rust reference engine and the C# core.
5
+ License: MIT
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: openai>=1.40
8
+ Description-Content-Type: text/markdown
9
+
10
+ # smooth-operator-core (Python)
@@ -0,0 +1 @@
1
+ # smooth-operator-core (Python)
@@ -0,0 +1,37 @@
1
+ [project]
2
+ name = "smooai-smooth-operator-core"
3
+ version = "1.2.0"
4
+ description = "Native Python implementation of the smooth-operator agent engine — an in-process, OpenAI-compatible agentic tool-calling loop with knowledge grounding. The Python sibling of the Rust reference engine and the C# core."
5
+ readme = "README.md"
6
+ license = { text = "MIT" }
7
+ requires-python = ">=3.11"
8
+ dependencies = [
9
+ # The engine drives any OpenAI-compatible chat endpoint via the official SDK
10
+ # (pointed at the gateway). This is the IChatClient analogue.
11
+ "openai>=1.40",
12
+ ]
13
+
14
+ [dependency-groups]
15
+ dev = [
16
+ "pytest>=8",
17
+ "pytest-asyncio>=0.23",
18
+ "ruff>=0.4",
19
+ ]
20
+
21
+ [build-system]
22
+ requires = ["hatchling"]
23
+ build-backend = "hatchling.build"
24
+
25
+ [tool.hatch.build.targets.wheel]
26
+ packages = ["src/smooth_operator_core"]
27
+
28
+ [tool.pytest.ini_options]
29
+ asyncio_mode = "auto"
30
+ testpaths = ["tests"]
31
+
32
+ [tool.ruff]
33
+ line-length = 120
34
+ target-version = "py311"
35
+
36
+ [tool.ruff.lint]
37
+ extend-select = ["I"]
@@ -0,0 +1,98 @@
1
+ """smooth-operator-core (Python): a native, in-process agent engine.
2
+
3
+ The Phase-0 Python sibling of the Rust reference engine and the C# core — an
4
+ agentic tool-calling loop over any OpenAI-compatible chat client, with in-memory
5
+ knowledge grounding. See ``docs/Architecture/Python Core.md``.
6
+ """
7
+
8
+ from .agent import (
9
+ AgentOptions,
10
+ AgentRunResponse,
11
+ DoneEvent,
12
+ FunctionTool,
13
+ SmoothAgent,
14
+ StreamEvent,
15
+ TextEvent,
16
+ Tool,
17
+ ToolCallEvent,
18
+ ToolResultEvent,
19
+ delegate_tool,
20
+ )
21
+ from .cast import Cast, Clearance, OperatorRole, RoleKind
22
+ from .checkpoint import Checkpoint, CheckpointStore, InMemoryCheckpointStore
23
+ from .cost import CostBudget, CostTracker, ModelPricing, Usage
24
+ from .human_gate import (
25
+ DelegateHumanGate,
26
+ HumanApprovalRequest,
27
+ HumanApprovalResponse,
28
+ HumanDecision,
29
+ HumanGate,
30
+ )
31
+ from .knowledge import InMemoryKnowledge, Knowledge, KnowledgeHit
32
+ from .llm_provider import (
33
+ LlmProvider,
34
+ MockLlmProvider,
35
+ RecordedCall,
36
+ text_response,
37
+ tool_call_response,
38
+ usage,
39
+ )
40
+ from .memory import InMemoryMemory, Memory, MemoryEntry
41
+ from .rerank import LexicalReranker, NoopReranker, Reranker
42
+ from .thread import SmoothAgentThread
43
+ from .tool_search import ToolSearch
44
+ from .vector import Embedder, HashEmbedder, VectorKnowledge
45
+ from .workflow import END, Workflow, WorkflowError
46
+
47
+ __all__ = [
48
+ "AgentOptions",
49
+ "AgentRunResponse",
50
+ "Cast",
51
+ "DoneEvent",
52
+ "StreamEvent",
53
+ "TextEvent",
54
+ "ToolCallEvent",
55
+ "ToolResultEvent",
56
+ "usage",
57
+ "Checkpoint",
58
+ "CheckpointStore",
59
+ "Clearance",
60
+ "CostBudget",
61
+ "CostTracker",
62
+ "DelegateHumanGate",
63
+ "Embedder",
64
+ "FunctionTool",
65
+ "delegate_tool",
66
+ "HashEmbedder",
67
+ "HumanApprovalRequest",
68
+ "HumanApprovalResponse",
69
+ "HumanDecision",
70
+ "HumanGate",
71
+ "InMemoryCheckpointStore",
72
+ "InMemoryKnowledge",
73
+ "InMemoryMemory",
74
+ "Knowledge",
75
+ "KnowledgeHit",
76
+ "LexicalReranker",
77
+ "LlmProvider",
78
+ "Memory",
79
+ "MemoryEntry",
80
+ "MockLlmProvider",
81
+ "ModelPricing",
82
+ "NoopReranker",
83
+ "OperatorRole",
84
+ "RecordedCall",
85
+ "Reranker",
86
+ "RoleKind",
87
+ "SmoothAgent",
88
+ "SmoothAgentThread",
89
+ "Tool",
90
+ "ToolSearch",
91
+ "Usage",
92
+ "VectorKnowledge",
93
+ "Workflow",
94
+ "WorkflowError",
95
+ "END",
96
+ "text_response",
97
+ "tool_call_response",
98
+ ]