@alexkroman1/aai-cli 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/_build-p1HHkdon.mjs +132 -0
- package/dist/_discover-BzlCDVZ6.mjs +161 -0
- package/dist/_init-l_uoyFCN.mjs +82 -0
- package/dist/_link-BGXGFYWa.mjs +47 -0
- package/dist/_server-common-qLA1QU2C.mjs +36 -0
- package/dist/_ui-kJIua5L9.mjs +44 -0
- package/dist/cli.mjs +318 -0
- package/dist/deploy-KyNJaoP5.mjs +86 -0
- package/dist/dev-DBFvKyzk.mjs +39 -0
- package/dist/init-BWG5OrQa.mjs +65 -0
- package/dist/rag-BnCMnccf.mjs +173 -0
- package/dist/secret-CzeHIGzE.mjs +50 -0
- package/dist/start-C1qkhU4O.mjs +23 -0
- package/package.json +39 -0
- package/templates/_shared/.env.example +5 -0
- package/templates/_shared/CLAUDE.md +1051 -0
- package/templates/_shared/biome.json +32 -0
- package/templates/_shared/global.d.ts +1 -0
- package/templates/_shared/index.html +16 -0
- package/templates/_shared/package.json +23 -0
- package/templates/_shared/tsconfig.json +15 -0
- package/templates/code-interpreter/agent.ts +27 -0
- package/templates/code-interpreter/client.tsx +3 -0
- package/templates/css.d.ts +1 -0
- package/templates/dispatch-center/agent.ts +1227 -0
- package/templates/dispatch-center/client.tsx +505 -0
- package/templates/embedded-assets/agent.ts +48 -0
- package/templates/embedded-assets/client.tsx +3 -0
- package/templates/embedded-assets/knowledge.json +20 -0
- package/templates/health-assistant/agent.ts +160 -0
- package/templates/health-assistant/client.tsx +3 -0
- package/templates/infocom-adventure/agent.ts +164 -0
- package/templates/infocom-adventure/client.tsx +300 -0
- package/templates/math-buddy/agent.ts +21 -0
- package/templates/math-buddy/client.tsx +3 -0
- package/templates/memory-agent/agent.ts +20 -0
- package/templates/memory-agent/client.tsx +3 -0
- package/templates/night-owl/agent.ts +98 -0
- package/templates/night-owl/client.tsx +12 -0
- package/templates/personal-finance/agent.ts +26 -0
- package/templates/personal-finance/client.tsx +3 -0
- package/templates/pizza-ordering/agent.ts +218 -0
- package/templates/pizza-ordering/client.tsx +264 -0
- package/templates/simple/agent.ts +6 -0
- package/templates/simple/client.tsx +3 -0
- package/templates/smart-research/agent.ts +164 -0
- package/templates/smart-research/client.tsx +3 -0
- package/templates/solo-rpg/agent.ts +1244 -0
- package/templates/solo-rpg/client.tsx +698 -0
- package/templates/support/README.md +62 -0
- package/templates/support/agent.ts +19 -0
- package/templates/support/client.tsx +3 -0
- package/templates/travel-concierge/agent.ts +29 -0
- package/templates/travel-concierge/client.tsx +3 -0
- package/templates/tsconfig.json +1 -0
- package/templates/web-researcher/agent.ts +17 -0
- package/templates/web-researcher/client.tsx +3 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# AssemblyAI Support Agent
|
|
2
|
+
|
|
3
|
+
A voice-powered support agent for [AssemblyAI](https://assemblyai.com), built
|
|
4
|
+
with [aai](https://github.com/anthropics/aai).
|
|
5
|
+
|
|
6
|
+
## Getting started
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
aai deploy # Bundle and deploy
|
|
10
|
+
aai deploy -y # Deploy without prompts
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Ingesting documentation into the vector store
|
|
14
|
+
|
|
15
|
+
This agent uses `vector_search` to answer questions from AssemblyAI's docs.
|
|
16
|
+
Before it can answer anything, you need to ingest the documentation:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
aai rag https://assemblyai.com/docs/llms-full.txt
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This fetches AssemblyAI's `llms-full.txt` (a single file containing all their
|
|
23
|
+
documentation), chunks it, and upserts the chunks into the vector store.
|
|
24
|
+
|
|
25
|
+
### Options
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
# Custom chunk size (default: 512 tokens)
|
|
29
|
+
aai rag https://assemblyai.com/docs/llms-full.txt --chunk-size 256
|
|
30
|
+
|
|
31
|
+
# Target a specific server
|
|
32
|
+
aai rag https://assemblyai.com/docs/llms-full.txt --server http://localhost:3100
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### How it works
|
|
36
|
+
|
|
37
|
+
1. `aai rag` fetches the `llms-full.txt` file from the URL
|
|
38
|
+
2. It splits the content into chunks (~512 tokens each by default)
|
|
39
|
+
3. Each chunk is upserted into the vector store, scoped to this agent
|
|
40
|
+
4. At runtime, the `vector_search` builtin tool queries the vector store to find
|
|
41
|
+
relevant documentation chunks for each user question
|
|
42
|
+
|
|
43
|
+
### Re-ingesting
|
|
44
|
+
|
|
45
|
+
Run the same `aai rag` command again to update the vector store with fresh
|
|
46
|
+
documentation. Chunks are keyed by content, so unchanged pages won't be
|
|
47
|
+
duplicated.
|
|
48
|
+
|
|
49
|
+
## Environment variables
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
aai env add MY_KEY # Set a secret (prompts for value)
|
|
53
|
+
aai env ls # List secret names
|
|
54
|
+
aai env pull # Pull names into .env for reference
|
|
55
|
+
aai env rm MY_KEY # Remove a secret
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Access secrets in your agent via `ctx.env.MY_KEY`.
|
|
59
|
+
|
|
60
|
+
## Learn more
|
|
61
|
+
|
|
62
|
+
See `CLAUDE.md` for the full agent API reference.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineAgent } from "@alexkroman1/aai";
|
|
2
|
+
|
|
3
|
+
export default defineAgent({
|
|
4
|
+
name: "AssemblyAI Support",
|
|
5
|
+
instructions:
|
|
6
|
+
`You are a friendly support agent for AssemblyAI. Help users with questions \
|
|
7
|
+
about AssemblyAI's speech-to-text API, audio intelligence features, and integrations.
|
|
8
|
+
|
|
9
|
+
- Always use vector_search to find relevant documentation before answering.
|
|
10
|
+
- Base your answers strictly on the retrieved documentation — don't guess.
|
|
11
|
+
- If search results aren't relevant to the question, say the docs don't cover that topic \
|
|
12
|
+
and suggest visiting assemblyai.com or contacting support@assemblyai.com.
|
|
13
|
+
- Be concise — this is a voice conversation.
|
|
14
|
+
- When explaining API usage, mention endpoint names and key parameters.
|
|
15
|
+
- If a question is ambiguous, ask the user to clarify which product or feature they mean.`,
|
|
16
|
+
greeting:
|
|
17
|
+
"Hi! I'm the AssemblyAI support assistant. I can help you with questions about our speech-to-text API, audio intelligence features, LLM gateway, and more. What can I help you with?",
|
|
18
|
+
builtinTools: ["vector_search"],
|
|
19
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineAgent } from "@alexkroman1/aai";
|
|
2
|
+
|
|
3
|
+
export default defineAgent({
|
|
4
|
+
name: "Aria",
|
|
5
|
+
instructions:
|
|
6
|
+
`You are Aria, a luxury travel concierge. You help customers plan trips,
|
|
7
|
+
find flights and hotels, check weather at destinations, and convert currencies.
|
|
8
|
+
|
|
9
|
+
Rules:
|
|
10
|
+
- Always check weather before recommending activities
|
|
11
|
+
- When discussing costs, convert to the customer's preferred currency
|
|
12
|
+
- Suggest specific restaurants, landmarks, and experiences
|
|
13
|
+
- Be warm and enthusiastic but concise — this is a voice conversation
|
|
14
|
+
- If the customer hasn't specified dates, ask for them before searching flights
|
|
15
|
+
- Use web_search to find current flight and hotel options, then visit_webpage for details
|
|
16
|
+
|
|
17
|
+
API endpoints (use fetch_json):
|
|
18
|
+
- Geocoding: https://geocoding-api.open-meteo.com/v1/search?name={city}&count=1&language=en
|
|
19
|
+
Returns { results: [{ name, country, latitude, longitude }] }
|
|
20
|
+
- Weather forecast: https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,weathercode&timezone=auto&forecast_days=7
|
|
21
|
+
Returns { daily: { time, temperature_2m_max, temperature_2m_min, precipitation_sum, weathercode } }
|
|
22
|
+
Weather codes: 0=Clear, 1=Mainly clear, 2=Partly cloudy, 3=Overcast, 45/48=Fog, 51/53/55=Drizzle, 61/63/65=Rain, 71/73/75=Snow, 80-82=Rain showers, 85/86=Snow showers, 95/96/99=Thunderstorm
|
|
23
|
+
Convert C to F: F = C * 9/5 + 32
|
|
24
|
+
- Currency rates: https://open.er-api.com/v6/latest/{CODE}
|
|
25
|
+
Returns { rates: { USD: 1.0, EUR: 0.85, ... } }`,
|
|
26
|
+
greeting:
|
|
27
|
+
"Hey, I'm Aria, your travel concierge. Try asking me something like, what's the weather in Tokyo this week, or help me plan a long weekend in Barcelona.",
|
|
28
|
+
builtinTools: ["web_search", "visit_webpage", "fetch_json"],
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "extends": "./_shared/tsconfig.json" }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineAgent } from "@alexkroman1/aai";
|
|
2
|
+
|
|
3
|
+
export default defineAgent({
|
|
4
|
+
name: "Scout",
|
|
5
|
+
instructions:
|
|
6
|
+
`You are Scout, a research assistant who finds answers by searching the web.
|
|
7
|
+
|
|
8
|
+
- Search first. Never guess or rely on memory for factual questions.
|
|
9
|
+
- Use visit_webpage when search snippets aren't detailed enough.
|
|
10
|
+
- For complex questions, search multiple times with different queries.
|
|
11
|
+
- Cite sources by website name.
|
|
12
|
+
- Be concise — this is a voice conversation.
|
|
13
|
+
- If results are unclear or contradictory, say so.`,
|
|
14
|
+
greeting:
|
|
15
|
+
"Hey, I'm Scout. I search the web for answers. Try asking me something like, what happened in tech news today, or who won the last World Cup.",
|
|
16
|
+
builtinTools: ["web_search", "visit_webpage"],
|
|
17
|
+
});
|