AI Agent Development and Interview Guide: 10-Capstone Project: Enterprise Knowledge and Action Assistant

Integrates FastAPI, RAG, LangGraph, MCP Servers, HITL, and Evals to build a complete, production-ready enterprise Agent capstone project with verifiable portfolio metrics.

Contents44 sections

Chapter 10: technical system component——technical system component

technical system component、technical system component。technical system component Enterprise Support Agent:technical system component、technical system component、technical system component,technical system component。technical system component,technical system component RAG、Tool、technical system component、technical system component、technical system component。

1. technical system component

technical system component:

  1. technical system component;
  2. technical system component;
  3. technical system component,technical system component;
  4. technical system component。

technical system component:technical system component、technical system component SQL、technical system component、technical system component、technical system component。

🔥 P0 technical system component:technical system component Agent?
technical system component,technical system component、technical system component、technical system component;technical system component、technical system component。technical system component,technical system component Agent。

2. technical system component

Story A:technical system component

technical system component:“technical system component?”

technical system component:

  • technical system component;
  • technical system component、technical system component;
  • technical system component;
  • technical system component;
  • P95 technical system component 6 technical system component。

Story B:technical system component

technical system component:“technical system component T-123456 technical system component。”

technical system component:

  • technical system component;
  • technical system component;
  • technical system component;
  • technical system component;
  • technical system component RAG technical system component。

Story C:technical system component

technical system component:“technical system component,technical system component。”

technical system component:

  • technical system component;
  • technical system component;
  • UI technical system component、technical system component、technical system component;
  • technical system component;
  • technical system component;
  • technical system component。

Story D:technical system component

knowledge basestechnical system component:“technical system component,technical system component。”

technical system component:

  • technical system component;
  • technical system component Tool;
  • technical system component;
  • Trace technical system component;
  • technical system component。

3. technical system component

TEXT
Web UI
  -> FastAPI / Auth / Rate Limit
      -> Run Service -> PostgreSQL Checkpoint
      -> Agent Graph
          -> Intent Router
          -> RAG Service -> BM25 + Vector -> Reranker
          -> Tool Gateway
              -> get_ticket_status
              -> create_ticket_draft
              -> submit_ticket
          -> Approval Node
          -> Human Handoff
      -> Redis Queue / Cache
      -> Trace + Metrics + Audit

4. technical system component

TEXT
enterprise-support-agent/
├─ app/
│  ├─ api/
│  │  ├─ runs.py
│  │  └─ approvals.py
│  ├─ agent/
│  │  ├─ graph.py
│  │  ├─ state.py
│  │  ├─ nodes.py
│  │  └─ policies.py
│  ├─ rag/
│  │  ├─ ingest.py
│  │  ├─ chunking.py
│  │  ├─ retrieval.py
│  │  └─ citations.py
│  ├─ tools/
│  │  ├─ registry.py
│  │  ├─ tickets.py
│  │  └─ executor.py
│  ├─ eval/
│  │  ├─ datasets/
│  │  ├─ evaluators.py
│  │  └─ regression_gate.py
│  ├─ infra/
│  │  ├─ model_gateway.py
│  │  ├─ database.py
│  │  ├─ cache.py
│  │  └─ tracing.py
│  └─ main.py
├─ tests/
│  ├─ unit/
│  ├─ integration/
│  ├─ eval/
│  └─ security/
├─ migrations/
├─ docs/
│  ├─ architecture.md
│  ├─ threat-model.md
│  └─ failure-review.md
├─ Dockerfile
├─ compose.yaml
├─ pyproject.toml
└─ README.md

5. technical system component

5.1 Agent Run

SQL
create table agent_runs (
    run_id uuid primary key,
    user_id text not null,
    tenant_id text not null,
    status text not null,
    graph_version text not null,
    prompt_version text not null,
    model_config jsonb not null,
    created_at timestamptz not null,
    updated_at timestamptz not null,
    deadline_at timestamptz not null
);

5.2 technical system component

SQL
create table tool_executions (
    execution_id uuid primary key,
    run_id uuid not null references agent_runs(run_id),
    tool_name text not null,
    tool_version text not null,
    idempotency_key text not null,
    risk_level text not null,
    status text not null,
    arguments_hash text not null,
    result_reference text,
    created_at timestamptz not null,
    unique(tool_name, idempotency_key)
);

