Skip to content

nicobernad/alia-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ALIA Python

Plug-and-play access to ALIA Quality Network for Python agent frameworks.

Three packages for AI agent developers building on Python:

Package Description PyPI
alia-core Shared helpers, ABIs, RPC layer pypi/alia-core
alia-langchain LangChain BaseTool wrappers (12 tools) pypi/alia-langchain
alia-crewai CrewAI BaseTool wrappers (12 tools) pypi/alia-crewai

Quick Start

LangChain

pip install alia-langchain
from alia_langchain import all_alia_tools
from langchain_anthropic import ChatAnthropic
from langchain.agents import create_tool_calling_agent, AgentExecutor

tools = all_alia_tools(chain="base")
llm = ChatAnthropic(model="claude-sonnet-4-5")

agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({
    "input": "Compare the quality of Aave and Morpho on Base, and tell me which one is safer right now."
})

CrewAI

pip install alia-crewai
from alia_crewai import all_alia_tools
from crewai import Agent, Task, Crew

tools = all_alia_tools(chain="base")

quality_analyst = Agent(
    role="DeFi Quality Analyst",
    goal="Identify high-quality protocols for capital deployment",
    tools=tools,
    backstory="You analyze protocols using ALIA Quality Network data."
)

task = Task(
    description="Find the top 5 lending protocols on Base above tier A.",
    agent=quality_analyst
)

crew = Crew(agents=[quality_analyst], tasks=[task])
result = crew.kickoff()

Direct usage (alia-core only)

pip install alia-core
from alia_core import AliaClient

client = AliaClient(chain="base")
score, timestamp = client.quality_get_latest(subject_id="0x...")
print(f"Score: {score} (tier: {client.tier_of(score)})")

12 tools v1

Same 12 tools as the MCP server (alia-mcp-server):

  1. quality_get_latest — score + timestamp + tier
  2. quality_get_tier — tier code (UNSCORED..AAA)
  3. quality_get_history — last N records
  4. forecast_get_latest — 30/60/90-day probabilistic forecast
  5. circuit_status — circuit breaker state
  6. subject_id_compute — canonical ERC-8240 subjectId
  7. quality_compare_subjects — rank N subjects (Quality Arbitrage)
  8. quality_top_n — top N by tier
  9. portfolio_quality_aggregate — weighted-average portfolio quality
  10. evaluator_list — authorized evaluators metadata
  11. quality_get_at_time — score at past timestamp (Carfax)
  12. scorer_dimensions — bridge / key management dimensional breakdown

Roadmap: 40+ tools across 3 phases — see alia-mcp-server.


Architecture

alia-python (monorepo)
├── packages/
│   ├── alia-core/         ← shared: helpers, ABIs, RPC client
│   ├── alia-langchain/    ← LangChain BaseTool wrappers
│   └── alia-crewai/       ← CrewAI BaseTool wrappers
└── .github/workflows/      ← PyPI publish automation

alia-langchain and alia-crewai both depend on alia-core. All three packages follow the same versioning lockstep (0.1.0 initial release).


Doctrine alignment

Every tool in this monorepo maps to ALIA Doctrine 7 piliers V1.1:

  1. Décentralisation philosophiqueevaluator_list exposes federation
  2. Super pouvoirs utilisateursportfolio_quality_aggregate powers Daily Quality Brief; quality_compare_subjects powers Quality Arbitrage
  3. Angles différents et complémentairesforecast_get_latest exposes what oracle networks don't
  4. Droit à la contestation — Phase 3 (sem 12-24)
  5. Séparation des pouvoirsevaluator_list exposes accountability
  6. Protection contre la captation algorithmique — methodologies stay private, only outputs are exposed
  7. Permanence mémoire qualitéquality_get_history, quality_get_at_time

Full doctrine: DOCTRINE_ALIA_7_PILIERS_V1.1.


Configuration

Environment variables (all optional; safe defaults provided):

ALIA_RPC_BASE=https://mainnet.base.org
ALIA_RPC_BNB=https://bsc-dataseed.binance.org
ALIA_RPC_GNOSIS=https://rpc.gnosischain.com

ALIA_QORI_BASE=0x...
ALIA_FORECASTER_BASE=0x...
ALIA_CIRCUIT_BASE=0x...
ALIA_BRIDGE_SCORER_BASE=0x...
ALIA_KEY_MGMT_BASE=0x...
# (... same pattern for BNB and GNOSIS)

Why this matters

LangChain and CrewAI together cover ~70% of the Python agent ecosystem in 2026. By publishing first-class wrappers for both, ALIA Quality Network becomes natively consumable by:

  • LangChain agents with tool calling (Claude, GPT, Anthropic, OpenAI patterns)
  • CrewAI multi-agent crews (research, analysis, decision-making patterns)
  • AutoGen, LlamaIndex (via LangChain compatibility layer)
  • Custom agents using alia-core directly

Combined with alia-mcp-server for MCP-native clients (Claude Desktop, Cursor, Codex, Gemini), ALIA covers the full agentic surface area.

Chainlink provides the price. ALIA provides the quality.


License

MIT — see LICENSE.


Contact

Patrick Nicolas Badoux — Founder & CEO, Avvatar Labs patrick@avvatar.io · +34 655 974 904

Dashboard: oracle.alia.network Docs: alia-docs.avvatar.io

About

ALIA Quality Network — Python integrations for AI agent frameworks. LangChain + CrewAI tool wrappers (12 tools v1) for continuous quality scoring + probabilistic forecasting + circuit breaker state across EVM chains.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages