# Orchestration of Agents : Automated Government Connect AI Workflow Using Multi-Agents Coordination

### **Overview**

This use case demonstrates an intelligent, automated workflow between two AI-powered government agents — the Tax Information Agent (TIA) and the Government Connect AI Agent — operating within a system like GovSync AI.

The agents collaborate to validate whether a company is eligible for annual license renewal, based on its tax filing compliance. The workflow eliminates manual verification between the Tax Department and the Company Registration Department, enabling instant, data-driven renewal decisions.

### Business Value Proposition

| **Aspect**   | **Description**                                                                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Problem**  | Government renewal processes typically involve manual inter-department checks — e.g., verifying tax filing compliance before license renewal. This causes delays, errors, and poor coordination. |
| **Solution** | Implement a multi-agent AI workflow that automates this inter-department validation. The Tax Agent retrieves filing status, and the Renewal Agent uses it to approve, reject, or defer renewals. |

### System Actors

| **Agent**                            | **Role**                        | **Responsibilities (as per XML instructions)**                                                                                                                                                                                                                              |
| ------------------------------------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Tax Information Agent (TIA)**      | Government tax filing validator | <p>1. Accepts a company registration or license number.</p><p>2. Looks up data in DB table <code>Company Info</code> (Table ID: 736217).</p><p>3. Determines if taxes are filed and extracts filing details.</p><p>4. Returns structured JSON response with tax status.</p> |
| **Government Connect AI Agent(CRA)** | Licensing decision engine       | <p>1. Accepts registration/license number from user.</p><p>2. Queries TIA for tax status.</p><p>3. Evaluates the returned data.</p><p>4. Decides whether to approve, reject, or defer the renewal.</p>                                                                      |

### Step-by-Step Workflow

#### Step I :Creation of Agents

Using Natural language Prompt create an AI Agent :-

Example Prompt "Create a General Agent .The name of the agent is **Tax Information Agent** for the National Tax Department.\
Purpose: Provide accurate tax information for registered companies. You know about different tax filing types, tax codes, and historical filings."

Create a General Agent. the name of the agent is **Government Connect AI Agent**  for the National Company Registration Department.\
Purpose: Manage company annual license renewals and determine eligibility based on tax filing data obtained from the Tax Department Agent.

<figure><img src="/files/V6CVHmIa8xvr9sK6W9wF" alt=""><figcaption><p>Agent Creation</p></figcaption></figure>

**General Agent : Tax Information Agent**

<figure><img src="/files/hnVJiISl4HNCAcYTMiTK" alt=""><figcaption></figcaption></figure>

#### **Baby AGI Agent :** Government Connect AI Agent&#x20;

The Baby AGI Agent is responsible to Plan the task and initiate the tasks planned in a step by step manner.

<figure><img src="/files/t9AQaBwVDWlmf1qHoFct" alt=""><figcaption></figcaption></figure>

&#x20;the tasks in a step by step manner .

#### **Step II — Authorize and Enable the  functionalities of the Tools (Base Row DB )**

**Before enabling the functionalities of Base Row ,create a Database in Base row DB Tool.**

<figure><img src="/files/SuvukqeOc8aDY3Arr7YJ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3hYmQz5VBN6cWaReOQ7C" alt=""><figcaption><p>Authorize the tools from Default tools and Enable the functionalities from Tools Manager</p></figcaption></figure>

#### **Step III — Provide the System Instructions using the prompt Generator tool.**

<figure><img src="/files/nfwAc8zcy68zlGEGZt5h" alt=""><figcaption></figcaption></figure>

#### Step IV : Query the Baby AGI Agent and provide all the details in System Instructions

**Government Connect AI Agent (GCA)** sends a structured request to the **Tax Information Agent (TIA)**:

<figure><img src="/files/u0aEy9E6XKdy7Ph7Te3p" alt=""><figcaption><p>Provide System Instructions and Save the changes</p></figcaption></figure>

#### Step V : Baby AGI Agents **Executes the instructions**

According to its system instruction:

> * Look up the tax filing details in the **Base Row DB Table – Company Info (ID: 736217) in the Tax Information Agent**.
> * Check if tax records exist.
> * Extract last filing year and tax type.

