Metadata-Version: 2.4
Name: acps-interview-simulator
Version: 1.0.0
Summary: Protocol-native multi-agent English interview simulations for global hiring and visa preparation. HR, Tech Lead and Feedback agents collaborate through AIP v2 to deliver STAR probing, role-specific follow-ups and evidence-based coaching.
Author: ACPs Interview Simulator Engineering
License-Expression: MIT
Project-URL: Homepage, https://pypi.org/project/acps-interview-simulator/
Project-URL: Source, https://github.com/acps-labs/acps-interview-simulator
Keywords: acps,acps-sdk,multi-agent,interview-preparation,business-english,star-method,visa-interview
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Education
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: acps-sdk==2.1.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: uvicorn>=0.27.0
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"

# ACPs Interview Simulator

**Protocol-native multi-agent English interview simulations for global hiring and visa preparation. HR, Tech Lead and Feedback agents collaborate through AIP v2 to deliver STAR probing, role-specific follow-ups and evidence-based coaching.**

`acps-interview-simulator` combines **ACPs** (the agent communication protocol stack used by `acps-sdk`) with its purpose: a professional, repeatable **interview simulator**. Version **1.0.0** is a typed Python application and distributable wheel, not a notebook or a mocked chat script.

## Why it is useful

Preparing alone for a multinational-company interview or a study-visa screening often separates behavioural, professional and language practice. This project coordinates those perspectives in one session:

- **HR Agent** opens with a STAR behavioural prompt and evaluates ownership, collaboration and logical structure.
- **Tech Lead Agent** asks software-engineering, product-management or data-analysis questions in professional English, then chooses a follow-up from evidence missing in the actual answer.
- **Feedback Agent** receives all three evaluations and produces one debrief covering language, content logic, soft skills, technical depth and textual professional presence.
- **Interview Leader** discovers skills through ADP, checks real HTTP heartbeats, orchestrates AIP v2 tasks, transfers typed memory and audits every transition.

The included engine is deterministic and offline after installation: it needs no LLM key and makes no claim to be a calibrated language test. Its purpose is transparent rehearsal with reproducible evidence and actionable practice steps.

## Collaboration architecture

```text
Candidate answers
       │
       ▼
Interview Leader ── ADP DiscoveryRequest + HTTP /healthz ──► Agent Registry
       │
       ├── AIP v2 JSON-RPC ──► HR Agent
       │      briefing → probing → behavioural evaluation
       │
       ├── AIP v2 JSON-RPC + typed history ──► Tech Lead Agent
       │      technical → adaptive follow-up → professional evaluation
       │
       ├── AIP v2 JSON-RPC + all evaluations ──► Feedback Agent
       │      feedback → five scores + coaching plan
       │
       └── non-empty END_SESSION broadcast + ControlAck from all agents
```

Every partner runs as an independent FastAPI/uvicorn service on an ephemeral loopback port. Requests and products use `acps-sdk==2.1.0` AIP models. Application messages carry validated `session_id`, `task_id`, `stage` and a non-empty typed payload; the stage machine rejects skipped or reversed phases.

## Project structure

```text
acps-interview-simulator/
├── pyproject.toml                  # setuptools metadata, dependencies, CLI, tool config
├── run_demo.py                     # one-command source-checkout demo
├── README.md
├── docs/
│   └── research/
│       ├── protocol-interview-flow.md
│       ├── interview-evaluation-rubrics.md
│       ├── professional-english-and-star.md
│       └── local-aip-service-testing.md
├── examples/
│   └── three_round_demo.py         # public Python API example
├── src/interview_simulator/
│   ├── __init__.py                 # versioned public API
│   ├── __main__.py                 # python -m interview_simulator
│   ├── py.typed                    # PEP 561 typing marker
│   ├── cli.py                      # scripted and interactive CLI
│   ├── demo.py                     # realistic three-answer fixtures
│   ├── leader.py                   # discovery, orchestration, memory, fan-in
│   ├── mesh.py                     # lifecycle of three local partner services
│   ├── registry.py                 # ACS publication and ADP discovery
│   ├── runtime.py                  # AIP v2 JSON-RPC hosting and products
│   ├── protocol.py                 # message codec and five-stage state machine
│   ├── models.py                   # typed domain and wire contracts
│   ├── identity.py                 # AIC identity helpers and project version
│   ├── question_bank.py            # role/track prompts and adaptive follow-ups
│   ├── scoring.py                  # deterministic evidence extraction and scoring
│   ├── coaching.py                 # final weighted report and action plan
│   ├── report.py                   # human-readable Markdown renderer
│   └── agents/
│       ├── base.py                 # shared AIP task lifecycle and control handling
│       ├── hr.py                   # STAR behavioural interviewer
│       ├── tech_lead.py            # role-specific professional interviewer
│       └── feedback.py             # multidimensional rehearsal coach
└── tests/
    └── test_interview_simulator.py # protocol, scoring and full mesh integration tests
```

## Requirements and installation

- Python **3.10+**
- Windows, macOS or Linux
- Dependencies pinned by `pyproject.toml`, including **`acps-sdk==2.1.0`**

From the project root:

