Releases: RendixNetwork/eirel
Release list
v0.5.2
v0.5.1
Enhance submission status reporting and summary display.
v0.5.0 — RagTool + graph_general_chat example
Added
eirel.RagTool— miner-facing client for the subnet'srag-tool-service. CallsPOST /v1/rag/retrievewith{corpus_id, query, k}and returns ranked chunks. Tool namerag.retrievematches the validator'stool_attestationledger key, sorag_requiredeval tasks score the call as routed when miners use this tool.examples/graph_general_chat/— full graph agent example demonstrating how to readmetadata.rag_corpus_idfrom the request envelope.
Fixed
test_decode_rejects_tampered_tokenflake on Python 3.13 (deterministic char flip instead of+ "00"collision).
Operator notes
- Miner pods need
EIREL_RAG_URL(injected byruntime_managerfrom the orchestrator'sEIREL_RAG_TOOL_URL). rag_requiredpool kind ships ineirel-eval-pool; bundles carry a top-levelcorporafield. Owner-sidecorpus_indexerindexes per run on cache miss.
See CHANGELOG.md for full notes.
v0.4.0 — Graph SDK rebuild
[0.4.0] - 2026-05-05
This is a substantial release that re-bases the SDK around a graph
authoring shape (StateGraph + GraphAgent) and ships the
checkpoint / memory / safety / structured / tracing primitive
packages miners need for production-grade agent design. Legacy
schema fields are removed in the same release; the slim contract
(prompt + history) is now THE contract.
This is a breaking release. Miners reading legacy fields
(primary_goal, subtask, context_history, tools,
tool_choice, execution_mode) will fail to deserialize 0.4.0
AgentInvocationRequest. Migration guide below.
Added
Graph SDK — the canonical authoring shape
eirel.graphpackage:StateGraphbuilder
(add_node/add_edge/add_conditional_edges/
add_parallel_edges/set_entry_point/compile),
typedGraphStatewith reducer registry (add_messages,
merge_dict,replace),Node/ToolNode/
LLMNode/BranchNode,Edge/ConditionalEdge/
ParallelEdge, asyncruntimeexecutor withContextVar-
scopedRunContextcarrying budget / cost / trace / job_id,
andcompile-time validation (no orphans, every path reaches
END, cycles need explicitrecursion_limit).eirel.graph.patternssub-package:SelfConsistencyNode
(N-sample majority vote with pluggable aggregator),
ReflectionNode(generate → critique → revise loop with
max_iterationscap),PlannerExecutorNode(planner emits
ordered steps; executor runs them with replan-on-failure),
ReActNode(Thought → Action → Observation loop with step cap).eirel.agents.GraphAgent: the canonical authoring class.
Wraps aCompiledGraph+to_state/from_statemappers.
MinerAppaccepts anyBaseAgentso wrapping is the
one-line bridge to existing infrastructure.examples/graph_general_chat/app.py: full working
general_chatagent built as a graph — the reference shape
for new miners.
Stateful agents — checkpoint + memory
eirel.checkpointpackage:CheckpointerABC
(aput/aget/alist/adelete); concrete
MemoryCheckpointer,SqliteCheckpointer(eirel[sqlite]
extra),PostgresCheckpointer(eirel[postgres]extra).
encode_thread_id(thread_id, checkpoint_id)reuses the
existing HMAC scheme fromtoken_signing. Hard cap of 256 KB
per checkpoint blob; over-cap forces rolling-summary path.eirel.memorypackage:RollingSummary(re-summarizes
the head ofmessagesevery N turns);VectorStoreABC with
Chroma / Qdrant adapters under extras.
Safety + tracing + structured output
eirel.safetypackage:GuardABC withpre_input+
post_outputhooks;GuardVerdict(allow, reason, redactions);
built-inNoopGuard,ChainedGuard. Optional adapters under
eirel[safety-llamaguard]/eirel[safety-nemo]. Graph
runtime callsGuard.pre_inputbefore entry and
Guard.post_outputbeforeEND.eirel.tracingpackage:TracerABC
(span_start/span_end/event); built-in
NoopTracer,StdoutTracer;LangfuseTracerunder
eirel[tracing-langfuse]. Graph runtime emits per-node spans.eirel.structuredpackage:StructuredOutputNode(schema)
with bounded retry + JSON repair (Outlines-compatible interface,
no hard dep). Multimodal helpers (ImageInput,AudioInput)
carried inContextMessage.metadata.
Tool catalog upgrades
UrlFetchTooladded togeneral_chatfamily
(EIREL_URL_FETCH_URL/EIREL_URL_FETCH_TOKENenv). Tool
spec{url, max_chars?, include_links?}→
{title, content, links[], status_code, content_type}.
Talks to owner-api's url-fetch service with hotkey-style auth,
per-host rate limits, and a 1 MB response cap.- Sandbox session persistence:
SandboxToolparameters now
includesession_idfor kernel reuse across calls (5-min idle
TTL) andattachmentsfor pre-mounted files. Response includes
filesfor files written into the sandbox FS during execution.
SandboxSessionconvenience wrapper threads the same
session_idacross multiple calls. RetryPolicyandFallbackChainon
GeneralChatToolCatalog.execute_with_policy(name, args, policy=)keeps the existingexecute(...)byte-identical;
execute_manyaccepts per-callpolicyin
PendingToolCall.policy. Recovery from transient tool errors
is now a primitive, not bespoke graph wiring.
Schema additions
TurnPydantic model:{user: str, assistant: str | None}
pair. Mirrors the eval pool's source-row shape.AgentInvocationRequest.turns: list[Turn] | None: optional
structured transcript for multi-turn fixture dispatch (eval mode).
When set,historyis also populated (flattened) so naive
miners that only readhistorykeep working; agents with
session-memory infrastructure should preferturnsfor the
structural signal. Documented expectation: agents infer task
shape from prompt / history / turns / inputs content — there is
intentionally NO category field on the wire (eval and product
traffic are indistinguishable).manifest.runtime.kindnow accepts"graph"for
graph-runtime miners alongside the default"base_agent".
Owner-api uses the kind to discriminate dispatch (chat-completions
envelope vs graph-runtime envelope).
Removed (BREAKING)
- All BaseAgent deprecation machinery.
__init_subclass__
warning,_CANONICAL_SUBCLASSESfrozenset, and the
BaseAgent.from_graphclassmethod shim are gone.BaseAgent
is now the minimal abstract baseGraphAgent(and any
hand-written subclass) inherits from. The deprecation warning
was originally targeted for 0.6.0 removal; brought forward. - Legacy schema fields on
AgentInvocationRequest—
primary_goal,subtask,context_history,tools,
tool_choice,execution_mode. Thefold_legacy_fields
validator that mapped them to the slim contract is also removed.
Slim contract (prompt+history) is now THE contract. AgentInvocationResponse.progressfield — was unused;
removed for cleanliness._request_runtime_valuelegacy fallback parameters
(legacy_input_key/legacy_metadata_key) in
helpers.py.workflow_request_contextnow reads canonical
fields only.SemanticScholarToolandXApiTool— removed from the
general_chatfamily tool catalog. SDK modules and tests
deleted;EIREL_SEMANTIC_SCHOLAR_*/EIREL_X_API_*env vars
are no longer read. Migration: drop imports and the
corresponding entries from your tool catalog.WebSearchTool
andSandboxToolremain;UrlFetchTooljoins them.tests/test_tool_protocol.py— entire file deleted (tested
the removedtools/tool_choiceschema fields).tests/test_base_agent_migration.py— was about deprecation
warnings; deleted with the deprecation machinery.examples/general_chat_agent/directory deleted. Functionally
superseded byexamples/graph_general_chat/(canonical graph
authoring shape) plus the inline minimal-BaseAgentexample
in the README's Quick Start.examples/sample_miner/remains
as the minimum-valid-submission reference +eirel compliance
smoke target.
Changed
chat_payload_from_agent_requestrewritten to use the
slimprompt+historycontract. Legacy-field readers
no longer compile.ContextMessagevalidator error message now says "history"
instead of "context_history".
Migration from 0.3.x
If your miner reads the old fields, change:
# 0.3.x
text = request.subtask or request.primary_goal
for msg in request.context_history:
...
# 0.4.0
text = request.prompt
for msg in request.history:
...If your agent subclassed BaseAgent to consume the deprecation
warning suppression, drop that — there is no warning anymore.
BaseAgent is a clean abstract base; subclassing or wrapping
GraphAgent both work.
If your agent reads tool-platform env vars for X or Semantic
Scholar, those tool services are removed from the family catalog.
Replace with WebSearchTool (general) or use the new
UrlFetchTool for specific-URL extraction.
eirel SDK v0.3.1
Added
- `JobIdContextMiddleware` in `eirel.runtime_context` — captures
the per-request `X-Eirel-Job-Id` header that owner-api stamps on
every miner-bound request, stashes it in a ContextVar, and has
`AgentProviderClient` (proxy mode) forward it as the provider-proxy
attribution key on every outbound LLM call. Overrides the
deployment-sticky `EIREL_PROVIDER_PROXY_JOB_ID` env-var default. - Mounted automatically on `MinerApp` and `build_agent_app`. No agent
app changes required.
Why
Enables per-task LLM cost attribution end-to-end. Owner-api
generates a unique `task-eval=<turn_id>;deployment=` tag per
validator request, the miner SDK forwards it to the provider-proxy,
provider-proxy ledgers the LLM cost under that tag, and owner-api
reads the ledger after the response stream closes — injecting
`metadata.proxy_cost_usd` into the final `done` chunk so the
validator sees the actual per-task spend for each miner.
Without this release miners on 0.3.0 still charge under the
deployment-sticky job_id, so per-task cost figures are present but
broad (per-deployment rollup rather than per-task). With 0.3.1
installed on the miner, owner-api's per-task cost lookup matches the
exact LLM spend for that single task evaluation.
Trust model
The header is set by owner-api on the only path validator traffic
takes to the miner pod, so the miner cannot tamper with attribution
short of running a custom SDK that ignores the header — which is
visible to operators as `metadata.proxy_cost_absent=true` in the
validator log and on the dashboard.
Migration
- Re-submit your agent on 0.3.1 to enable per-task cost attribution.
- 0.3.0 miners continue to work — they just attribute cost at
deployment-sticky granularity instead of per-task. - Anything that explicitly sets `X-Eirel-Job-Id` on outbound
provider-proxy calls (custom SDK forks) will still work; the
ContextVar wins only when set by the middleware.
See CHANGELOG.md for the full diff.
eirel SDK v0.3.0
Architecture
Eirel is repositioning around a multi-agent / multi-family shape. A
future DAG orchestrator will route consumer requests across specialist
family agents. `general_chat` is the first family — purely specialized
for general chat, no orchestration responsibility. 0.3.0 reshapes the
family-agent contract to match: stateless, specialty-only, no
session/orchestration leakage.
Breaking changes
- Slim agent invocation contract. `AgentInvocationRequest` now
exposes flat `prompt`, `mode`, `web_search`, `history`, `turn_id`
fields. Legacy fields (`primary_goal`, `subtask`, `inputs`,
`context_history`, `family_id`, plus the workflow-DAG bag) remain
on the model for one release only and are auto-folded into the
new fields by a model validator. Removed in 0.4.0. - `AgentInvocationResponse.tool_calls` removed. The top-level
field conflated "what the LLM emitted" with "what the agent's Python
ran" and clashed with the OpenAI naming. Executed tool calls now live
under `metadata["executed_tool_calls"]`. Same change on
`StreamChunk` — the trailing `done` chunk no longer carries
top-level `tool_calls`. - Answer-key leak fixed. The validator's `_build_body` previously
merged `task.expected_output` into the miner-visible payload via
`inputs.expected_output`. Datasets that populated this field
effectively shipped the grading key on every call. The slim body
drops `expected_output` and `metadata` entirely from the wire.
Added
- `ChatRequest` (consumer-chat-api) gains `mode`
(`instant`/`thinking`) and `web_search` fields, propagated
through to the family agent on every turn. - `context_from_request()` reads the new flat fields first and falls
back to the 0.2.x shape, so an agent built against 0.3.0 keeps
parsing legacy traffic during the migration.
Migration
- Miners using `MinerApp` / `BaseAgent` should re-submit on 0.3.0 to
read the slim contract directly. 0.2.x miners continue to receive
legacy fields populated by the validator and the orchestrator
during the migration window. - Anything reading `response.tool_calls` must move to
`response.metadata["executed_tool_calls"]`. The `done` chunk uses
the same key.
See CHANGELOG.md for the full diff.
v0.2.4
Highlights
MinerAppnow exposesPOST /v1/agent/infer/stream(was missing in 0.2.3 — onlybuild_agent_apphad it). Closes the 404-fallback gap for every miner that usesMinerApp, including the bundledexamples/general_chat_agent.- New
AgentProviderClient.chat_completions_stream(payload)async generator. Direct mode passesstream=Trueto chutes / openai / openrouter and parses SSE; proxy mode falls back to one buffered chunk until the subnet provider-proxy adds SSE pass-through. - New
MinerApp(agent_stream_handler=…)constructor arg lets agent authors yield realStreamChunkdeltas as the LLM produces tokens. - Example general_chat agent updated to override
agent_stream_handlerusing the new provider streaming method, so consumer chat gets real token-by-token rendering when the proxy supports it.
See CHANGELOG.md for full details.
v0.2.3
Streaming agent inference endpoint. See CHANGELOG.md.
v0.2.1
v0.2.0
Changelog
All notable changes to the Eirel SDK are documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
Unreleased
0.2.0 - 2026-04-18
Fixed
WebSearchToolendpoint and payload — the tool client now calls
POST /v1/searchwith{query, top_k}to match the tool-service
contract; prior versions hit a non-existent/v1/tools/web_search
path and always 404'd. Miners on 0.1.x who relied on web_search
silently got zero citations. Breaking for anyone mocking the tool
HTTP layer directly.- Reasoning-model response length —
_run_turnin the
general_chat_agentexample now sends
max_tokens = output_tokens + reasoning_tokenswith a 2048 floor.
At the oldoutput_tokenscap, reasoning-only models (e.g.
Kimi-K2.5-TEE) burned the entire budget on hidden reasoning and
returnedcontent=""→ cascading 502s at the subnet proxy.
Added
- Per-tool authentication tokens — the example now prefers
EIREL_WEB_SEARCH_TOKEN,EIREL_SEMANTIC_SCHOLAR_TOKEN,
EIREL_X_API_TOKEN,EIREL_SANDBOX_TOKENover the shared
EIREL_TOOL_SERVICE_TOKENfallback, letting each tool service
enforce its own auth secret. - Miner-level job id for tool cost attribution —
_build_catalog
usesEIREL_PROVIDER_PROXY_JOB_ID(which the runtime sets to
miner-<deployment_id>) so LLM and tool costs accumulate on the
same provider-proxy record that the subnet reads when aggregating
DeploymentScoreRecord.tool_cost_usd.
Changed
httpxdependency range loosened from<0.29to<1so fresh
installs don't break when httpx ships its next minor release.
0.1.0 - 2026-04-17
Initial public release of the EIREL miner SDK.
Added
BaseAgentabstract class withinfer,health, andregistrationhooks.MinerAppFastAPI wrapper with/v1/chat/completionsand/v1/agent/inferendpoints.build_agent_apphelper for standaloneBaseAgentFastAPI apps.AgentProviderClientwithMinerProviderConfig.from_env()— supports OpenAI, Anthropic, OpenRouter, and Chutes backends.- Inbound request authentication —
Signer/load_signerviaeirel[submit]extra, validated withX-Hotkey/X-Signature/X-Timestamp/X-Request-Idheaders. - Resume-token HMAC-SHA256 signing for multi-turn workflows.
general_chatfamily support — budget, context, response helpers, and tool clients (web search, Semantic Scholar, X API, sandbox).- Single
eirelCLI with subcommands:submit,status,package,compliance,register,serve,sample. py.typedmarker — SDK ships typed per PEP 561.