File size: 568 Bytes
24f40cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import json
import requests

# Load agent configuration
with open("tunnel_farming_agent.json", "r") as f:
    agent_config = json.load(f)

# Example API call to the agent
def query_agent(query):
    url = "https://your-n8n-instance.com/webhook/invoke-tunnel-farming-agent"
    payload = {
        "query": query,
        "user_id": "example_user",
        "session_id": "example_session"
    }
    response = requests.post(url, json=payload)
    return response.json()

# Example usage
response = query_agent("What is the current soil moisture level?")
print(response)