Logo di Phoenix Graphql

Phoenix Graphql

OrganizzazionePopolare
Arize-ai
phoenix-graphql

Scrivi query GraphQL efficienti per l’API Phoenix. Carica questa skill in due casi: (1) prima di comporre autonomamente query GraphQL non banali per analizzare i dati (tramite il comando bash `phoenix-gql`): include i punti di accesso allo schema e schemi d’uso che rendono superflua l’introspezione; (2) quando l’utente chiede aiuto per scrivere query GraphQL per i propri script, strumenti o integrazioni con Phoenix: illustra l’endpoint, l’autenticazione e alcuni esempi di client.

Add to TypingMind

Panoramica

Pubblicato daArize-ai
Repositoryphoenix
Nome della skillphoenix-graphql
Stelle
11.5K
Fork
1.1K
File inclusi
7
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 7

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da Arize-ai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Phoenix Graphql in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/Arize-ai/phoenix/tree/main/src/phoenix/server/agents/prompts/skills/phoenix-graphql
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Arize-ai/phoenix.git /tmp/phoenix
mkdir -p .claude/skills
cp -r /tmp/phoenix/src/phoenix/server/agents/prompts/skills/phoenix-graphql .claude/skills/phoenix-graphql
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Phoenix Graphql in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Phoenix Graphql non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Phoenix Graphql non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Two modes

  • Internal data analysis — you are querying Phoenix yourself to answer a question. Apply the schema facts, efficiency rules, and patterns below directly.
  • Helping the user integrate — the user wants GraphQL queries for their own code or tools. Use the same schema facts and patterns, plus the "External API usage" section for endpoint, auth, and client examples. Queries you hand to the user should use variables and include pagination handling.

Entrypoints

Top-level Query entrypoints get you to a starting entity; per-entity schema details live in the reference files listed under "Schema map" below.

  • node(id: ID!) — global lookup for any entity by its Relay global id; resolve with an inline fragment, e.g. node(id: $id) { ... on Dataset { name } }. This is the primary way to fetch datasets, prompts, experiments, sessions, and annotations, which have no by-name/by-id helpers.
  • projects(...), datasets(...), prompts(...), evaluators(...) → Relay connections, each with filter/sort inputs to find an entity when you only have a name.
  • By-X helpers (the only ones that exist): getProjectByName(name: String!), getProjectSessionById(sessionId: String!), getDatasetExampleByExternalId(datasetId: GlobalID!, externalId: String!), getSpanByOtelId(spanId: String!), getTraceByOtelId(traceId: String!). There is no getDatasetByName, getPromptByName, or getExperimentById — use node(id:) or a connection filter instead.
  • viewer → the authenticated User; projectCount, datasetCount, promptCount — cheap counts.
  • compareExperiments(baseExperimentId: GlobalID!, compareExperimentIds: [GlobalID!]!, first, after, filterCondition) → experiment comparison.

Schema map

Per-entity field references and examples are split into reference files. Load only the one(s) you need with load_skill_reference, after loading this skill:

  • Projects, spans, and traces: Project aggregates and spans; Span and Trace fields. The starting point for most trace analysis.
  • Sessions: ProjectSession multi-turn session metrics, token/cost, and session traces.
  • Datasets: Dataset and DatasetExample examples, versions, splits, and labels.
  • Experiments: Experiment and ExperimentRun runs, aggregate metrics, and comparison.
  • Prompts: Prompt and PromptVersion versions, templates, and tags.
  • Annotations: Span, trace, session, and experiment-run annotation fields; how to read them; and the mutations that write notes, labels, and annotation configs.
  • Filter expressions: The span, trace, and session filter languages (filterCondition, traceFilterCondition, sessionFilterCondition), including vocabulary, operators, root-span scoping, and compiled examples. Load it before writing any condition beyond the one-liners below.

Conventions

These apply to every entity:

  • Pagination is Relay-style: first/after args; responses have edges { node { ... } } and pageInfo { hasNextPage endCursor }. Cursors are opaque strings. Some connections (e.g. Project.spans, Experiment.runs, ProjectSession.traces) are forward-only.
  • IDs: the id field on any node is a Relay global ID (base64 of TypeName:rowId) — use it with node(id:). OpenTelemetry hex IDs come from Span.spanId and Trace.traceId — use those for OTel lookups. Note a Span has no traceId field; read it via the nested trace { traceId }. Never mix global IDs with OTel IDs.
  • TimeRange input: { start: DateTime, end: DateTime } — ISO 8601 strings; end is exclusive; both optional.
  • SpanSort input: { col: SpanColumn, dir: SortDir }, e.g. { col: startTime, dir: desc }. Useful SpanColumn values: startTime, latencyMs, tokenCountTotal, cumulativeTokenCountTotal, tokenCostTotal.
  • Filter conditions (filterCondition, traceFilterCondition, sessionFilterCondition) are Python boolean expressions, one language each for spans, traces, and sessions, e.g. span_kind == 'LLM', status_code == 'ERROR', 'timeout' in output.value, annotations['Hallucination'].label == 'hallucinated'. There is no traces connection: list traces with the clause parent_span is None (root spans, orphans included), or parent_id is None for spans with no parent id. Unknown span filter names compile as attribute paths and match nothing, so read references/filter-expressions.md before writing a condition.