```powershell
py -m venv .venv
.\.venv\Scripts\Activate.ps1
py -m pip install --upgrade pip
py -m pip install -e ".[dev]"
```

On macOS/Linux, activate with `source .venv/bin/activate`; the remaining Python commands are unchanged.

## One-command verification

For a source checkout, run:

```powershell
py run_demo.py
```

For an installed package, run either:

```powershell
interview-simulator demo
interview-simulator demo --role product-manager --json
```

The default command starts all three services, performs ADP discovery and health checks, submits three complete scripted answers, prints the full transcript and coaching report, broadcasts `END_SESSION`, verifies all acknowledgements and stops the services. No keyboard input or external model service is required.

### Real default-run result

The final local verification produced the following deterministic result. UUIDs, ports and elapsed milliseconds vary per run.

```text
ACPs Interview Simulator v1.0.0 · Multi-agent English Interview
Candidate: Alex Chen · Role: software-engineer
Flow: briefing → probing → technical → follow-up → feedback

[HR Agent · probing · Round 1/3]
Tell me about a time you had to recover a project that was falling behind...
[Candidate · Round 1/3]
During a customer migration last year, our release was two weeks behind...
→ 90 words · 0 fillers · STAR 100%

[Tech Lead Agent · technical · Round 2/3]
Walk me through a production incident you diagnosed...
[Candidate · Round 2/3]
We had elevated latency in a checkout API after a deployment...
→ 89 words · 0 fillers · quantified p95 improvement

[Tech Lead Agent · follow-up · Round 3/3]
If the same incident happened at ten times the traffic, what would you change...
[Candidate · Round 3/3]
At ten times the traffic, I would avoid simply adding more application servers...
→ 80 words · 0 fillers · reliability/cost trade-off reasoning

在线 Agent：3/3 · 阶段迁移：4 · END_SESSION：confirmed
AIP dispatch traces: 11
Overall readiness: 76 / 100

language-expression       84
content-logic             68
soft-skills               70
technical-depth           76
professional-presence     88
```

The complete terminal report also includes every question and full answer, per-round evidence, four stage updates, all task states, strengths, improvement priorities and a four-step deliberate-practice plan.

## Interactive interview

```powershell
interview-simulator interview --name "Alex Chen" --role software-engineer
```

Answer each of the three prompts in English and press Enter. Available roles are `software-engineer`, `product-manager` and `data-analyst`. To rehearse a study-plan and visa-screening context:

```powershell
interview-simulator interview --track visa-screening --role data-analyst
```

This is communication practice, not legal advice or a prediction of hiring or visa outcomes.

## Python API

```powershell
py examples/three_round_demo.py
```

Or embed the public session API:

```python
import asyncio

from interview_simulator import CandidateProfile, InterviewSession, LocalAgentMesh, Role


async def main() -> None:
    candidate = CandidateProfile(name="Alex", target_role=Role.SOFTWARE_ENGINEER)
    answers = ["First STAR answer", "Second professional answer", "Third follow-up answer"]
    with LocalAgentMesh() as mesh:
        async with InterviewSession(mesh.registry, candidate) as session:
            result = await session.run(answers)
    print(result.coaching.overall_score, result.ended)


asyncio.run(main())
```

Use real, sufficiently detailed answers for meaningful evidence extraction. Add `--json` to either CLI subcommand when machine-readable output is preferable.

## Tests and quality checks

```powershell
py -m ruff format --check .
py -m ruff check .
py -m pytest
```

The integration test opens the real loopback AIP services and verifies three rounds, role memory, all stage transitions, heartbeat health, structured products and all three `END_SESSION` acknowledgements. Other tests cover package metadata, illegal stage transitions, task/session correlation, filler word boundaries, all role question banks and adaptive follow-up selection.

## Build the wheel

Install the development extras, then build and inspect the distributions:

```powershell
py -m pip install -e ".[dev]"
py -m build
py -m twine check dist/*
```

Expected artifacts:

```text
dist/acps_interview_simulator-1.0.0-py3-none-any.whl
dist/acps_interview_simulator-1.0.0.tar.gz
```

Install the wheel in a clean environment to verify the packaged CLI:

```powershell
py -m pip install dist\acps_interview_simulator-1.0.0-py3-none-any.whl
interview-simulator --version
interview-simulator demo
```

## Publish with Twine

Create a PyPI API token and store it in your credential manager or Twine configuration; never commit it. First rehearse against TestPyPI:

```powershell
py -m twine upload --repository testpypi dist/*
py -m pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple acps-interview-simulator==1.0.0
```

After verifying that installation and demo, publish to PyPI:

```powershell
py -m twine upload dist/*
```

Use `__token__` as the username when prompted. PyPI filenames are immutable: after a release, increment the version instead of attempting to replace an uploaded file. Confirm that the distribution name is available and that project URLs and author metadata are appropriate for your organisation before publishing.

## Evaluation boundaries

Scores are deterministic heuristics over observable text, not CEFR certification, psychometric assessment or a hiring recommendation. Filler matching uses word boundaries, STAR cues expose their coverage and each score includes a rationale. Text-only professional presence reflects answer length, fillers and hedging. Eye contact, posture, pronunciation and vocal pace require separate audio/video assessment. The report states this limitation explicitly.