5.3 technical system component

SQL
create table approvals (
    approval_id uuid primary key,
    run_id uuid not null references agent_runs(run_id),
    action text not null,
    proposed_arguments jsonb not null,
    status text not null,
    decided_by text,
    decided_at timestamptz,
    expires_at timestamptz not null
);

6. Agent State

PYTHON
from typing import Literal, TypedDict


class SupportAgentState(TypedDict, total=False):
    run_id: str
    user_id: str
    tenant_id: str
    query: str
    intent: Literal["knowledge", "ticket_query", "ticket_create", "human"]
    evidence: list[dict]
    ticket_id: str | None
    draft: dict | None
    approval_id: str | None
    approved: bool | None
    tool_trace: list[dict]
    step_count: int
    final_answer: str
    error: dict | None

technical system component,technical system component。

7. technical system component

TEXT
START
 -> normalize_input
 -> route_intent
     knowledge -> retrieve -> rerank -> answer_with_citations -> END
     ticket_query -> authorize -> get_ticket -> answer -> END
     ticket_create -> collect_fields -> create_draft -> approval
         approved -> submit_ticket -> answer -> END
         rejected -> cancel_draft -> END
     human -> handoff -> END

technical system component。authorizeapprovalsubmit_ticket technical system component;route_intent technical system component collect_fields technical system component,technical system component。

8. Tool technical system component

8.1 technical system component

PYTHON
class GetTicketInput(BaseModel):
    ticket_id: str = Field(pattern=r"^T-[0-9]{6}$")


async def get_ticket_status(args: GetTicketInput, auth_context) -> dict:
    ticket = await repository.get(args.ticket_id)
    if ticket.tenant_id != auth_context.tenant_id:
        raise PermissionDenied()
    if ticket.user_id != auth_context.user_id and not auth_context.can("ticket:read:any"):
        raise PermissionDenied()
    return ticket.to_safe_dict()

8.2 technical system component

create_ticket_draft technical system component;submit_ticket technical system component approval_id technical system component。technical system component、technical system component。

🔥 P0 technical system component:technical system component Tool?
technical system component,technical system component;technical system component;technical system component;technical system component。technical system component“technical system component”technical system component“technical system component”technical system component。

9. RAG technical system component

9.1 data

technical system component 30–50 technical system component、FAQ technical system component。technical system component:technical system component、technical system component、technical system component、technical system component、technical system component、technical system component URI。

9.2 technical system component

TEXT
Query Rewrite
 -> tenant/ACL/version filters
 -> Dense Top 30 + BM25 Top 30
 -> RRF merge
 -> Rerank Top 6
 -> diversify by document
 -> context budget

9.3 technical system component

technical system component [S1],technical system component ID technical system component,technical system component:source_uri、technical system component、technical system component。technical system component。

10. API

MethodPathtechnical system component
POST/v1/runstechnical system component Agent Run
GET/v1/runs/{id}technical system component
GET/v1/runs/{id}/eventsSSE technical system component
POST/v1/approvals/{id}/approvetechnical system component
POST/v1/approvals/{id}/rejecttechnical system component
POST/v1/runs/{id}/canceltechnical system component Run

technical system component、CSRF/technical system component(technical system component)、technical system component。

11. technical system component

technical system component 100 technical system component:

Splittechnical system componenttechnical system component
knowledge_normal25technical system component
knowledge_no_answer10knowledge basestechnical system component
exact_keyword10technical system component、technical system component、technical system component
ticket_read15technical system component、technical system component、technical system component
ticket_create15technical system component、technical system component、technical system component、technical system component
prompt_injection10technical system component/technical system component/technical system component
dependency_failure10models、technical system component、technical system component
long_context5technical system component

technical system component:

  • technical system component:0;
  • technical system component:0;
  • technical system component:0;
  • technical system component Schema technical system component:≥99%;
  • technical system component Recall@5:≥85%;
  • technical system component:≥80%;
  • technical system component:≥90%;
  • P95:technical system component <6s,technical system component <10s。

technical system component,technical system component。technical system component。

12. technical system component

technical system component

  • technical system component;
  • Tool Schema;
  • technical system component;
  • technical system component;
  • RRF;
  • technical system component;
  • Prompt technical system component。

