Skip to content

Commit 922ad57

Browse files
committed
Add ChatGPT plugin cookbook with Agents SDK and AgentCore
1 parent a78f3f3 commit 922ad57

87 files changed

Lines changed: 31641 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copy to .env for local development. Do not commit secrets.
2+
3+
AWS_REGION=us-west-2
4+
OPENAI_BASE_URL=https://bedrock-mantle.us-west-2.api.aws/v1
5+
OPENAI_API_KEY=
6+
OPENAI_AGENTS_MODEL=openai.gpt-oss-120b
7+
# Optional deterministic override. If empty, demo flows use a UTC date 45 days
8+
# in the future so instructions and smoke payloads do not expire.
9+
COOKBOOK_DEMO_TRAVEL_DATE=
10+
11+
# Canonical execution switch: local runs the checked-in Python agent; deployed
12+
# invokes the AgentCore Runtime ARN below. Legacy FLIGHT_DATA_SOURCE values are
13+
# accepted for compatibility but must not conflict with this setting.
14+
COOKBOOK_EXECUTION_MODE=local
15+
LOCAL_AGENT_SERVICE_NAME=chatgpt-agentcore-cookbook-local
16+
LOCAL_AGENT_LOG_GROUP=/aws/bedrock-agentcore/runtimes/chatgpt-agentcore-cookbook-local
17+
# Optional deployed-Runtime configuration. Leave this empty for the default
18+
# local path. When deployed mode is selected, set it to the Region in the
19+
# supplied Runtime ARN; it takes precedence over AWS_REGION for that invocation.
20+
AGENTCORE_RUNTIME_REGION=
21+
AGENTCORE_RUNTIME_AGENT_ARN=
22+
AGENTCORE_RUNTIME_QUALIFIER=
23+
# Set only when this value is derived from an authenticated principal.
24+
AGENTCORE_RUNTIME_USER_ID=
25+
26+
# Optional live AgentCore evaluation. This is separate from the offline
27+
# Promptfoo suite. Keep the guard disabled unless you intend to invoke AWS and
28+
# accept the resulting usage charges. AWS_PROFILE belongs in your shell, not
29+
# this file.
30+
RUN_AWS_EVALUATION=0
31+
AGENTCORE_EVALUATION_LOG_GROUP=
32+
# The built-in evaluators need prompt, response, and tool content in the spans.
33+
# Set this to 1 only for a dedicated evaluation Runtime whose owner has enabled
34+
# and approved OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true.
35+
AGENTCORE_EVALUATION_CONTENT_CAPTURE_CONFIRMED=0
36+
# Optional tuning. These values show the runner defaults.
37+
AGENTCORE_EVALUATION_WAIT_SECONDS=180
38+
AGENTCORE_EVALUATION_POLL_SECONDS=30
39+
AGENTCORE_EVALUATION_ATTEMPTS=5
40+
AGENTCORE_EVALUATION_MIN_SCORE=0.5
41+
# Optional comma-separated case IDs. Empty means every AWS-tagged canonical case.
42+
AGENTCORE_EVALUATION_CASE_IDS=
43+
44+
# Primary pre-promotion evaluation over actual local Agents SDK outputs.
45+
# Keep the guard disabled in .env and enable it only for the intended command.
46+
RUN_PROMPTFOO_AGENT_EVALUATION=0
47+
# Optional comma-separated runnable case IDs. Empty means all three canonical cases.
48+
PROMPTFOO_AGENT_EVALUATION_CASE_IDS=
49+
PROMPTFOO_AGENT_EVALUATION_TIMEOUT_MS=180000
50+
51+
# Trace destinations. AWS is the default and requires no OpenAI trace key.
52+
# Set COOKBOOK_TRACING_MODE=dual only after a separate OpenAI Platform project
53+
# key has been approved for trace export.
54+
COOKBOOK_TRACING_MODE=aws
55+
# Optional routing override and credential, used only in explicit dual mode.
56+
OPENAI_PROJECT_ID=
57+
OPENAI_TRACE_API_KEY=
58+
# Optional base name; the runtime always appends `(local)` or `(deployed)`.
59+
OPENAI_TRACE_WORKFLOW_NAME="ChatGPT flight agent"
60+
# Keep prompt, model output, and tool payload content out of traces by default.
61+
OPENAI_TRACE_INCLUDE_SENSITIVE_DATA=0
62+
# Apply the same content policy to the ADOT/OpenTelemetry exporter.
63+
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false
64+
DISABLE_ADOT_OBSERVABILITY=false
65+
OTEL_SDK_DISABLED=false
66+
# The local invoker sets this automatically to prevent auto-instrumentation
67+
# from constructing the OpenAI trace exporter before the AWS-only setup runs.
68+
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=
69+
70+
# Bounded, read-only trace verification defaults. These do not prove a trace
71+
# exists until verify_traces.py reports AWS status "verified".
72+
COOKBOOK_TRACE_VERIFICATION_LOG_GROUP=aws/spans
73+
COOKBOOK_TRACE_VERIFY_TIMEOUT_SECONDS=60
74+
COOKBOOK_TRACE_VERIFY_POLL_SECONDS=5
75+
76+
# Notebook gates. Local/test cells run by default; live AWS cells require RUN_LIVE_AWS=1.
77+
RUN_LIVE_AWS=0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
.env
3+
.venv/
4+
__pycache__/
5+
.pytest_cache/
6+
.ruff_cache/
7+
node_modules/
8+
dist/
9+
runtime-agent/evals/results/
10+
*.log
11+
*.tmp
12+
notebooks/*.executed.ipynb
13+
notebooks/.ipynb_checkpoints/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Eliza
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)