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.

To assign tool variables in the ADE, simply click on Variables to open the Tool Variables viewer:

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 "llm":"openai/gpt-4",
5 "embedding":"openai/text-embedding-ada-002",
6 "tool_exec_environment_variables": {
7 "COMPOSIO_ENTITY": "banana"
8 },
9 "memory_blocks": []
10}'
Built with