Python bindings for the smolcode agent engine (Rust core)
Project description
smolcode-core
Python bindings for smolcode — an SLM-optimized, opencode-class terminal coding agent built in Rust on the LiteForge SDK.
The smolcode_core extension module embeds the Rust agent engine (the agent
loop, tool execution, and multi-format tool-call extraction) so Python apps can
drive a full coding-agent session against any OpenAI-compatible endpoint.
Install
pip install smolcode-core
Quickstart
import smolcode_core
# Load config (model, base_url, agent profile) and open a session.
session = smolcode_core.Session(
workspace=".",
agent="build",
model="qwen2.5-coder:7b",
base_url="http://localhost:11434/v1",
)
session.start_turn("Add a docstring to main.py", think=None, yolo=False)
while True:
event = session.poll_event()
if event is None:
break
print(event)
Session exposes the same engine the smolcode TUI uses: turn streaming via
poll_event, tool-approval gating (approve), custom Python tools
(register_tool), session persistence (save / load_session / fork), and
MCP discovery (list_mcp). Config mirrors the on-disk smolcode configuration.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smolcode_core-0.1.0.tar.gz.
File metadata
- Download URL: smolcode_core-0.1.0.tar.gz
- Upload date:
- Size: 193.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b118aa66fe66df42be58b64688a17836d4b5883b662e12454e74289415713d8
|
|
| MD5 |
57fc55f3f810dbdd5dffb3a2266343ce
|
|
| BLAKE2b-256 |
b06d6d8f3efe8562a3ac4bb36c3a4e6cbf0ae1aec870fb0a8aca41313be9a630
|
Provenance
The following attestation bundles were made for smolcode_core-0.1.0.tar.gz:
Publisher:
release.yml on seanpoyner/smolcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smolcode_core-0.1.0.tar.gz -
Subject digest:
0b118aa66fe66df42be58b64688a17836d4b5883b662e12454e74289415713d8 - Sigstore transparency entry: 1831399098
- Sigstore integration time:
-
Permalink:
seanpoyner/smolcode@a402e3a557d769fc0d0437f02faf2af421746f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/seanpoyner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a402e3a557d769fc0d0437f02faf2af421746f5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file smolcode_core-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: smolcode_core-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76d7e634c831fa7bc2d50c5234b5a11d8e01b4fab6a86fbddac56101ab0f16e6
|
|
| MD5 |
2c42013d7de767713193c8a023cc81c8
|
|
| BLAKE2b-256 |
f17509b0a1b45edbbab3b479d5965343fd8053b13d0f40ad95d62191cbc29433
|
Provenance
The following attestation bundles were made for smolcode_core-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on seanpoyner/smolcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smolcode_core-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
76d7e634c831fa7bc2d50c5234b5a11d8e01b4fab6a86fbddac56101ab0f16e6 - Sigstore transparency entry: 1831399321
- Sigstore integration time:
-
Permalink:
seanpoyner/smolcode@a402e3a557d769fc0d0437f02faf2af421746f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/seanpoyner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a402e3a557d769fc0d0437f02faf2af421746f5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file smolcode_core-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: smolcode_core-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58d6d88ddc01b20df4c0a1db88caa515f9d5605b2853e0390ab526f5c30dfd8f
|
|
| MD5 |
10b83e16493132ffd3150c9e37a53613
|
|
| BLAKE2b-256 |
079f13dc7c9ec78f9219cdf968a2dcc211ff7900d6e428e31d5654e53281e5e2
|
Provenance
The following attestation bundles were made for smolcode_core-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on seanpoyner/smolcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smolcode_core-0.1.0-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
58d6d88ddc01b20df4c0a1db88caa515f9d5605b2853e0390ab526f5c30dfd8f - Sigstore transparency entry: 1831399577
- Sigstore integration time:
-
Permalink:
seanpoyner/smolcode@a402e3a557d769fc0d0437f02faf2af421746f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/seanpoyner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a402e3a557d769fc0d0437f02faf2af421746f5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file smolcode_core-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: smolcode_core-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4fbdb9b9b9ffb1aa89dbe74a7ce19201a12531ad7f267a13712d0063a6c9f32
|
|
| MD5 |
3b55be7e7e912d8d020e6b0552e3335b
|
|
| BLAKE2b-256 |
db5cc5b7ca353a003a4224ffcf5b6790f9afc828f74911c23fa6977053991f43
|
Provenance
The following attestation bundles were made for smolcode_core-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on seanpoyner/smolcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smolcode_core-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl -
Subject digest:
c4fbdb9b9b9ffb1aa89dbe74a7ce19201a12531ad7f267a13712d0063a6c9f32 - Sigstore transparency entry: 1831400579
- Sigstore integration time:
-
Permalink:
seanpoyner/smolcode@a402e3a557d769fc0d0437f02faf2af421746f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/seanpoyner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a402e3a557d769fc0d0437f02faf2af421746f5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file smolcode_core-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: smolcode_core-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
078436b2672ef8e5069f52c84e06f9109d202b4ed78ef611fc240585f6920d21
|
|
| MD5 |
e89594b1ffa643e1b499f086197e7fe9
|
|
| BLAKE2b-256 |
dc28843bb0d83c9eb7fa018edb44c794fd821ad6c6302f1af76e9887fc297828
|
Provenance
The following attestation bundles were made for smolcode_core-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
release.yml on seanpoyner/smolcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smolcode_core-0.1.0-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
078436b2672ef8e5069f52c84e06f9109d202b4ed78ef611fc240585f6920d21 - Sigstore transparency entry: 1831400078
- Sigstore integration time:
-
Permalink:
seanpoyner/smolcode@a402e3a557d769fc0d0437f02faf2af421746f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/seanpoyner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a402e3a557d769fc0d0437f02faf2af421746f5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file smolcode_core-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: smolcode_core-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baf0d1a46498e022329592d578a096799b2facc482b6a6b1a5cdea9b05dbbe39
|
|
| MD5 |
706ca26ba5bda9618fd72169d128a2b4
|
|
| BLAKE2b-256 |
5b85d265bd68372a69262e61b2975df2417757e30dd713f191a6be198478b751
|
Provenance
The following attestation bundles were made for smolcode_core-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on seanpoyner/smolcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smolcode_core-0.1.0-cp310-cp310-manylinux_2_28_x86_64.whl -
Subject digest:
baf0d1a46498e022329592d578a096799b2facc482b6a6b1a5cdea9b05dbbe39 - Sigstore transparency entry: 1831399856
- Sigstore integration time:
-
Permalink:
seanpoyner/smolcode@a402e3a557d769fc0d0437f02faf2af421746f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/seanpoyner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a402e3a557d769fc0d0437f02faf2af421746f5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file smolcode_core-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: smolcode_core-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6edb3489f370df835d5985154b41e03adb26a6ebd741263fed49a074c8cf41f1
|
|
| MD5 |
7702bcbe6a7d67c8d4d2ad2cbd46b334
|
|
| BLAKE2b-256 |
5f2ae058830d0d6c370799ffb60098bcddc0b60b23ffd12d9090db00402271a3
|
Provenance
The following attestation bundles were made for smolcode_core-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:
Publisher:
release.yml on seanpoyner/smolcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smolcode_core-0.1.0-cp310-cp310-macosx_11_0_arm64.whl -
Subject digest:
6edb3489f370df835d5985154b41e03adb26a6ebd741263fed49a074c8cf41f1 - Sigstore transparency entry: 1831400299
- Sigstore integration time:
-
Permalink:
seanpoyner/smolcode@a402e3a557d769fc0d0437f02faf2af421746f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/seanpoyner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a402e3a557d769fc0d0437f02faf2af421746f5c -
Trigger Event:
push
-
Statement type: