Python Modules (Developer)
APIAgentConfiguration
¶
Configuration for the Lex Machina API Agent. It supports authentication via API token, OAuth2 client credentials, or delegation URL.
Source code in src/lexmachina_agent/agent_executor.py
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 | |
build_agent()
¶
Constructs and returns a LexMachinaAPIAgent instance based on the configuration.
Source code in src/lexmachina_agent/agent_executor.py
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 | |
ConfigurationError
¶
Bases: Exception
Base class for configuration-related errors.
Source code in src/lexmachina_agent/agent_executor.py
27 28 29 30 31 | |
LexMachinaAPIAgent
¶
A stateful agent that manages communication with the external Protégé in Lex Machina Agent API. It holds the HTTP client and authentication token.
Source code in src/lexmachina_agent/agent_executor.py
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 175 176 177 178 179 180 181 182 183 184 185 186 | |
get_search_description(description_url)
async
¶
Fetches the description for a single suggested search.
Source code in src/lexmachina_agent/agent_executor.py
143 144 145 146 147 148 149 150 151 152 | |
get_suggested_searches(query)
async
¶
Calls the /search/ai_suggested endpoint.
Source code in src/lexmachina_agent/agent_executor.py
132 133 134 135 136 137 138 139 140 141 | |
process_query(query)
async
¶
Main method to process a query, fetch suggestions, and enrich them in parallel.
Source code in src/lexmachina_agent/agent_executor.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
LexmachinaAgentExecutor
¶
Bases: AgentExecutor
AgentExecutor implementation for the Lex Machina agent.
Source code in src/lexmachina_agent/agent_executor.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
cancel(request, event_queue)
async
¶
Cancellation is not supported.
Source code in src/lexmachina_agent/agent_executor.py
216 217 218 | |
MissingConfigurationError
¶
Bases: ConfigurationError
Raised when all configuration fields are missing.
Source code in src/lexmachina_agent/agent_executor.py
41 42 43 44 45 | |
RequiredConfigurationError
¶
Bases: ConfigurationError
Raised when a required configuration field is missing.
Source code in src/lexmachina_agent/agent_executor.py
34 35 36 37 38 | |
Server application for the Lex Machina A2A agent proxy
app()
¶
Create the Starlette ASGI application with the Lex Machina agent.
Source code in src/lexmachina_agent/server.py
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 | |