Using Tool Variables

You can use tool variables to specify environment variables available to your custom tools. For example, if you set a tool variable PASSWORD to banana, then write a custom function that prints os.getenv('PASSWORD') in the tool, the function will print banana.

Assigning tool variables in the ADE

To assign tool variables in the Agent Development Environment (ADE), simply click on Variables to open the Tool Variables viewer:

Assigning tool variables in the API / SDK

You can also assign tool variables on agent creation in the API with the tool_exec_environment_variables parameter:

1curl -X POST http://localhost:8283/v1/agents/ \
2 -H "Content-Type: application/json" \
3 -d '{
4 "memory_blocks": [],
5 "llm":"openai/gpt-4o-mini",
6 "embedding":"openai/text-embedding-3-small",
7 "tool_exec_environment_variables": {
8 "COMPOSIO_ENTITY": "banana"
9 }
10}'