Efficiency rules

  • Do not run full schema introspection. Read the relevant Schema map resource instead; it covers the fields and arguments for that entity. Only when a resource does not cover a field you need, introspect a single type: { __type(name: "Project") { fields { name args { name type { name kind } } } } }.
  • Batch independent lookups with aliases in one query instead of multiple round trips, e.g. p50: latencyMsQuantile(probability: 0.5) p99: latencyMsQuantile(probability: 0.99).
  • Select only the fields you need; keep page sizes small (10–50) and paginate only when necessary.
  • Pass values via query variables, never string interpolation.
  • Span input/output payloads can be huge — request input { truncatedValue } (first 100 chars) when surveying; fetch input { value } (full payload) only for spans you intend to read closely.

Patterns

Two canonical shapes to orient you; entity-specific examples live in each resource.

Reach an entity and read fields via node(id:) + an inline fragment:

graphql
query GetEntity($id: ID!) {
  node(id: $id) {
    ... on Dataset { name exampleCount }
  }
}

Batch independent project aggregates with aliases in one round trip:

graphql
query Overview($name: String!, $timeRange: TimeRange) {
  getProjectByName(name: $name) {
    traceCount(timeRange: $timeRange)
    p50: latencyMsQuantile(probability: 0.5, timeRange: $timeRange)
    p99: latencyMsQuantile(probability: 0.99, timeRange: $timeRange)
    errorCount: recordCount(timeRange: $timeRange, filterCondition: "status_code == 'ERROR'")
  }
}

Execution surfaces (internal mode)

  • phoenix-gql (bash): run phoenix-gql --help for flags and current permissions. Use --data-only when piping to jq, --output <file> for large results, --vars '<json>' for variables. Mutations are allowed only when runtime permissions say so; the tool reports its permissions on every invocation.

External API usage (user-facing mode)

Facts users need to call the API themselves:

  • Endpoint: POST <phoenix-endpoint>/graphql with a JSON body { "query": "...", "variables": { ... } }, where <phoenix-endpoint> is the Phoenix base URL from PHOENIX_ENDPOINT. A GraphiQL IDE is served on GET at the same path.
  • Auth: send a Phoenix API key as a bearer token: Authorization: Bearer <API_KEY>. API keys are created in Phoenix settings.
  • The GraphQL schema is primarily designed for the Phoenix UI and may change between versions; for stable programmatic access, recommend the REST API (/v1/...) and the arize-phoenix-client Python / @arizeai/phoenix-client TypeScript packages where they cover the need, and GraphQL for everything else.

curl:

bash
curl -s "$PHOENIX_ENDPOINT/graphql" \
  -H "Authorization: Bearer $PHOENIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "query($n: String!) { getProjectByName(name: $n) { traceCount } }", "variables": {"n": "default"}}'

Python:

python
import httpx

resp = httpx.post(
    f"{endpoint}/graphql",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"query": query, "variables": variables},
)
resp.raise_for_status()
data = resp.json()["data"]

When handing users a query, include: the full operation with variable definitions, an example variables payload, and a note on paginating via pageInfo { hasNextPage endCursor } → pass endCursor as after.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Phoenix Graphql?

Scrivi query GraphQL efficienti per l’API Phoenix. Carica questa skill in due casi: (1) prima di comporre autonomamente query GraphQL non banali per analizzare i dati (tramite il comando bash `phoenix-gql`): include i punti di accesso allo schema e schemi d’uso che rendono superflua l’introspezione; (2) quando l’utente chiede aiuto per scrivere query GraphQL per i propri script, strumenti o integrazioni con Phoenix: illustra l’endpoint, l’autenticazione e alcuni esempi di client.

Perché usare Phoenix Graphql su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Phoenix Graphql è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Phoenix Graphql in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/Arize-ai/phoenix/tree/main/src/phoenix/server/agents/prompts/skills/phoenix-graphql. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Phoenix Graphql?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Phoenix Graphql?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Phoenix Graphql: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Phoenix Graphql è gratuita?

È pubblicata su GitHub da Arize-ai. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