UnieAI Studio

Step by step: build an agent that answers from documents

Use a downloadable sample to prepare models, parse a KB document, verify search, configure an agent, and test it in Playground.

Build support-agent and ask it when ORBIT-42 support is available. By the end, it should answer from your document and identify the source. Each step includes a checkpoint: resolve a failed checkpoint before continuing.

The screenshots illustrate interface operations; click an image to view it full size. Choose an available answering model with Tool Calling and verify connectivity after adoption. Use ORBIT-42 Tutorial for the sample KB and support-agent or another unused agent name. Repeated uploads of the same filename may receive (1) or (2) suffixes.

Before you start

RequirementCheck
Active account and project or personal accountYou can open Agent Builder and create resources
Balance and quotasCheck the current project or personal account balance; parsing, indexing, and model requests may incur usage
Answering modelText generation and Tool Calling, adopted into the target project or personal account
KB system modelsAdopt the format-appropriate parsing models requested by the KB
Sample fileDownload product-support.md

The sample describes a fictional product. You can substitute a short document of your own, provided the test questions have explicit answers in it.

Step 1: choose the current project or personal account

  1. Sign in and click the project name at the top left.
  2. Select your personal account or a project where you can create resources.
  3. Keep models, the KB, the agent, and API keys in that same target project or personal account throughout this guide.

Checkpoint: the top-left project name is correct. If a list suddenly looks empty, check whether the current project or personal account changed.

 Choose your personal account or project.  Open Agent Builder.
Choose your personal account or project. Open Agent Builder. Click to enlarge

Step 2: adopt the answering model

  1. Open Token Factory → UnieAI Model Zoo.
  2. Choose a text-generation model that supports Tool Calling; inspect its capabilities and price.
  3. Click Use base model and confirm adoption into the current project or personal account.
  4. Open My Models and confirm it is available.

Checkpoint: the model appears in My Models. This is the agent's answering model; KB parsing and indexing models are separate prerequisites.

 Find an answering model with Tool Calling.  Click Use base model.
Find an answering model with Tool Calling. Click Use base model. Click to enlarge
Model details and usage entry: check capabilities, pricing and workspace.
Model details and usage entry: check capabilities, pricing and workspace. Click to enlarge
 Verify the agent answering model.  Verify the configured parsing model; adopt other required models when prompted.
Verify the agent answering model. Verify the configured parsing model; adopt other required models when prompted. Click to enlarge

Step 3: create the tutorial KB

  1. Open Agent Builder → Knowledge bases.
  2. If a required-model dialog appears, click its Add to My Models or Add model action. Complete each required purpose that appears.
  3. Click New knowledge base.
  4. Enter ORBIT-42 Tutorial as the name and ORBIT-42 product-support sample documents as the description.
  5. Click Next and choose access. Keep the private setting for a personal exercise.
  6. Click Create, then open the new KB from the list.

Checkpoint: the KB file list opens. Uploading requires the creator or a co-editor, rather than use-only access.

 Open Knowledge bases.  Create a new KB.
Open Knowledge bases. Create a new KB. Click to enlarge
 Enter the KB name.  Describe its purpose.  Click Next.
Enter the KB name. Describe its purpose. Click Next. Click to enlarge
 Leave optional sharing fields empty for a private personal exercise.  Click Create.
Leave optional sharing fields empty for a private personal exercise. Click Create. Click to enlarge

Step 4: select the file and start uploading

  1. In the KB file page, click Add new → Upload files.
  2. Select product-support.md.
  3. Check its name in the pending upload queue.
  4. Click Start. Selecting a file only queues it; it does not start transfer.
  5. Wait for the document to appear in the file list.

Checkpoint: the file is listed with a queued or processing state. Upload success is not parsing or indexing success.

 Verify the KB name.  Click Add new to add a document.
Verify the KB name. Click Add new to add a document. Click to enlarge
 Choose Upload files, then select a file from your computer.
Choose Upload files, then select a file from your computer. Click to enlarge

Step 5: wait for parsing and indexing

  1. Watch the document state and progress message.
  2. Click its state to inspect stages, page progress, or errors.
  3. Wait for Indexed, Ready, or an equivalent usable state.
  4. For a partial result, inspect failed pages. Use a fully successful file for this first exercise.
  5. If processing fails, resolve model access, balance, or file issues before using Reparse document.

Checkpoint: indexing is complete. See Uploading and managing documents for limits, failed-page retries, and recovery.

