curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://global-discoveryengine.googleapis.com/v1alpha/projects/my-project-123/locations/global/collections/default_collection/engines/my-app/assistants/default_assistant:streamAssist" \
-d '
{
"query": {
"text": "By when do corporations need to file taxes?"
}
}'
{
"answer": {
"name": "projects/my-project-123/locations/global/collections/default_collection/engines/my-app/sessions/123456789013/assistAnswers/123456789019",
"state": "SUCCEEDED",
"replies": [
{
"groundedContent": {},
"replyId": "123456789050"
},
{
"groundedContent": {},
"replyId": "123456789050"
}
],
"diagnosticInfo": {
"plannerSteps": [
{
"createTime": "2025-11-24T22:21:13.958569117Z",
"queryStep": {
"parts": [
{
"text": "By when do corporations need to file taxes?"
}
]
}
},
{
"createTime": "2025-11-24T22:21:17.218914056Z",
"planStep": {
"parts": [
{
"text": "**Formulating the Query**\n"
}
],
"planStepId": "123456789050",
"role": "MODEL"
}
},
{
"planStep": {
"parts": [
{
"text": "**Refining the Response**\n"
}
],
"role": "MODEL",
"planStepId": "123456789050"
},
"createTime": "2025-11-24T22:21:19.734447578Z"
},
{
"createTime": "2025-11-24T22:21:21.940682307Z",
"planStep": {
"planStepId": "123456789050",
"role": "MODEL",
"parts": [
{
"text": "**Processing the Results**\n"
}
]
}
},
{
"planStep": {
"role": "MODEL",
"parts": [
{
"text": "**Querying and Analyzing**\n**Structuring the Answer**\n"
}
],
"planStepId": "123456789050"
},
"createTime": "2025-11-24T22:21:25.058155923Z"
},
{
"createTime": "2025-11-24T22:21:25.955761161Z",
"planStep": {
"planStepId": "123456789050",
"role": "MODEL",
"parts": [
{
"text": "**Refining the Details**\n"
}
]
}
},
{
"createTime": "2025-11-24T22:21:25.967576803Z",
"planStep": {
"role": "MODEL",
"parts": [
{
"text": "Of course, I can help with that. The deadline for corporations to file their federal income tax returns depends on the type of corporation.\n\n### **Corporate Tax Filing Deadlines**\n\n| Corporation Type | Deadline | For Calendar Year-End (Dec. 31) |\n| :--- | :--- | :--- |"
}
],
"planStepId": "123456789050"
}
},
{
"createTime": "2025-11-24T22:21:25.988820408Z",
"planStep": {
"planStepId": "123456789050",
"role": "MODEL",
"parts": [
{
"text": "\n| **C Corporations** | 15th day of the fourth month after the end of their fiscal year. | April 15 |\n| **S Corporations** | 15th day of the third month after the end of their fiscal year. | March 15 |\n\n---\n\n###"
}
]
}
},
{
"createTime": "2025-11-24T22:21:26.016095651Z",
"planStep": {
"planStepId": "123456789050",
"role": "MODEL",
"parts": [
{
"text": " **Extensions**\n\nIf a corporation needs more time to file, it can request a six-month extension by filing the appropriate form with the IRS. It's important to note that an extension to file is not an extension to pay. Taxes are still due by the original deadline.\n\nWould you like to know about"
}
]
}
},
{
"planStep": {
"parts": [
{
"text": " the deadlines for any other types of business entities?"
}
],
"planStepId": "123456789050",
"role": "MODEL"
},
"createTime": "2025-11-24T22:21:26.070810455Z"
}
]
}
},
"sessionInfo": {
"session": "projects/my-project-123/locations/global/collections/default_collection/engines/my-app/sessions/123456789013",
"queryId": "123456789078",
"turnId": "123456789013_123456789029"
},
"assistToken": "1234567890123456789012345678901234567890"
}
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://global-discoveryengine.googleapis.com/v1alpha/projects/my-project-123/locations/global/collections/default_collection/engines/my-app/assistants/default_assistant:streamAssist" \
-d '
{
"session": "projects/my-project-123/locations/global/collections/default_collection/engines/my-app/sessions/123456789013",
"query": {
"text": "what are the documents you need to file taxes?"
}
}'
{
"answer": {
"name": "projects/my-project-123/locations/global/collections/default_collection/engines/my-app/sessions/123456789013/assistAnswers/15195007515750046778",
"state": "SUCCEEDED",
"replies": [
{
"groundedContent": {},
"replyId": "123456789051"
},
{
"groundedContent": {},
"replyId": "123456789051"
}
],
"diagnosticInfo": {
"plannerSteps": [
{
"queryStep": {
"parts": [
{
"text": "what are the documents you need to file taxes?"
}
]
},
"createTime": "2025-11-24T23:06:45.101296577Z"
},
{
"planStep": {
"role": "MODEL",
"parts": [
{
"text": "**Identifying Tax Documents**\n"
}
],
"planStepId": "123456789051"
},
"createTime": "2025-11-24T23:06:48.201642404Z"
},
{
"planStep": {
"parts": [
{
"text": "**Formulating the Search Strategy**\n"
}
],
"role": "MODEL",
"planStepId": "123456789051"
},
"createTime": "2025-11-24T23:06:51.081693248Z"
},
{
"createTime": "2025-11-24T23:06:53.884827627Z",
"planStep": {
"parts": [
{
"text": "**Searching for Information**\n"
}
],
"role": "MODEL",
"planStepId": "123456789051"
}
},
{
"createTime": "2025-11-24T23:06:55.663545003Z",
"planStep": {
"role": "MODEL",
"parts": [
{
"text": "**Planning the Response Structure**\n"
}
],
"planStepId": "123456789051"
}
},
{
"planStep": {
"planStepId": "123456789051",
"parts": [
{
"text": "Of course, I can provide a list of the common documents and information you'll need to file your personal income taxes. Having these ready can make the process much smoother.\n\n### **Documents for Filing Personal Taxes**\n\n| Category | Document/Information | Purpose |\n| :--- | :--- | :--- |"
}
],
"role": "MODEL"
},
"createTime": "2025-11-24T23:06:55.687661122Z"
},
{
"planStep": {
"planStepId": "123456789051",
"parts": [
{
"text": "\n| **Personal Information** | \u003cul\u003e\u003cli\u003eYour Social Security Number (SSN) or Individual Taxpayer Identification Number (ITIN)\u003c/li\u003e\u003cli\u003eSSNs or ITINs for your spouse and any dependents\u003c/li\u003e\u003c/ul\u003e | To identify you and your family members to the IRS. |\n| **Income Information** | \u003cul\u003e\u003cli\u003e**"
}
],
"role": "MODEL"
},
"createTime": "2025-11-24T23:06:55.713426005Z"
},
{
"planStep": {
"role": "MODEL",
"parts": [
{
"text": "W-2 forms** from all employers.\u003c/li\u003e\u003cli\u003e**1099 forms** such as 1099-NEC, 1099-DIV, 1099-INT, 1099-G.\u003c/li\u003e\u003cli\u003eRecords of any other income (business, rental, etc.).\u003c/li\u003e\u003c/ul\u003e | To"
}
],
"planStepId": "123456789051"
},
"createTime": "2025-11-24T23:06:56.158732383Z"
},
{
"createTime": "2025-11-24T23:06:56.700143436Z",
"planStep": {
"role": "MODEL",
"parts": [
{
"text": " report all of your income from various sources. |\n| **Deductions & Credits** | \u003cul\u003e\u003cli\u003eReceipts for charitable donations.\u003c/li\u003e\u003cli\u003eMedical expense records.\u003c/li\u003e\u003cli\u003e**Form 1098** (mortgage interest) & **1098-T** (tuition).\u003c/li\u003e\u003cli\u003eChild"
}
],
"planStepId": "123456789051"
}
},
{
"planStep": {
"planStepId": "123456789051",
"role": "MODEL",
"parts": [
{
"text": "care expense records.\u003c/li\u003e\u003c/ul\u003e | To reduce your taxable income and take advantage of tax credits. |\n| **Other Documents** | \u003cul\u003e\u003cli\u003eLast year's tax return.\u003c/li\u003e\u003cli\u003eBank account and routing numbers.\u003c/li\u003e\u003c/ul\u003e | For reference and to receive a direct deposit refund or make a payment. |\n\n---\n\nThis"
}
]
},
"createTime": "2025-11-24T23:06:57.410549380Z"
},
{
"planStep": {
"planStepId": "123456789051",
"parts": [
{
"text": " list covers the most common items, but your specific needs may vary depending on your financial situation. It's always a good idea to keep your tax-related documents organized throughout the year.\n\nIs there a specific type of income or deduction you would like to know more about?"
}
],
"role": "MODEL"
},
"createTime": "2025-11-24T23:06:57.960883085Z"
}
]
}
},
"sessionInfo": {
"session": "projects/my-project-123/locations/global/collections/default_collection/engines/my-app/sessions/123456789013",
"queryId": "123456789057",
"turnId": "123456789013_123456789072"
},
"assistToken": "1234567890123456789012345678901234567890"
}