Repository navigation
LlamaIndex
Outcome-aware list[llama_index.core.tools.FunctionTool] wrapping your engine's MCP tool surface
via llama-index-tools-mcp's real BasicMCPClient — with a typed ExecutionReceipt as
ToolOutput.raw_output (not a stringified blob) and named-gate AlgentaToolDenied denials.
pip install llamaindex-algenta
pip install "llamaindex-algenta" "llama-index-workflows<2.24" # see note below — needed for FunctionAgent todayDepends on llama-index-core + llama-index-tools-mcp + a pinned mcp<2.0.0 (works around a
real, currently-live upstream bug in llama-index-tools-mcp 0.5.0); deliberately no
algenta-sdk dependency.
import asyncio
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI # pip install llama-index-llms-openai
from llamaindex_algenta import create_algenta_tools
async def main() -> None:
tools = await create_algenta_tools(base_url="http://localhost:8000/mcp", profile="observe")
agent = FunctionAgent(tools=tools, llm=OpenAI(model="gpt-5"))
print(await agent.run(user_msg="what should we do?"))
asyncio.run(main())create_algenta_tools is async def, matching McpToolSpec.to_tool_list_async()'s real primary
interface. profile="observe" is the default.
All four, per the contract: observe (default) · govern · execute · full
(opt-in). Filtering is client-side (the raw MCP list_tools() has no server-side name filter) —
a disallowed tool is never turned into a FunctionTool at all.
-
llama-index-workflows<2.24workaround: a fresh install today resolvesllama-index-workflows==2.24.0, with which everyFunctionAgent.run()fails (TypeError: unhashable type: 'FunctionAgent'). The package deliberately does not pin this — it never imports workflows, and a ceiling on a dependency it doesn't own would block resolution later. Install the working pair yourself until llama-index-core fixes it. -
Denial propagation:
AlgentaToolDeniedpropagates unmodified from a baretool.acall(), but a realFunctionAgentcatches all exceptions intoToolOutput(is_error=True)— inspect theToolCallResult, don't wrapagent.run()intry/except. Documented honestly in the package README. -
Tests: real
FastMCPstub server, all three gates plus the success path, through both a directacalland a realFunctionAgent.run()—uv run pytest llamaindex-algenta -v.
Full reference: package README
(execution outcome mapping, the mcp<2.0.0 pin evidence, receipt citations).
thyn-ai/algenta-integrations · Apache-2.0 · The Algenta engine is separate, closed-source software — these packages are ordinary Python and TypeScript talking to its public HTTP/MCP APIs. · Support · Security · Discord
Start here
Framework guides
- LangChain
- LlamaIndex
- Pydantic AI
- MS Agent Framework
- Haystack
- LiteLLM
- Ray Serve
- vLLM
- Vercel AI SDK
- n8n
Project