Document status and processing events; check the parsing and indexing result.
Document status and processing events; check the parsing and indexing result. Click to enlarge
 Verify indexing completed.  Open document content.  Open KB search.
Verify indexing completed. Open document content. Open KB search. Click to enlarge

Step 6: verify KB search first

  1. Click Search at the upper right of the KB file page.
  2. Ask When is human support for ORBIT-42 available?.
  3. Run the search with the initial settings.
  4. Expand results and check for Monday–Friday, 09:00–18:00, and Asia/Taipei.
  5. Confirm the source is product-support.md.

Checkpoint: the relevant source passage is found. This page returns evidence, not necessarily a conversational answer. Fix KB search before configuring the agent.

Check the complete parsed Markdown and source file. A plain text example has no page image.
Check the complete parsed Markdown and source file. A plain text example has no page image. Click to enlarge
Enter text or a regular expression on the KB search page, then run the search.
Enter text or a regular expression on the KB search page, then run the search. Click to enlarge

Step 7: create the agent

  1. Open Agent Builder → My Agents → Create agent.
  2. Enter support-agent in Name. Creation accepts 3–50 letters, digits, dots, underscores, or hyphens.
  3. Paste the instructions below into Instructions.
  4. Under Model → Model Zoo, select the model adopted in step 2.
  5. Under Data sources → Knowledge Base, select ORBIT-42 Tutorial. You can also attach it after creation.
  6. Scroll to the bottom and click Create agent. Wait for the agent's Setup page.
You are a product support documentation assistant. Answer in English.
Search the attached knowledge base before answering product questions.
Use the retrieved evidence and cite the source filename and page, when available.
If information is missing, say that the documents do not provide it. Do not guess.
Present troubleshooting actions in the order in which they should be performed.

Checkpoint: the agent exists and its Setup page opens. If adoption is required, finish adding the model to My Models first.

 Enter your own agent name.  Paste system instructions.  Select the adopted answering model.
Enter your own agent name. Paste system instructions. Select the adopted answering model. Click to enlarge
 Select the tutorial KB.  Click Create Agent.
Select the tutorial KB. Click Create Agent. Click to enlarge

Step 8: verify saving, attachments, and engine

  1. In Setup, check Definition and Model.
  2. After editing the name, instructions, or model, click Save at the bottom and confirm Saved.
  3. Under Assets → Knowledge bases, check that the tutorial KB is selected. Asset selection saves immediately; resolve any save error before continuing.
  4. Check Execution engine. Choose an engine that calls tools, such as UnieAI Harness Lite. Plain model does not use attached KBs or tools.
  5. If using Default, inspect which engine it currently resolves to.

Checkpoint: reopening the agent preserves instructions and the KB selection, and the engine allows tools. Creating an empty KB or mentioning its name in instructions does not supply document content.

Edit the system instructions under Definition on the agent setup page, then save and reopen to verify.
Edit the system instructions under Definition on the agent setup page, then save and reopen to verify. Click to enlarge
 Choose UnieAI Harness Lite so the agent can call connected KBs and tools.
Choose UnieAI Harness Lite so the agent can call connected KBs and tools. Click to enlarge
 Verify the tutorial KB is checked in Assets; these changes save immediately.
Verify the tutorial KB is checked in Assets; these changes save immediately. Click to enlarge

Step 9: run three Playground tests

  1. Click Try in Playground.
  2. Confirm the selected model is support-agent, not its base model.
  3. Start a new conversation and test the following.
QuestionExpected result
What are ORBIT-42 support hours and the timezone?Monday–Friday, 09:00–18:00, Asia/Taipei, with the source filename
What should I do about ERR-102?Check synchronization, wait if running, or report the job ID and error if failed
What does ORBIT-42 cost?Explain that the document does not provide a price

Expand tool events or the timeline when available to check that KB search actually ran. Verify citations against the document rather than assuming an instruction guarantees them.

Checkpoint: all three cases pass. Keep these questions as regression checks whenever you change a model, instructions, or documents.

 Copy the agent model ID.  Open Playground and verify this agent is selected.
Copy the agent model ID. Open Playground and verify this agent is selected. Click to enlarge
Select the tutorial agent in Playground, ask a question and check its document sources.
Select the tutorial agent in Playground, ask a question and check its document sources. Click to enlarge

Continue

GoalGuide
Upload, poll, and retrieve Markdown from codeDocument parsing API
Call this agent from codeFirst agent API request
Change models, engines, or toolsCreate and configure an agent
Search works but the agent ignores documentsRAG setup and diagnosis
Verify the entire workflowDocument agent acceptance checks