Skip to main content

Single-shot LLM call tool with Jinja2 templating for exoclaw

Project description

exoclaw-tools-llm-call

Single-shot LLM call tool with Jinja2 templating for exoclaw.

No agent loop, no tools — just prompt in, text out. Use with batch for parallel cheap-model processing.

Usage

from exoclaw_tools_llm_call import LLMCallTool

llm_call = LLMCallTool(
    provider=provider,
    allowed_models=["haiku", "sonnet"],
    default_model="haiku",
)
app = Exoclaw(tools=[llm_call, ...])

The agent can then call:

{
  "prompt": "Feed: {{ feed_name }}\n\n{{ file(data_path) }}\n\nExtract interesting URLs as JSON.",
  "vars": {"feed_name": "Simon Willison", "data_path": "/tmp/batch_abc/0.json"},
  "model": "haiku",
  "output": "/tmp/results/0.json"
}

Template features

  • {{ var }} — variable substitution from vars dict
  • {{ file('/path/to/file') }} — inline file contents
  • All Jinja2 features: filters, conditionals, loops

Combined with batch

batch(tool="llm_call", items=[
  {prompt: "...", vars: {data_path: "/tmp/feeds/0.json"}, model: "haiku", output: "/tmp/out/0.json"},
  {prompt: "...", vars: {data_path: "/tmp/feeds/1.json"}, model: "haiku", output: "/tmp/out/1.json"},
  ...
])

93 cheap LLM calls in parallel. Main agent only sees the filtered output.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exoclaw_tools_llm_call-0.3.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exoclaw_tools_llm_call-0.3.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file exoclaw_tools_llm_call-0.3.0.tar.gz.

File metadata

  • Download URL: exoclaw_tools_llm_call-0.3.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for exoclaw_tools_llm_call-0.3.0.tar.gz
Algorithm Hash digest
SHA256 edc97c367a320e3e5b9bbef4bd8a697bd150f69bc7b806a64caee0fc4e546b93
MD5 0cb5fba6c0e35e985afaa35172efd763
BLAKE2b-256 c736fdce69dda38506da6a3141ecdbc2ebd863246d9fa91e101cfcff78425d5f

See more details on using hashes here.

File details

Details for the file exoclaw_tools_llm_call-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: exoclaw_tools_llm_call-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for exoclaw_tools_llm_call-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f946d48fd3e479bd308e0d4dace8b2f9d8ae7e62313f7b6a50d2166e338928a2
MD5 5b7252469ff87f7d76344baa464ad5c6
BLAKE2b-256 884767d6ac6a28dd8e5163cd97c3420ab9f04585d34558ee1d03cb4a7ead8abd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page