AI agent

Why it matters

Full-text search (see Search) answers "where does
word X appear in the docs". That's fast and useful, but often you
need more:

The Nextdocs AI agent is a conversational assistant that reads
your documentation and code, answers, and takes action: creates
and edits pages when you ask.

The agent does not edit code in repositories — it only reads
them. Documentation is its scope for changes.

How to open

What the agent can do

1. Search and answers

Acts as smart search across your projects:

Examples:

2. Creating pages

Ask the agent to write a new page — it creates one.

Examples:

What happens:

  1. The agent drafts the page structure.

  2. Writes a draft based on existing documentation and code.

  3. Shows you a preview: "I'm about to create page X with this
    content. Confirm?"

  4. You hit Apply — the page is created. Or Reject
    nothing happens.

The created page lands in history as an agent_create action,
authored as "Agent (via @your-name)". You can always roll back.

3. Editing pages

Ask the agent to modify an existing page.

Examples:

Same flow: preview → confirmation → apply. The agent always
shows a diff (before vs after) before making changes. You see
line-by-line edits with highlights.

Changes land in page history as agent_update records. Rollback
works the normal way (see History).

4. Structural operations

The agent can:

All structural changes require explicit confirmation.

5. Find and extract

These tasks usually run without confirmation — they're
read-only.

What the agent does NOT do

Hard boundaries to keep your system safe:

Action confirmations

When the agent is about to do something — it shows:

┌────────────────────────────────────────────────────┐
│ 📝 Update page «Auth flow»                         │
│                                                    │
│ Diff preview:                                      │
│ - Our JWT tokens rotate every 15 minutes...        │
│ + Our OAuth 2.0 access tokens rotate every 15      │
│ + minutes. Refresh tokens are issued on login...   │
│                                                    │
│ [✓ Apply] [✗ Reject] [✎ Edit before applying]     │
└────────────────────────────────────────────────────┘

Options:

Batch operations

If the agent is running multiple operations at once ("create 5
pages" or "update every mention of X in 8 places"), it shows a
list of changes and lets you:

Source citations

Like a regular chat, the agent always references where it got
the facts:

According to "Release process" [1], releases ship on Tuesdays.
At release time the changelog is updated automatically [2].

Sources:
[1] Release process — /projects/42/17
[2] Changelog automation — /projects/42/23

Click [1] / [2] — navigate to the page, highlight the quoted
fragment.

If there's no answer in the docs — it says so directly: "I didn't
find an answer to X in your documentation. I suggest [creating a
page about X] — shall I draft it from the repository code?"

Under the hood

  1. Retrieval. Your query is vectorized, and the most relevant
    fragments from project pages + repositories are picked.

  2. Reasoning. The LLM receives context + the question + a list
    of available tools (create_page, update_page, move_page,
    search_pages, read_file, etc.).

  3. Planning. The agent decides: answer with text or execute an
    action. If action — it formulates a tool call.

  4. Preview. The result comes back to you as "I'm about to do
    X and Y, confirm?"

  5. Execution. After your Apply the actions run in real time.
    Colleagues see changes instantly.

This is the ReAct agent architecture (Reasoning + Acting)
with a required confirmation step.

Agent scope

Context is determined by where you opened it:

You can't change scope mid-conversation — open a new session.

Memory

The agent remembers the current conversation:

This makes things like:

You: Show me every auth page.
Agent: [list of 4 pages]
You: Update the second one, it's outdated.
Agent: [knows which page you mean]

The thread lives within one tab. Close / reload — new session.

Permissions and limits

The agent acts on your behalf:

The agent cannot exceed your permissions. You won't get admin
rights by asking "agent, grant me admin access".

Action audit

Everything the agent does is logged:

If the agent broke a page, it's not a "lost edit", it's exactly
the same history entry as a human edit.

Example dialogs

Long task

You: We have a new microservice billing-reconciliation. The code
is in the repo but no docs. Create a starter page with Overview,
API, Dependencies, Owner sections.

Agent: Read the service code at /repos/billing/billing-reconciliation.
Observations: Go service, 12 endpoints under /api/v1, depends on
PostgreSQL and Kafka. Owner is not in metadata.

I'm proposing to create "Billing Reconciliation" under "Services"
with this structure:

[page draft]

Whom should I ask for the owner? I can leave a "TBD — ask
@billing-team" placeholder.

[✓ Apply] [✗ Reject] [✎ Edit before applying]

Multi-step action

You: We ran a team retro. Create a page from the template with
Plus / Minus / Action items. Also add a link to it from the
team home page.

Agent: Plan:
1. Create "Retro — April 2026" under /projects/platform/retros
2. Add a link to it at the bottom of
   /projects/platform/team-home

Apply all / Apply individually?

[Apply 1+2] [Apply 1] [Apply 2] [Reject]

Honest "don't know"

You: What's our SLA with the hosting provider?

Agent: I didn't find SLA info in the projects available to me.
Either it's not documented, or it's in a private folder I don't
have access to.

I can draft a "Hosting SLA" page if you share the key terms —
or I can look for mentions in infrastructure code?

Privacy

Limitations

Difference from generic chat in other products

Feature

Notion AI / Confluence Rovo

Nextdocs Agent

Answer questions about docs

Create a new page on demand

⚠️ within writing context

Edit existing pages

⚠️ auto-suggestions

✅ with diff + confirmation

Read repository code

Batch ops with confirmation

Audit log of actions

⚠️

✅ full

"Don't know" instead of hallucinations

⚠️

✅ explicitly

Source citations

⚠️

✅ always

Typical scenarios

Employee onboarding. A new engineer asks "how does our code
review work?". Gets a coherent answer with links. Next: "where's
the FAQ on that?". Agent: "No FAQ — I can create one from the
comments in past PRs?" → creates it.

Documenting a new service. "Create a page for
billing-reconciliation from the code." The agent reads the repo,
generates a draft, you tweak, Apply.

Bulk update. "We're moving from JWT to OAuth 2.0. Find and
replace every JWT mention in the docs with OAuth 2.0, preserving
meaning." The agent finds 12 spots, shows the diff for each, you
confirm. 10 minutes vs an hour.

Search in decision history. "Why did we pick BigQuery over
Redshift?" — finds the ADR, explains.

Structural cleanup. "Find pages not updated in more than a
year and suggest archiving or deleting them." You get a list
with recommendations, decide each.