knolo-core icon indicating copy to clipboard operation
knolo-core copied to clipboard

Feature request: smolagents (Hugging Face) integration

Open HiveForensicsAI opened this issue 3 weeks ago • 0 comments

For human review. This issue was drafted from the Knolo Adoption Targets research. A human will review it and implement it manually. No code or pull request accompanies it.

Motivation

smolagents is Hugging Face's minimal code-agent library under Apache-2.0. It supports MCP through ToolCollection.from_mcp, so @knolo/mcp should load directly, and tools can be shared on the Hugging Face Hub, a large discovery surface for the open-source AI community.

Adoption case

Sheet traction (Knolo Adoption Targets, candidate 2026-11-09):

  • huggingface/smolagents: 30,271 GitHub stars, Apache-2.0 (GitHub API, checked 2026-11-09)
  • PyPI smolagents: 175,098 downloads last week (https://pypistats.org/api/packages/smolagents/recent, checked 2026-11-09)

Sources: https://github.com/huggingface/smolagents ; https://huggingface.co/docs/smolagents/tutorials/tools ; https://pypistats.org/packages/smolagents

What exists today

  • @knolo/mcp 0.2.0 on npm: stdio server with the read-only tools knolo_search, knolo_get, knolo_verify, knolo_status (plus KAR and Cortex tools only when a graph is pinned). Started with npx -y @knolo/[email protected] --config /absolute/knolo-mcp.json. Stdio only, no network at runtime.
  • @knolo/tools 0.2.0: host-agnostic read-only service that pins a V5 Knowledge Image by file SHA-256 and state root, checks the policy root, and writes a query receipt before results return.
  • @knolo/core 6.2.0 and @knolo/cli 6.2.1 on npm. PyPI knolo 5.5.1 (packages/core-python) has no KAR features.
  • Python MCP smoke pattern already in the repo: examples/pydantic_ai (PR #123, relates to #103) and examples/langflow (PR #124, relates to #104), each with its own CI job that runs offline against prepare-fixture.mjs and checks a qr_ receipt with no model call. PR #125 (open) adds the same for Dify (#99).

Proposed design

  1. examples/smolagents: a smoke that loads published @knolo/[email protected] over stdio with ToolCollection.from_mcp, lists the four read-only tools, and calls the knolo_search tool directly against the fixture image. It checks the hit object id, the sha256- state root and a qr_ receipt id, without building a model-backed agent.
  2. A CI job smolagents-smoke (Python 3.12, Node 20) with a pinned smolagents version and its MCP extra.
  3. docs/integrations/smolagents.md showing a CodeAgent or ToolCallingAgent using the Knolo tools, with a note on running code agents in a sandbox.
  4. Optional, decided at review: a Knolo tool published to the Hugging Face Hub. That publish is a manual step.

Scope

In: the example, the CI smoke, the integration doc. Out: a Python port of KAR or Cortex, hosted services, network image downloads, write tools, model calls inside Knolo. Publishing to the Hugging Face Hub is a separate manual step.

Acceptance criteria

  • The smoke runs offline in CI against a fixture image and returns results with a qr_ receipt id and no model call.
  • Pin, policy and audit failures surface the same error codes as @knolo/tools.
  • KAR and Cortex tools only appear when a graph is pinned.
  • Docs state that verification checks integrity and does not decide that a claim is true.

Open questions

  • Does ToolCollection.from_mcp need trust_remote_code=True for a local stdio server, and how should the docs explain that?

Related

  • #103 / PR #123: Pydantic AI smoke (same MCP-first Python pattern)
  • #104 / PR #124: Langflow smoke
  • #126: Agno integration (same MCP-first Python pattern)

Knolo is open source under Apache-2.0, built by Hive Forensics AI Inc. R&D.

HiveForensicsAI avatar Nov 09 '26 08:11 HiveForensicsAI