LangChain integration for the Agenium agent:// protocol — discover and communicate with AI agents via agent-to-agent DNS.
pip install langchain-ageniumfrom langchain_agenium import AgeniumTool
tool = AgeniumTool(agent_uri="agent://search.agenium")
result = tool.invoke("Find me AI papers about transformers")from langchain_agenium import AgeniumToolkit
toolkit = AgeniumToolkit(dns_server="185.204.169.26")
tools = toolkit.get_tools() # One LangChain tool per registered agentfrom langchain_openai import ChatOpenAI
from langchain.agents import initialize_agent
from langchain_agenium import AgeniumToolkit
llm = ChatOpenAI(model="gpt-4")
toolkit = AgeniumToolkit()
tools = toolkit.get_tools()
agent = initialize_agent(tools, llm, agent="zero-shot-react-description")
response = agent.run("Use the search agent to find papers about transformers")from langchain_agenium import AgeniumRetriever
retriever = AgeniumRetriever()
docs = retriever.invoke("search") # Find agents matching query| Class | Base | Description |
|---|---|---|
AgeniumTool |
BaseTool |
Send messages to a specific agent:// agent |
AgeniumToolkit |
BaseToolkit |
Auto-discover agents and create tools |
AgeniumRetriever |
BaseRetriever |
Search agents as LangChain Documents |
AgentResolver |
— | Low-level DNS resolution for agent:// URIs |
from langchain_agenium import AgeniumLLM, AgeniumEmbeddings, AgeniumVectorStore| Class | Base | Description |
|---|---|---|
AgeniumLLM |
LLM |
Use any agent:// as an LLM provider |
AgeniumEmbeddings |
Embeddings |
Get embeddings from agent:// endpoints |
AgeniumVectorStore |
VectorStore |
Use agent:// as vector store backend |
AgeniumMemory |
BaseMemory |
Persistent conversation history via agent:// |
AgeniumCallbackHandler |
BaseCallbackHandler |
Stream LangChain events to agents |
AgeniumLoader |
BaseLoader |
Load documents from agent:// endpoints |
AgeniumOutputParser |
BaseOutputParser |
Parse agent:// response formats |
from langchain_agenium import AgentResearchChain, AgentOrchestratorChain, AgentRAGChain| Chain | Description |
|---|---|
AgentResearchChain |
Fan-out queries to multiple agents, aggregate results |
AgentOrchestratorChain |
Route tasks to agents by capability |
AgentRAGChain |
Retrieval + generation split across agents |
All components accept:
dns_server— Agenium DNS server IP (default:185.204.169.26)dns_port— DNS server port (default:3000)timeout— Request timeout in seconds (default:30)
Agenium uses agent:// URIs for agent identity and DNS-based discovery. Agents register with the DNS system and communicate via the Agenium protocol (JSON over HTTPS).
- DNS resolution:
GET /agent/lookup/{name} - Agent listing:
GET /agents - Message format: Agenium Protocol Frame (version 1.0)
Supports optional domain registration on the Agenium DNS system using a marketplace API key (dom_<64 hex>). Pass api_key parameter to auto-register your agent on startup. Get your API key from the Telegram Domain Marketplace.
MIT