simple-agents-py 0.1.0__tar.gz → 0.1.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 (117) hide show
  1. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/Cargo.lock +31 -30
  2. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/Cargo.toml +4 -1
  3. simple_agents_py-0.1.2/PKG-INFO +198 -0
  4. simple_agents_py-0.1.2/README.md +182 -0
  5. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/Cargo.toml +4 -1
  6. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/README.md +14 -14
  7. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/TEST_GUIDE.md +7 -7
  8. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/TODO.md +5 -5
  9. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/examples/basic_usage.rs +42 -26
  10. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/examples/mock_provider.rs +7 -4
  11. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/cache.rs +44 -28
  12. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/coercion.rs +4 -4
  13. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/config.rs +11 -7
  14. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/error.rs +1 -1
  15. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/lib.rs +3 -2
  16. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/message.rs +5 -5
  17. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/provider.rs +20 -18
  18. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/request.rs +60 -2
  19. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/response.rs +188 -2
  20. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/router.rs +5 -5
  21. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/src/validation.rs +4 -4
  22. {simple_agents_py-0.1.0/crates/simple-agents-types → simple_agents_py-0.1.2/crates/simple-agent-type}/tests/integration_test.rs +4 -3
  23. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-cache/Cargo.toml +4 -1
  24. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-cache/src/lib.rs +1 -1
  25. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-cache/src/memory.rs +55 -16
  26. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-cache/src/noop.rs +7 -4
  27. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/Cargo.toml +4 -1
  28. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/README.md +4 -2
  29. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/examples/basic_client.rs +3 -2
  30. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/src/client.rs +34 -32
  31. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/src/healing.rs +2 -2
  32. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/src/lib.rs +3 -2
  33. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/src/middleware.rs +3 -1
  34. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/src/routing.rs +22 -28
  35. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-core/tests/client_integration.rs +3 -5
  36. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/Cargo.toml +1 -1
  37. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/benches/parser_benchmarks.rs +4 -16
  38. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/examples/basic_healing.rs +4 -1
  39. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/examples/coercion_demo.rs +20 -6
  40. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/examples/streaming_annotations.rs +11 -11
  41. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/examples/streaming_partial_types.rs +3 -3
  42. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/src/coercion.rs +30 -23
  43. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/src/lib.rs +7 -7
  44. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/src/parser.rs +29 -37
  45. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/src/streaming.rs +13 -11
  46. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/tests/parser_tests.rs +14 -31
  47. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/tests/stream_annotations_tests.rs +19 -25
  48. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/tests/streaming_tests.rs +6 -4
  49. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-macros/Cargo.toml +1 -1
  50. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/Cargo.toml +3 -2
  51. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/README.md +2 -2
  52. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/anthropic_basic.rs +7 -6
  53. simple_agents_py-0.1.2/crates/simple-agents-providers/examples/anthropic_structured_output.rs +189 -0
  54. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/cache_usage.rs +6 -5
  55. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/custom_api.rs +72 -24
  56. simple_agents_py-0.1.2/crates/simple-agents-providers/examples/healing_fallback.rs +160 -0
  57. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/openai_basic.rs +5 -7
  58. simple_agents_py-0.1.2/crates/simple-agents-providers/examples/openai_structured_output.rs +225 -0
  59. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/openrouter_basic.rs +5 -6
  60. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/retry_demo.rs +4 -4
  61. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/streaming.rs +3 -4
  62. simple_agents_py-0.1.2/crates/simple-agents-providers/examples/streaming_structured.rs +173 -0
  63. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/streaming_with_healing.rs +15 -9
  64. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/test_local_api.rs +20 -12
  65. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/anthropic/error.rs +10 -17
  66. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/anthropic/mod.rs +260 -77
  67. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/anthropic/models.rs +29 -0
  68. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/anthropic/streaming.rs +11 -21
  69. simple_agents_py-0.1.2/crates/simple-agents-providers/src/healing_integration.rs +419 -0
  70. simple_agents_py-0.1.2/crates/simple-agents-providers/src/lib.rs +101 -0
  71. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/metrics.rs +4 -2
  72. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/openai/error.rs +3 -5
  73. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/openai/mod.rs +210 -60
  74. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/openai/models.rs +8 -2
  75. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/openai/streaming.rs +1 -1
  76. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/openrouter/mod.rs +62 -31
  77. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/rate_limit.rs +3 -9
  78. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/retry.rs +5 -5
  79. simple_agents_py-0.1.2/crates/simple-agents-providers/src/schema_converter.rs +393 -0
  80. simple_agents_py-0.1.2/crates/simple-agents-providers/src/streaming_structured.rs +277 -0
  81. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/utils.rs +14 -8
  82. simple_agents_py-0.1.2/crates/simple-agents-providers/tests/healing_integration_tests.rs +340 -0
  83. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/tests/openai_integration.rs +28 -26
  84. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-py/Cargo.toml +2 -2
  85. simple_agents_py-0.1.2/crates/simple-agents-py/README.md +182 -0
  86. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-py/src/lib.rs +63 -10
  87. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/Cargo.toml +4 -1
  88. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/examples/round_robin_router.rs +10 -3
  89. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/circuit_breaker.rs +12 -7
  90. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/cost.rs +25 -8
  91. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/fallback.rs +21 -14
  92. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/health.rs +5 -3
  93. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/latency.rs +11 -4
  94. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/retry.rs +11 -7
  95. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/round_robin.rs +11 -4
  96. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/tests/health_tracker_integration.rs +1 -1
  97. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/pyproject.toml +1 -1
  98. simple_agents_py-0.1.0/PKG-INFO +0 -55
  99. simple_agents_py-0.1.0/README.md +0 -39
  100. simple_agents_py-0.1.0/crates/simple-agents-providers/src/lib.rs +0 -54
  101. simple_agents_py-0.1.0/crates/simple-agents-py/README.md +0 -39
  102. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/README.md +0 -0
  103. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/src/schema.rs +0 -0
  104. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/src/string_utils.rs +0 -0
  105. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-healing/tests/property_tests.rs +0 -0
  106. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-macros/README.md +0 -0
  107. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-macros/src/lib.rs +0 -0
  108. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-macros/src/partial.rs +0 -0
  109. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-macros/tests/partial_type_tests.rs +1 -1
  110. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/examples/test_reqwest.rs +0 -0
  111. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/run_integration_tests.sh +0 -0
  112. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/common/error.rs +0 -0
  113. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/common/http_client.rs +0 -0
  114. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/src/common/mod.rs +0 -0
  115. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-providers/tests/README.md +0 -0
  116. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-py/tests/test_client.py +0 -0
  117. {simple_agents_py-0.1.0 → simple_agents_py-0.1.2}/crates/simple-agents-router/src/lib.rs +6 -6
@@ -2023,12 +2023,27 @@ dependencies = [
2023
2023
  "libc",
2024
2024
  ]
2025
2025
 
2026
+ [[package]]
2027
+ name = "simple-agent-type"
2028
+ version = "0.1.2"
2029
+ dependencies = [
2030
+ "async-trait",
2031
+ "blake3",
2032
+ "futures-core",
2033
+ "rand 0.8.5",
2034
+ "serde",
2035
+ "serde_json",
2036
+ "subtle",
2037
+ "thiserror 1.0.69",
2038
+ "tokio",
2039
+ ]
2040
+
2026
2041
  [[package]]
2027
2042
  name = "simple-agents-cache"
2028
- version = "0.1.0"
2043
+ version = "0.1.2"
2029
2044
  dependencies = [
2030
2045
  "async-trait",
2031
- "simple-agents-types",
2046
+ "simple-agent-type",
2032
2047
  "tokio",
2033
2048
  ]
2034
2049
 
@@ -2040,10 +2055,10 @@ dependencies = [
2040
2055
  "serde",
2041
2056
  "serde_json",
2042
2057
  "serde_yaml",
2058
+ "simple-agent-type",
2043
2059
  "simple-agents-core",
2044
2060
  "simple-agents-providers",
2045
2061
  "simple-agents-router",
2046
- "simple-agents-types",
2047
2062
  "thiserror 1.0.69",
2048
2063
  "tokio",
2049
2064
  "toml",
@@ -2051,15 +2066,15 @@ dependencies = [
2051
2066
 
2052
2067
  [[package]]
2053
2068
  name = "simple-agents-core"
2054
- version = "0.1.0"
2069
+ version = "0.1.2"
2055
2070
  dependencies = [
2056
2071
  "async-trait",
2057
2072
  "serde",
2058
2073
  "serde_json",
2074
+ "simple-agent-type",
2059
2075
  "simple-agents-cache",
2060
2076
  "simple-agents-healing",
2061
2077
  "simple-agents-router",
2062
- "simple-agents-types",
2063
2078
  "tokio",
2064
2079
  ]
2065
2080
 
@@ -2070,9 +2085,9 @@ dependencies = [
2070
2085
  "dotenv",
2071
2086
  "futures-util",
2072
2087
  "serde_json",
2088
+ "simple-agent-type",
2073
2089
  "simple-agents-healing",
2074
2090
  "simple-agents-providers",
2075
- "simple-agents-types",
2076
2091
  "tokio",
2077
2092
  ]
2078
2093
 
@@ -2081,9 +2096,9 @@ name = "simple-agents-ffi"
2081
2096
  version = "0.1.0"
2082
2097
  dependencies = [
2083
2098
  "async-trait",
2099
+ "simple-agent-type",
2084
2100
  "simple-agents-core",
2085
2101
  "simple-agents-providers",
2086
- "simple-agents-types",
2087
2102
  "tokio",
2088
2103
  ]
2089
2104
 
@@ -2096,8 +2111,8 @@ dependencies = [
2096
2111
  "regex",
2097
2112
  "serde",
2098
2113
  "serde_json",
2114
+ "simple-agent-type",
2099
2115
  "simple-agents-macros",
2100
- "simple-agents-types",
2101
2116
  "thiserror 1.0.69",
2102
2117
  "tokio",
2103
2118
  "tracing",
@@ -2111,7 +2126,7 @@ dependencies = [
2111
2126
  "quote",
2112
2127
  "serde",
2113
2128
  "serde_json",
2114
- "simple-agents-types",
2129
+ "simple-agent-type",
2115
2130
  "syn",
2116
2131
  ]
2117
2132
 
@@ -2121,9 +2136,9 @@ version = "0.1.0"
2121
2136
  dependencies = [
2122
2137
  "napi",
2123
2138
  "napi-derive",
2139
+ "simple-agent-type",
2124
2140
  "simple-agents-core",
2125
2141
  "simple-agents-providers",
2126
- "simple-agents-types",
2127
2142
  "tokio",
2128
2143
  ]
2129
2144
 
@@ -2140,13 +2155,14 @@ dependencies = [
2140
2155
  "governor",
2141
2156
  "metrics",
2142
2157
  "metrics-exporter-prometheus",
2158
+ "pin-project-lite",
2143
2159
  "reqwest",
2144
2160
  "serde",
2145
2161
  "serde_json",
2162
+ "simple-agent-type",
2146
2163
  "simple-agents-cache",
2147
2164
  "simple-agents-healing",
2148
2165
  "simple-agents-macros",
2149
- "simple-agents-types",
2150
2166
  "thiserror 2.0.17",
2151
2167
  "tokio",
2152
2168
  "tokio-test",
@@ -2156,38 +2172,23 @@ dependencies = [
2156
2172
 
2157
2173
  [[package]]
2158
2174
  name = "simple-agents-py"
2159
- version = "0.1.0"
2175
+ version = "0.1.2"
2160
2176
  dependencies = [
2161
2177
  "pyo3",
2178
+ "simple-agent-type",
2162
2179
  "simple-agents-core",
2163
2180
  "simple-agents-providers",
2164
- "simple-agents-types",
2165
2181
  "tokio",
2166
2182
  ]
2167
2183
 
2168
2184
  [[package]]
2169
2185
  name = "simple-agents-router"
2170
- version = "0.1.0"
2171
- dependencies = [
2172
- "async-trait",
2173
- "rand 0.8.5",
2174
- "serde_json",
2175
- "simple-agents-types",
2176
- "tokio",
2177
- ]
2178
-
2179
- [[package]]
2180
- name = "simple-agents-types"
2181
- version = "0.1.0"
2186
+ version = "0.1.2"
2182
2187
  dependencies = [
2183
2188
  "async-trait",
2184
- "blake3",
2185
- "futures-core",
2186
2189
  "rand 0.8.5",
2187
- "serde",
2188
2190
  "serde_json",
2189
- "subtle",
2190
- "thiserror 1.0.69",
2191
+ "simple-agent-type",
2191
2192
  "tokio",
2192
2193
  ]
2193
2194
 
@@ -3,11 +3,14 @@ members = ["crates/*"]
3
3
  resolver = "2"
4
4
 
5
5
  [workspace.package]
6
- version = "0.1.0"
6
+ version = "0.1.2"
7
7
  edition = "2021"
8
8
  rust-version = "1.75"
9
9
  authors = ["SimpleAgents Contributors"]
10
10
  license = "MIT OR Apache-2.0"
11
+ repository = "https://github.com/rishub/simple-agents"
12
+ homepage = "https://github.com/rishub/simple-agents"
13
+ documentation = "https://docs.rs/simple-agent-type"
11
14
 
12
15
  [workspace.dependencies]
13
16
  serde = { version = "1.0", features = ["derive"] }
@@ -0,0 +1,198 @@
1
+ Metadata-Version: 2.4
2
+ Name: simple-agents-py
3
+ Version: 0.1.2
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Rust
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: License :: OSI Approved :: Apache Software License
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Dist: pytest>=8.0 ; extra == 'dev'
10
+ Provides-Extra: dev
11
+ Summary: Python bindings for SimpleAgents
12
+ License: MIT OR Apache-2.0
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
15
+
16
+ # simple-agents-py
17
+
18
+ [![PyPI](https://img.shields.io/pypi/v/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
19
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
20
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
21
+ [![License](https://img.shields.io/pypi/l/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
22
+
23
+ Python bindings for SimpleAgents (PyO3-based).
24
+
25
+ ## Installation
26
+
27
+ Install from [PyPI](https://pypi.org/project/simple-agents-py/):
28
+
29
+ ```sh
30
+ pip install simple-agents-py
31
+ ```
32
+
33
+ Or with uv:
34
+
35
+ ```sh
36
+ uv pip install simple-agents-py
37
+ ```
38
+
39
+ ## Build from Source
40
+
41
+ ```sh
42
+ uv build
43
+ ```
44
+
45
+ ## Publish
46
+
47
+ ```sh
48
+ uv publish
49
+ ```
50
+
51
+ Set `UV_PUBLISH_TOKEN` or pass `--token` to publish to PyPI.
52
+
53
+ ## Usage
54
+
55
+ ```python
56
+ from simple_agents_py import Client
57
+
58
+ client = Client("openai")
59
+ response = client.complete("gpt-4", "Hello from Python!", max_tokens=128, temperature=0.7)
60
+ print(response)
61
+ ```
62
+
63
+ ## Examples
64
+
65
+ OpenAI with a short prompt:
66
+
67
+ ```python
68
+ from simple_agents_py import Client
69
+
70
+ client = Client("openai")
71
+ text = client.complete("gpt-4o-mini", "Summarize this in one sentence.")
72
+ print(text)
73
+ ```
74
+
75
+ Anthropic with custom tokens and temperature:
76
+
77
+ ```python
78
+ from simple_agents_py import Client
79
+
80
+ client = Client("anthropic")
81
+ text = client.complete(
82
+ "claude-3-5-sonnet-20240620",
83
+ "Write a friendly welcome message for a new user.",
84
+ max_tokens=120,
85
+ temperature=0.5,
86
+ )
87
+ print(text)
88
+ ```
89
+
90
+ OpenRouter with a specific model:
91
+
92
+ ```python
93
+ from simple_agents_py import Client
94
+
95
+ client = Client("openrouter")
96
+ text = client.complete("openai/gpt-4o-mini", "Give me three project ideas.")
97
+ print(text)
98
+ ```
99
+
100
+ OpenRouter with explicit API base and key:
101
+
102
+ ```python
103
+ from simple_agents_py import Client
104
+
105
+ client = Client(
106
+ "openrouter",
107
+ api_base="https://openrouter.ai/api/v1",
108
+ api_key="sk-your-openrouter-key",
109
+ )
110
+ text = client.complete("openai/gpt-4o-mini", "Give me three project ideas.")
111
+ print(text)
112
+ ```
113
+
114
+ OpenAI with a custom gateway:
115
+
116
+ ```python
117
+ from simple_agents_py import Client
118
+
119
+ client = Client(
120
+ "openai",
121
+ api_base="http://localhost:4000/v1",
122
+ api_key="sk-your-openai-key",
123
+ )
124
+ text = client.complete("gpt-4o-mini", "Say hello from a local proxy.")
125
+ print(text)
126
+ ```
127
+
128
+ Basic error handling:
129
+
130
+ ```python
131
+ from simple_agents_py import Client
132
+
133
+ try:
134
+ client = Client("openai")
135
+ print(client.complete("gpt-4o-mini", "Hello!"))
136
+ except RuntimeError as exc:
137
+ print(f"Request failed: {exc}")
138
+ ```
139
+
140
+ ## Notes
141
+
142
+ - `Client` reads provider configuration from environment variables (e.g. `OPENAI_API_KEY`) when `api_key` is not provided.
143
+ - `api_base` lets you override the default API base URL.
144
+ - `max_tokens` and `temperature` are optional.
145
+
146
+ ## Tests
147
+
148
+ ```sh
149
+ uv pip install -e .[dev]
150
+ uv run pytest
151
+ ```
152
+
153
+ ## Package Metrics & Analytics
154
+
155
+ ### Download Statistics
156
+
157
+ View download statistics on:
158
+ - **PyPI Stats**: [https://pypistats.org/packages/simple-agents-py](https://pypistats.org/packages/simple-agents-py)
159
+ - **PePy**: [https://pepy.tech/project/simple-agents-py](https://pepy.tech/project/simple-agents-py)
160
+ - **PyPI Package Page**: [https://pypi.org/project/simple-agents-py/](https://pypi.org/project/simple-agents-py/)
161
+
162
+ The badges above automatically track:
163
+ - **Version**: Current version on PyPI
164
+ - **Downloads**: Monthly download count
165
+ - **Python Versions**: Supported Python versions
166
+ - **License**: Package license
167
+
168
+ ### Tracking with shields.io
169
+
170
+ The badges use [shields.io](https://shields.io/) which automatically fetches data from PyPI. Available metrics:
171
+ - `pypi/v/simple-agents-py` - Latest version
172
+ - `pypi/dm/simple-agents-py` - Monthly downloads
173
+ - `pypi/dw/simple-agents-py` - Weekly downloads
174
+ - `pypi/dd/simple-agents-py` - Daily downloads
175
+ - `pypi/pyversions/simple-agents-py` - Python version support
176
+ - `pypi/l/simple-agents-py` - License
177
+ - `pypi/status/simple-agents-py` - Development status
178
+ - `pypi/format/simple-agents-py` - Package format (wheel/sdist)
179
+
180
+ ### Optional Badges (for future)
181
+
182
+ Once you set up CI/CD and documentation, you can add:
183
+
184
+ ```markdown
185
+ <!-- GitHub Actions build status -->
186
+ [![Build](https://github.com/yourusername/SimpleAgents/actions/workflows/python.yml/badge.svg)](https://github.com/yourusername/SimpleAgents/actions/workflows/python.yml)
187
+
188
+ <!-- Documentation -->
189
+ [![Docs](https://img.shields.io/badge/docs-latest-blue)](https://simpleagents.readthedocs.io/)
190
+
191
+ <!-- Code coverage -->
192
+ [![Coverage](https://codecov.io/gh/yourusername/SimpleAgents/branch/main/graph/badge.svg)](https://codecov.io/gh/yourusername/SimpleAgents)
193
+
194
+ <!-- GitHub stats -->
195
+ [![GitHub stars](https://img.shields.io/github/stars/yourusername/SimpleAgents?style=social)](https://github.com/yourusername/SimpleAgents)
196
+ [![GitHub forks](https://img.shields.io/github/forks/yourusername/SimpleAgents?style=social)](https://github.com/yourusername/SimpleAgents/fork)
197
+ ```
198
+
@@ -0,0 +1,182 @@
1
+ # simple-agents-py
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
4
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
5
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
6
+ [![License](https://img.shields.io/pypi/l/simple-agents-py)](https://pypi.org/project/simple-agents-py/)
7
+
8
+ Python bindings for SimpleAgents (PyO3-based).
9
+
10
+ ## Installation
11
+
12
+ Install from [PyPI](https://pypi.org/project/simple-agents-py/):
13
+
14
+ ```sh
15
+ pip install simple-agents-py
16
+ ```
17
+
18
+ Or with uv:
19
+
20
+ ```sh
21
+ uv pip install simple-agents-py
22
+ ```
23
+
24
+ ## Build from Source
25
+
26
+ ```sh
27
+ uv build
28
+ ```
29
+
30
+ ## Publish
31
+
32
+ ```sh
33
+ uv publish
34
+ ```
35
+
36
+ Set `UV_PUBLISH_TOKEN` or pass `--token` to publish to PyPI.
37
+
38
+ ## Usage
39
+
40
+ ```python
41
+ from simple_agents_py import Client
42
+
43
+ client = Client("openai")
44
+ response = client.complete("gpt-4", "Hello from Python!", max_tokens=128, temperature=0.7)
45
+ print(response)
46
+ ```
47
+
48
+ ## Examples
49
+
50
+ OpenAI with a short prompt:
51
+
52
+ ```python
53
+ from simple_agents_py import Client
54
+
55
+ client = Client("openai")
56
+ text = client.complete("gpt-4o-mini", "Summarize this in one sentence.")
57
+ print(text)
58
+ ```
59
+
60
+ Anthropic with custom tokens and temperature:
61
+
62
+ ```python
63
+ from simple_agents_py import Client
64
+
65
+ client = Client("anthropic")
66
+ text = client.complete(
67
+ "claude-3-5-sonnet-20240620",
68
+ "Write a friendly welcome message for a new user.",
69
+ max_tokens=120,
70
+ temperature=0.5,
71
+ )
72
+ print(text)
73
+ ```
74
+
75
+ OpenRouter with a specific model:
76
+
77
+ ```python
78
+ from simple_agents_py import Client
79
+
80
+ client = Client("openrouter")
81
+ text = client.complete("openai/gpt-4o-mini", "Give me three project ideas.")
82
+ print(text)
83
+ ```
84
+
85
+ OpenRouter with explicit API base and key:
86
+
87
+ ```python
88
+ from simple_agents_py import Client
89
+
90
+ client = Client(
91
+ "openrouter",
92
+ api_base="https://openrouter.ai/api/v1",
93
+ api_key="sk-your-openrouter-key",
94
+ )
95
+ text = client.complete("openai/gpt-4o-mini", "Give me three project ideas.")
96
+ print(text)
97
+ ```
98
+
99
+ OpenAI with a custom gateway:
100
+
101
+ ```python
102
+ from simple_agents_py import Client
103
+
104
+ client = Client(
105
+ "openai",
106
+ api_base="http://localhost:4000/v1",
107
+ api_key="sk-your-openai-key",
108
+ )
109
+ text = client.complete("gpt-4o-mini", "Say hello from a local proxy.")
110
+ print(text)
111
+ ```
112
+
113
+ Basic error handling:
114
+
115
+ ```python
116
+ from simple_agents_py import Client
117
+
118
+ try:
119
+ client = Client("openai")
120
+ print(client.complete("gpt-4o-mini", "Hello!"))
121
+ except RuntimeError as exc:
122
+ print(f"Request failed: {exc}")
123
+ ```
124
+
125
+ ## Notes
126
+
127
+ - `Client` reads provider configuration from environment variables (e.g. `OPENAI_API_KEY`) when `api_key` is not provided.
128
+ - `api_base` lets you override the default API base URL.
129
+ - `max_tokens` and `temperature` are optional.
130
+
131
+ ## Tests
132
+
133
+ ```sh
134
+ uv pip install -e .[dev]
135
+ uv run pytest
136
+ ```
137
+
138
+ ## Package Metrics & Analytics
139
+
140
+ ### Download Statistics
141
+
142
+ View download statistics on:
143
+ - **PyPI Stats**: [https://pypistats.org/packages/simple-agents-py](https://pypistats.org/packages/simple-agents-py)
144
+ - **PePy**: [https://pepy.tech/project/simple-agents-py](https://pepy.tech/project/simple-agents-py)
145
+ - **PyPI Package Page**: [https://pypi.org/project/simple-agents-py/](https://pypi.org/project/simple-agents-py/)
146
+
147
+ The badges above automatically track:
148
+ - **Version**: Current version on PyPI
149
+ - **Downloads**: Monthly download count
150
+ - **Python Versions**: Supported Python versions
151
+ - **License**: Package license
152
+
153
+ ### Tracking with shields.io
154
+
155
+ The badges use [shields.io](https://shields.io/) which automatically fetches data from PyPI. Available metrics:
156
+ - `pypi/v/simple-agents-py` - Latest version
157
+ - `pypi/dm/simple-agents-py` - Monthly downloads
158
+ - `pypi/dw/simple-agents-py` - Weekly downloads
159
+ - `pypi/dd/simple-agents-py` - Daily downloads
160
+ - `pypi/pyversions/simple-agents-py` - Python version support
161
+ - `pypi/l/simple-agents-py` - License
162
+ - `pypi/status/simple-agents-py` - Development status
163
+ - `pypi/format/simple-agents-py` - Package format (wheel/sdist)
164
+
165
+ ### Optional Badges (for future)
166
+
167
+ Once you set up CI/CD and documentation, you can add:
168
+
169
+ ```markdown
170
+ <!-- GitHub Actions build status -->
171
+ [![Build](https://github.com/yourusername/SimpleAgents/actions/workflows/python.yml/badge.svg)](https://github.com/yourusername/SimpleAgents/actions/workflows/python.yml)
172
+
173
+ <!-- Documentation -->
174
+ [![Docs](https://img.shields.io/badge/docs-latest-blue)](https://simpleagents.readthedocs.io/)
175
+
176
+ <!-- Code coverage -->
177
+ [![Coverage](https://codecov.io/gh/yourusername/SimpleAgents/branch/main/graph/badge.svg)](https://codecov.io/gh/yourusername/SimpleAgents)
178
+
179
+ <!-- GitHub stats -->
180
+ [![GitHub stars](https://img.shields.io/github/stars/yourusername/SimpleAgents?style=social)](https://github.com/yourusername/SimpleAgents)
181
+ [![GitHub forks](https://img.shields.io/github/forks/yourusername/SimpleAgents?style=social)](https://github.com/yourusername/SimpleAgents/fork)
182
+ ```
@@ -1,10 +1,13 @@
1
1
  [package]
2
- name = "simple-agents-types"
2
+ name = "simple-agent-type"
3
3
  version.workspace = true
4
4
  edition.workspace = true
5
5
  rust-version.workspace = true
6
6
  authors.workspace = true
7
7
  license.workspace = true
8
+ repository.workspace = true
9
+ homepage.workspace = true
10
+ documentation.workspace = true
8
11
  description = "Core types and traits for SimpleAgents"
9
12
  readme = "README.md"
10
13
 
@@ -1,10 +1,10 @@
1
- # simple-agents-types
1
+ # simple-agent-type
2
2
 
3
3
  Core types and traits for the SimpleAgents LLM framework.
4
4
 
5
5
  ## Overview
6
6
 
7
- `simple-agents-types` is the foundational crate of SimpleAgents, providing all core types, traits, and error definitions. It has **zero runtime dependencies** - no HTTP client, no I/O, no async runtime - just pure types and traits.
7
+ `simple-agent-type` is the foundational crate of SimpleAgents, providing all core types, traits, and error definitions. It has **zero runtime dependencies** - no HTTP client, no I/O, no async runtime - just pure types and traits.
8
8
 
9
9
  ## Features
10
10
 
@@ -26,7 +26,7 @@ SimpleAgents follows a trait-based architecture with three main traits:
26
26
  ## Quick Start
27
27
 
28
28
  ```rust
29
- use simple_agents_types::prelude::*;
29
+ use simple_agent_type::prelude::*;
30
30
 
31
31
  // Create a request
32
32
  let request = CompletionRequest::builder()
@@ -46,7 +46,7 @@ assert_eq!(request.messages.len(), 1);
46
46
  ### Messages
47
47
 
48
48
  ```rust
49
- use simple_agents_types::message::{Message, Role};
49
+ use simple_agent_type::message::{Message, Role};
50
50
 
51
51
  let user_msg = Message::user("What is 2+2?");
52
52
  let assistant_msg = Message::assistant("4");
@@ -56,8 +56,8 @@ let system_msg = Message::system("You are a helpful assistant.");
56
56
  ### Requests
57
57
 
58
58
  ```rust
59
- use simple_agents_types::request::CompletionRequest;
60
- use simple_agents_types::message::Message;
59
+ use simple_agent_type::request::CompletionRequest;
60
+ use simple_agent_type::message::Message;
61
61
 
62
62
  let request = CompletionRequest::builder()
63
63
  .model("gpt-4")
@@ -70,7 +70,7 @@ let request = CompletionRequest::builder()
70
70
  ### Responses
71
71
 
72
72
  ```rust
73
- use simple_agents_types::response::CompletionResponse;
73
+ use simple_agent_type::response::CompletionResponse;
74
74
 
75
75
  // Get the first completion's content
76
76
  if let Some(content) = response.content() {
@@ -81,7 +81,7 @@ if let Some(content) = response.content() {
81
81
  ### Error Handling
82
82
 
83
83
  ```rust
84
- use simple_agents_types::error::{SimpleAgentsError, ProviderError};
84
+ use simple_agent_type::error::{SimpleAgentsError, ProviderError};
85
85
 
86
86
  match result {
87
87
  Ok(response) => println!("{}", response.content().unwrap()),
@@ -95,7 +95,7 @@ match result {
95
95
  ### API Key Security
96
96
 
97
97
  ```rust
98
- use simple_agents_types::validation::ApiKey;
98
+ use simple_agent_type::validation::ApiKey;
99
99
 
100
100
  let key = ApiKey::new("sk-...")?;
101
101
 
@@ -109,7 +109,7 @@ let raw_key = key.expose(); // Use for API calls only
109
109
  ### Coercion Tracking
110
110
 
111
111
  ```rust
112
- use simple_agents_types::coercion::{CoercionResult, CoercionFlag};
112
+ use simple_agent_type::coercion::{CoercionResult, CoercionFlag};
113
113
 
114
114
  let result = CoercionResult::new(42)
115
115
  .with_flag(CoercionFlag::StrippedMarkdown)
@@ -138,7 +138,7 @@ if result.was_coerced() {
138
138
  ### Provider Trait
139
139
 
140
140
  ```rust
141
- use simple_agents_types::provider::Provider;
141
+ use simple_agent_type::provider::Provider;
142
142
  use async_trait::async_trait;
143
143
 
144
144
  #[async_trait]
@@ -162,7 +162,7 @@ impl Provider for MyProvider {
162
162
  ### Cache Trait
163
163
 
164
164
  ```rust
165
- use simple_agents_types::cache::Cache;
165
+ use simple_agent_type::cache::Cache;
166
166
  use async_trait::async_trait;
167
167
 
168
168
  #[async_trait]
@@ -177,7 +177,7 @@ impl Cache for MyCache {
177
177
  ### RoutingStrategy Trait
178
178
 
179
179
  ```rust
180
- use simple_agents_types::router::RoutingStrategy;
180
+ use simple_agent_type::router::RoutingStrategy;
181
181
  use async_trait::async_trait;
182
182
 
183
183
  #[async_trait]
@@ -230,7 +230,7 @@ MIT OR Apache-2.0
230
230
 
231
231
  ## Next Steps
232
232
 
233
- After `simple-agents-types`, the next crates to implement are:
233
+ After `simple-agent-type`, the next crates to implement are:
234
234
 
235
235
  1. `simple-agents-providers` - OpenAI, Anthropic, etc.
236
236
  2. `simple-agents-healing` - JSON parser with coercion