#### Step VI  :  Provide a Prompt to Government Connect AI Agent (GCA)&#x20;

**Example Prompt** : "Approve renewal if taxes are filed for the previous financial year for the Company registration Number CRN -112233"

GCA Agent starts planning the task based on the system instrcutions . It understand the uer prompt and connects with Tax Information Agent to collect all the information of tax filling for the concerned company .

Example : CRN -112233

<figure><img src="/files/P78YPXlmQisddskzNPv4" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/lhGbYlejzAqK2Xvemzl3" alt=""><figcaption><p>Agent Interactor will interact with TIA</p></figcaption></figure>

**TIA Returns the Tax Filing Status**

Output (Tax Filed) in the below image :

{"tax\_filed": true, "last\_filing\_year": 2022, "type\_of\_tax": "Corporate Income Tax"}

**Government Connect AI Agent (GCA)** **Analyzes the Tax Data**

Government Connect AI Agent (GCA) receives the TIA response and applies its decision logic

> * If taxes for the previous financial year are filed → **Renewal Approved**
> * If not filed → **Renewal Rejected or Deferred**

<figure><img src="/files/yJOktkSpaZgnTHMZu81y" alt=""><figcaption></figcaption></figure>

#### Step VII— Government Connect AI Agent (GCA) Returns Final Decision

"renewal\_status": "APPROVED", "reason": "Taxes for the previous financial year have been filed.", "company\_reg\_no": "123456789"

<figure><img src="/files/qskRPVRBGlgyEvlXPaGu" alt=""><figcaption></figcaption></figure>

### Example of System Instructions provided to TIA and GCA Agents

**Tax Information Agent**&#x20;

```xml
<instruction>
    <instructions>
        1. Begin by receiving the company registration or license number as input.
        2. Look up the tax filing details in the Base row DB Table with Table Name  Company Info and Table ID 736217  associated with the provided company registration or license number.
        3. Determine if the company has filed taxes. If tax records are found, extract the last filing year and the type of tax filed.
        4. If tax records are found, format the output to indicate that the company has filed taxes, including the last filing year and the type of tax filed.
        5. If no tax records are found, respond with "tax_filed": false and "remarks": "No tax records found".
        6. Ensure that the output does not contain any XML tags.
    </instructions>
    
    <examples>
        <example>
            <input>Company Registration Number: 123456789</input>
            <output>{"tax_filed": true, "last_filing_year": 2022, "type_of_tax": "Corporate Income Tax"}</output>
        </example>
        <example>
            <input>License Number: ABCD-1234-EFGH</input>
            <output>{"tax_filed": false, "remarks": "No tax records found"}</output>
        </example>
        <example>
            <input>Company Registration Number: 987654321</input>
            <output>{"tax_filed": true, "last_filing_year": 2021, "type_of_tax": "Sales Tax"}</output>
        </example>
    </examples>
</instruction>
```

**Government Connect Agent (GCA)**

```xml
<instruction>
    <instructions>
        1. Begin by receiving the company registration number or corporate license number from the user.
        2. Use this number to query the Tax Information Agent for the tax filing status of the company.
        3. Analyze the data returned from the Tax Information Agent.
        4. Determine if the renewal can proceed based on the tax filing status:
            - If the taxes for the previous financial year have been filed, approve the renewal.
            - If the taxes have not been filed, either reject the renewal or defer it until compliance is met.
        5. Ensure that the output does not contain any XML tags.
    </instructions>
    <examples>
        <example>
            <input>
                Company Registration Number: 123456789
            </input>
            <output>
                Renewal Approved: Taxes for the previous financial year have been filed.
            </output>
        </example>
        <example>
            <input>
                Corporate License Number: ABCD-1234-EFGH
            </input>
            <output>
                Renewal Deferred: Taxes for the previous financial year have not been filed. Compliance required.
            </output>
        </example>
        <example>
            <input>
                Company Registration Number: 987654321
            </input>
            <output>
                Renewal Rejected: Taxes for the previous financial year have not been filed. Compliance required.
            </output>
        </example>
    </examples>
</instruction>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://soika-labs.gitbook.io/soika-mockingjay/use-cases/orchestration-of-agents-automated-government-connect-ai-workflow-using-multi-agents-coordination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
