What's the difference between the Orchestrator and an Expert?
What's the difference between the Orchestrator and an Expert?
What's the difference between A2A and MCP protocols?
What's the difference between A2A and MCP protocols?
When does an agent return a Task vs a Message?
When does an agent return a Task vs a Message?
Message. If it creates a stateful unit of work, it returns a Task with a unique ID and lifecycle that you can monitor.Tasks are used for:- Long-running operations (for example, generating a full clinical document)
- Multi-step workflows that coordinate multiple Experts
- Operations that may need to wait on downstream systems
- Any work that benefits from tracking and monitoring
When should I use `DataPart` vs `TextPart`?
When should I use `DataPart` vs `TextPart`?
TextPart for messages that will be directly exposed to the Orchestrator and the LLM. TextPart content is immediately available for reasoning and response generation.Use DataPart for structured JSON data that will be stored in memory first and accessed through more indirect manipulation. DataPart content is automatically indexed and stored in the context’s memory, enabling semantic retrieval when needed. DataPart is JSON-only and is useful for structured data like patient records, clinical facts, workflow parameters, or EHR identifiers.You can combine both in a single message: use TextPart for the primary instruction or question, and DataPart to provide structured context that will be semantically retrieved when relevant.For more details, see Core Concepts and Context & Memory.How does the `Artifact` object differ from a `Message` object with `role: agent`?
How does the `Artifact` object differ from a `Message` object with `role: agent`?
Message and Artifact use the same underlying Part primitives, but they serve different roles:-
Message(withrole: "agent")- Represents a single turn of communication from the agent to the client.
- Best for ephemeral conversational output, intermediate reasoning, clarifications, or status updates.
- Typically tied to a particular task step but not necessarily considered a durable business deliverable.
-
Artifact- Represents a tangible, durable output of a task (for example, a SOAP note, coding suggestions, a structured fact bundle, or a generated document).
- Has its own
artifactId, name/metadata, and lifecycle; can be streamed, versioned, and reused by later tasks. - Is what downstream systems, UIs, or audits usually consume as the final result.
agent messages during a task (status, intermediate commentary), but only a small number of artifacts that represent the completed work.What is the best way to pass previous context into a new message?
What is the best way to pass previous context into a new message?
contextId, the server generates one and returns it in the response. You can also supply your own contextId to continue an existing conversation—include that contextId in subsequent messages to maintain conversation continuity.You can also pass additional context in each request using DataPart objects to include structured data, summaries, or other specific context alongside the automatic memory.For comprehensive guidance on context and memory management, see Context & Memory.How long does context memory persist?
How long does context memory persist?
How does the Orchestrator decide which Expert(s) to use?
How does the Orchestrator decide which Expert(s) to use?