composio-llamaindex
Adapts Composio tools to LlamaIndex's FunctionTool format so a LlamaIndex agent can call 1000+ apps through a single Composio session.
Installation
pip install composio composio-llamaindex llama-index llama-index-llms-openai
Set COMPOSIO_API_KEY (get one from dashboard.composio.dev/settings) and OPENAI_API_KEY in your environment:
export COMPOSIO_API_KEY=xxxxxxxxx
export OPENAI_API_KEY=xxxxxxxxx
Quickstart
Create a session for your user, fetch its tools, and hand them to a FunctionAgent. LlamaIndex drives the tool calls; each tool executes itself through Composio.
import asyncio
from composio import Composio
from composio_llamaindex import LlamaIndexProvider
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
composio = Composio(provider=LlamaIndexProvider())
llm = OpenAI(model="gpt-5.2")
# Each session is scoped to one of your users
session = composio.create(user_id="user_123")
tools = session.tools()
agent = FunctionAgent(tools=tools, llm=llm)
async def main():
result = await agent.run(
user_msg="Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'"
)
print(result)
asyncio.run(main())
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file composio_llamaindex-0.18.2.tar.gz.
File metadata
- Download URL: composio_llamaindex-0.18.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
888625f4b68bfa24026cd48109c82229b88a04fa33ba0f5c9d5f884e6d052146
|
|
| MD5 |
d6fb79f9140cc9e3c6bd83b9f77a9dc2
|
|
| BLAKE2b-256 |
9093461cb30c13db49728a5d260b88c5163f0e6f166d1be853de82734a553c79
|
File details
Details for the file composio_llamaindex-0.18.2-py3-none-any.whl.
File metadata
- Download URL: composio_llamaindex-0.18.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
459eb64e6c91f3333d578d6fc6b4540c9b4287e43e76bb5ef884b5aa675befb3
|
|
| MD5 |
f1dc78626e03997d4297576f2554d5ce
|
|
| BLAKE2b-256 |
7c5689ad4b7db0c589982fbe64a4839b8db1cdddfc0e53e4fe4344a479aea24d
|