Test Lambda tool
Tests an existing Lambda tool by executing it with test inputs. Use this to verify a function works correctly before agents use it. Optionally supply a test_context with stand-in agent metadata, secrets, and session metadata. The $refs in the tool's stored tool_configurations resolve against these values. The function runs in a secure sandbox environment with the same constraints as production.
Path parameters
The unique identifier of the Lambda tool to test.
Headers
The platform makes a best effort to complete the request in the specified seconds, or it times out.
The platform makes a best effort to complete the request in the specified milliseconds, or it times out.
Request body
Example request
{
"input": {
"number": 42,
"text": "Hello, world!"
},
"timeout_seconds": 10,
"test_context": {
"agent": {
"metadata": {
"ticket_api_base": "https://tickets.example.com/api/v1/"
},
"secrets": {
"ticket_api_token": "test-token"
}
},
"session": {
"metadata": {
"tenant_corpus": "kb"
}
}
}
}Response
The test execution results, or the streamed events when stream_response is true.
Example response
{
"type": "success",
"output": {
"result": 1764,
"message": "Computed successfully"
},
"latency_millis": 125,
"memory_used_mb": 32,
"validation_results": {
"input_valid": true,
"output_valid": true,
"validation_errors": [
"Output missing required field 'result'"
]
}
}Changes
Changed in 1 of the 13 revisions of this API.3
- ○
added the new optional request property
new-optional-request-property
- ○
the
request property's max was increased from300.00to21600.00request-property-max-increased
- ○
added the media type
text/event-streamfor the response with the statusresponse-media-type-added
This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○