Tools¶
List of tools available to the agent.
geo_assistant.tools.get_place
async
¶
get_place(
place_name: str, tool_call_id: Annotated[str, InjectedToolCallId] = ""
) -> Command
Get place location from Overture Maps based on user input place name.
Parameters:
-
place_name(str) –An address or location given as a human-readable string.
-
tool_call_id(Annotated[str, InjectedToolCallId], default:'') –Optional ID for tracking the tool call.
Source code in src/geo_assistant/tools/overture.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
geo_assistant.tools.get_search_area
async
¶
get_search_area(
buffer_size_km: float,
state: Annotated[GeoAssistantState, InjectedState],
tool_call_id: Annotated[str, InjectedToolCallId] = "",
) -> Command
Get a search area buffer in km around the place defined in the agent state.
Parameters:
-
buffer_size_km(float) –Radius of the buffer in kilometres.
-
state(Annotated[GeoAssistantState, InjectedState]) –Pass in 'place' as state into this agent.
-
tool_call_id(Annotated[str, InjectedToolCallId], default:'') –Optional ID for tracking the tool call.
Source code in src/geo_assistant/tools/buffer.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
geo_assistant.tools.fetch_naip_img
async
¶
fetch_naip_img(
start_date: str,
end_date: str,
state: Annotated[GeoAssistantState, InjectedState],
tool_call_id: Annotated[str | None, InjectedToolCallId] = None,
) -> Command
Query Microsoft Planetary Computer for NAIP imagery intersecting an AOI and date range, load all matching items into an xarray data cube using odc-stac, and save a simple RGB composite as a JPEG.
Parameters:
-
start_date(str) –Start date (YYYY-MM-DD).
-
end_date(str) –End date (YYYY-MM-DD).
-
state(Annotated[GeoAssistantState, InjectedState]) –Pass in search_area as state into this agent.
-
tool_call_id(Annotated[str | None, InjectedToolCallId], default:None) –Optional ID for tracking the tool call
Source code in src/geo_assistant/tools/naip.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |
geo_assistant.tools.summarize_sat_img
async
¶
summarize_sat_img(
state: Annotated[GeoAssistantState, InjectedState],
tool_call_id: Annotated[str | None, InjectedToolCallId] = None,
) -> Command
Summarize the contents of a satellite image using an LLM.
Parameters:
-
state(Annotated[GeoAssistantState, InjectedState]) –Pass in 'naip_img_bytes' as state into this agent.
-
tool_call_id(Annotated[str | None, InjectedToolCallId], default:None) –Optional ID for tracking the tool call.
Returns:
-
Command–Command containing the image summary and metadata
Raises:
-
ValueError–If the image URL is invalid or the image cannot be processed
Source code in src/geo_assistant/tools/summarize.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |