somnia-agents-llm-inference

Provides a high-level Python API for the Blender creation suite.

2|2|Updated May 19, 2026
One-click install
npx skills add https://github.com/somnia-chain/agentathon --skill somnia-agents-llm-inference-somnia-chain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: somnia-agents-llm-inference
Source: https://github.com/somnia-chain/agentathon/tree/main/somnia-agents-skills/skills/somnia-agents-llm-inference
Command: npx skills add https://github.com/somnia-chain/agentathon --skill somnia-agents-llm-inference-somnia-chain

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables smart contracts to perform deterministic LLM inference on-chain, so validator consensus can be maintained for AI-driven decisions. It turns natural-language prompts into byte-identical outputs that other contract logic can reliably branch on.

Core Features & Use Cases

  • Deterministic LLM Inference: Uses Qwen3-30B with fixed seed and temperature=0 for byte-identical results across validators.
  • Typed Inference APIs: Supports inferString, inferNumber, inferChat, and inferToolsChat for both simple classification and multi-turn reasoning.
  • On-chain Tool Yield/Resume: Lets contracts request LLM tool usage, yield calldata back to callers, then resume the conversation after execution.
  • MCP Tool Calling: Enables auto-executed MCP tool calls for real-world data or deterministic tool outputs.
  • Allowed-Values Constraints: inferString can be forced into a closed set to support safe branching logic.

Quick Start

Ask the LLM Inference agent to classify a review into one of the allowed sentiment labels and return the resulting string label for your contract to act on.

Frequently Asked Questions about somnia-agents-llm-inference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run deterministic LLM inference on-chain within a smart contract?

Deterministic LLM inference on-chain uses Qwen3-30B with fixed seed and temperature=0 to guarantee byte-identical outputs across validators, allowing smart contracts to safely branch on AI decisions without breaking consensus.

What is the best way to force an LLM to return a specific set of values for branching logic?

You can use the inferString function with allowed-values constraints to force LLM outputs into a closed set, ensuring safe and deterministic branching logic within your smart contracts.

How do smart contracts handle LLM tool calling and resume conversations after execution?

Smart contracts use the on-chain tool yield/resume mechanism where the contract yields calldata back to callers for tool execution, then resumes the multi-turn conversation by correctly handling the finishReason and tool_calls resume state.

Can I use MCP tool calling for deterministic AI outputs in multi-turn chat?

Yes, the inferToolsChat function supports MCP tool calling for deterministic AI outputs, enabling auto-executed MCP tool calls for real-world data or deterministic tool yields within multi-turn chat conversations.

Does on-chain LLM inference support both string classification and bounded integer outputs?

Yes, on-chain LLM inference supports both string classification and bounded integer outputs through typed inference APIs, specifically inferString for classification and inferNumber for bounded integer inference.

What are the limitations of using deterministic LLM inference for smart contract consensus?

Limitations of using deterministic LLM inference include the strict requirement for careful prompt determinism and correct handling of finishReason and tool_calls resume state, as deviations can break byte-identical consensus across validators.