new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

a2a/setup

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

A2A provider import statement

Import the a2a function from 'a2a-ai-provider': import { a2a } from 'a2a-ai-provider';

A2A community provider installation

Install the a2a-ai-provider package from npm using the package manager of your choice.

A2A generateText example

The following code demonstrates using generateText with A2A provider: import { a2a } from 'a2a-ai-provider'; import { generateText } from 'ai'; const result = await generateText({ model: a2a('https://your-a2a-server.example.com'), prompt: 'What is love?', }); console.log(result.text);

A2A streamText example with contextId

The following code demonstrates using streamText with A2A provider and contextId option: import { a2a } from 'a2a-ai-provider'; import { streamText } from 'ai'; const chatId = 'unique-chat-id'; // for each conversation to keep history in a2a server const streamResult = streamText({ model: a2a('https://your-a2a-server.example.com'), prompt: 'What is love?', providerOptions: { a2a: { contextId: chatId, }, }, }); await streamResult.consumeStream(); console.log(await streamResult.content);

A2A protocol specification

A2A is a protocol that enables standardized JSON-RPC interaction over HTTP for agents. The A2A provider uses the official a2a-js sdk (@a2a-js/sdk) to support A2A protocol compliant agents.

A2A provider development status

The a2a-ai-provider package is under constant development.

Give your agent this brain