technical system component

  • technical system component;
  • Checkpoint technical system component;
  • technical system component;
  • Retriever + Reranker;
  • technical system component;
  • Tool technical system component。

technical system component

  • technical system component;
  • Prompt Injection;
  • technical system component;
  • technical system component;
  • Tool technical system component;
  • technical system component Token/PII;
  • technical system component。

13. Trace technical system component

technical system component“technical system component”technical system component Trace technical system component:

TEXT
run_id=...
route_intent: ticket_create
collect_fields: category=technical, missing=[]
create_draft: success, draft_id=D-12
approval: approved by u-100
submit_ticket: timeout after 3s
idempotency_lookup: found T-123456
final: success, no duplicate write

technical system component Trace technical system component:technical system component,technical system component。

14. technical system component Sprint

Sprint 1:technical system component

  • FastAPI、Run API、technical system component Fake;
  • PostgreSQL Run/Tool/Approval technical system component;
  • technical system component Checkpoint;
  • Fake Model technical system component Fake Tool;
  • technical system component。

technical system component:technical system component。

Sprint 2:RAG

  • technical system component;
  • technical system component;
  • Dense + BM25 + RRF;
  • Rerank;
  • technical system component;
  • 60 technical system component。

technical system component:technical system component Recall@5、MRR、technical system component。

Sprint 3:Tool、technical system component

  • Tool Registry;
  • technical system component、technical system component、technical system component;
  • technical system component API;
  • technical system component Checkpoint;
  • technical system component。

technical system component:technical system component;technical system component。

Sprint 4:Eval、technical system component

  • 100 technical system component Eval;
  • Trace、Metrics、Dashboard;
  • technical system component;
  • Docker/Compose;
  • technical system component;
  • technical system component、technical system component。

technical system component:technical system component,technical system component。

15. README technical system component

  1. technical system component Agent;
  2. technical system component;
  3. Tool technical system component;
  4. RAG technical system component;
  5. technical system component,technical system component;
  6. technical system component;
  7. technical system component;
  8. technical system component;
  9. technical system component;
  10. technical system component。

16. technical system component

technical system component 6–8 technical system component:

  1. 30 technical system component:technical system component;
  2. 1 technical system component:technical system component;
  3. 1 technical system component:technical system component;
  4. 2 technical system component:technical system component—technical system component—technical system component;
  5. 1 technical system component:technical system component Trace technical system component;
  6. 1 technical system component:Eval Dashboard;
  7. 30 technical system component:technical system component。

technical system component UI。technical system component、technical system component。

17. technical system component

technical system component:

technical system component LangChain technical system component。

technical system component:

technical system component Agent,technical system component Hybrid RAG、3 technical system component Tool technical system component;technical system component 120 technical system componentoffline evaluationtechnical system component Trace,technical system component Recall@5 technical system component 72% technical system component 89%,technical system component 68% technical system component 84%,technical system component 0。

technical system component,technical system component。

18. technical system component

🔥 P0:technical system component ReAct?

technical system component。technical system component、technical system component、technical system component;technical system component,technical system component,technical system component。

🔥 P0:technical system component?

technical system component,technical system component“technical system component—Trace—technical system component—technical system component—technical system component—technical system component”technical system component。technical system component,technical system component。

🔥 P0:technical system component RAG technical system component?

technical system component;technical system component Dense、Hybrid、Hybrid+Rerank;technical system component Recall@5/MRR、technical system component、P95 technical system component;technical system component、technical system component。

🔥 P0:technical system component?

technical system component;technical system component ACL;Tool technical system component;technical system component;technical system component+technical system component;technical system component;technical system component;technical system component;technical system component SQL/technical system component/technical system component。

⭐ P1:technical system component 100 technical system component?

API/Worker technical system component、technical system component、technical system component、technical system component、technical system component Embedding、technical system component、technical system component、technical system component、technical system component;technical system component Trace/technical system component。

19. technical system component

  • technical system component;
  • technical system component UI technical system component API technical system component;
  • 100 technical system component Eval;
  • RAG technical system component;
  • Tool technical system component、technical system component、technical system component;
  • Checkpoint technical system component;
  • technical system component;
  • README、technical system component、technical system component、technical system component;
  • technical system component 8 technical system component、technical system component。

Series

AI Agent Development and Interview Guide

Next step

Continue with related topics

Continue along the same topic.

Browse latest news