Skip to content

References, AI outcomes, teams

Accessed via client.references, client.ai_outcomes and client.teams. Workflow export, import and validation live on client.workflows (export, import_workflow, import_n8n, import_jira, import_node_red, validate).

envelope = client.workflows.export(workflow_id)
result = client.workflows.import_workflow(envelope, target="template", team_id=team_id)
for w in result.warnings:
    print(w.kind, w.message)

pyawe.client.ReferencesClient

ReferencesClient(http: _HttpSession)

Resolve human references to entities (GET /references/resolve).

resolve

resolve(reference: str) -> ResolvedReference

Resolve a UUID, a Togra task/workflow reference or a Cunav ticket reference.

An unknown string is not an error: the result has kind == "unresolved".

pyawe.client.AiOutcomesClient

AiOutcomesClient(http: _HttpSession)

What AI triage proposed for a ticket, and the feedback on it.

list

list(workflow_id: UUID | str) -> builtins.list[AiTicketOutcome]

List the outcomes proposed for a ticket, oldest first.

create

create(workflow_id: UUID | str, outcome_type: str, confidence: float, *, executed: bool = False, execution_error: str | None = None, related_workflow_id: UUID | str | None = None, detail: str | None = None, note_id: UUID | str | None = None, usage: UsageEvent | None = None) -> AiTicketOutcome

Record an AI outcome for a ticket.

Parameters:

Name Type Description Default
workflow_id UUID | str

The ticket.

required
outcome_type str

e.g. "flag_duplicate".

required
confidence float

0..1.

required
executed bool

Whether the proposal was carried out.

False
usage UsageEvent | None

Optionally the AI call that produced it, recorded in the usage ledger.

None

set_feedback

set_feedback(outcome_id: UUID | str, feedback: str, reason: str | None = None) -> AiTicketOutcome

Record whether an outcome was helpful.

Parameters:

Name Type Description Default
outcome_id UUID | str

The outcome.

required
feedback str

"helpful" or "unhelpful".

required
reason str | None

Free-text explanation.

None

pyawe.client.TeamsClient

TeamsClient(http: _HttpSession)

The caller's teams and their roles (answered from user management).

list

list() -> builtins.list[dict[str, Any]]

List the teams the caller can see (raw dicts, as user management returns them).

get

get(team_id: UUID | str) -> dict[str, Any]

Fetch one team with its members.

list_roles

list_roles(team_id: UUID | str) -> builtins.list[dict[str, Any]]

List the roles defined in a team.