Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Agent reasoning, memory, and token-optimized context for AI applications.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
NOCTURNUSAI_URL, NOCTURNUSAI_API_KEY, NOCTURNUSAI_DATABASE, NOCTURNUSAI_TENANTค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"logic": {
"command": "npx",
"args": [
"-y",
"nocturnusai-mcp"
],
"env": {
"NOCTURNUSAI_URL": "ใส่ค่าของคุณ",
"NOCTURNUSAI_API_KEY": "ใส่ค่าของคุณ",
"NOCTURNUSAI_DATABASE": "ใส่ค่าของคุณ",
"NOCTURNUSAI_TENANT": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add logic --env NOCTURNUSAI_URL='ใส่ค่าของคุณ' --env NOCTURNUSAI_API_KEY='ใส่ค่าของคุณ' --env NOCTURNUSAI_DATABASE='ใส่ค่าของคุณ' --env NOCTURNUSAI_TENANT='ใส่ค่าของคุณ' -- npx -y nocturnusai-mcpเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"logic": {
"command": "npx",
"args": [
"-y",
"nocturnusai-mcp"
],
"env": {
"NOCTURNUSAI_URL": "ใส่ค่าของคุณ",
"NOCTURNUSAI_API_KEY": "ใส่ค่าของคุณ",
"NOCTURNUSAI_DATABASE": "ใส่ค่าของคุณ",
"NOCTURNUSAI_TENANT": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"logic": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"nocturnusai-mcp"
],
"env": {
"NOCTURNUSAI_URL": "ใส่ค่าของคุณ",
"NOCTURNUSAI_API_KEY": "ใส่ค่าของคุณ",
"NOCTURNUSAI_DATABASE": "ใส่ค่าของคุณ",
"NOCTURNUSAI_TENANT": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
NOCTURNUSAI_URL envNOCTURNUSAI_DATABASE envNOCTURNUSAI_TENANT envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันโดเมน nocturnus.ai แล้ว (registry ตรวจความเป็นเจ้าของโดเมน)
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: NOCTURNUSAI_API_KEY
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.3.11) เข้า registry 7 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
The context engineering engine for AI agents: send only what changed.
# ❌ Without NocturnusAI — replay everything, every turn
messages = system_prompt + full_history + tool_outputs # ~1,259 tokens/turn response = llm(messages) # $13,600/mo at scale
ctx = nocturnus.process_turns(raw_turns) # extract → infer → delta messages = system_prompt + ctx.briefing_delta # ~221 tokens/turn response = llm(messages) # $2,400/mo. Same accuracy.
Measured on live APIs. 15-turn product support conversation. Real usage.input_tokens counts. Run it yourself.
| Naive replay | RAG-optimized | NocturnusAI | |
|---|---|---|---|
| Tokens per turn | ~1,259 | ~800 | ~221 |
| Cost per month (1K req/hr, Opus 4, $15/1M) | $13,600 | $12,000 | $2,400 |
| Latency | high | medium | low |
| Truth-preserving | no | no | yes |
Claude Opus 4: 5.7× reduction. Gemini 2.0 Flash: 10.0×. Full calculations.
pip install nocturnusai # Python
npm install nocturnusai-sdk # TypeScript docker run -p 9300:9300 ghcr.io/auctalis/nocturnusai:latest # Docker
Or use the setup wizard:
curl -fsSL https://raw.githubusercontent.com/Auctalis/nocturnusai/main/install.sh | bash
| Framework | Integration | Link |
|---|---|---|
| LangChain / LangGraph | Drop-in NocturnusContextProvider, LangSmith trace pass-through | Docs |
| CrewAI | Task-scoped context per agent role | Docs |
| AutoGen | Context server callable by any agent | Docs |
| MCP | Spec-compliant server for Claude Desktop, Cursor, Continue | Config |
| OpenAI Agents SDK | Context middleware, no tool modifications | Docs |
| Vercel AI SDK | Edge-compatible adapter for Next.js, Nuxt, SvelteKit | Docs |
| Python SDK | pip install nocturnusai | Docs |
| TypeScript SDK | npm install nocturnusai-sdk | Docs |
Three steps. Every turn.
briefingDelta containing only what changed since the last turnThis is not vector search. It is not summarization. It is deterministic inference on a logic engine — Hexastore indexing, backward chaining, and truth maintenance.
LLM required for natural-language turns. The examples below send raw text turns through an LLM to extract structured facts. If you start the server without an LLM provider, natural-language turns will return zero facts. See Quick Start for setup options, or use predicate syntax (e.g.,
"customer_tier(acme_corp, enterprise)") which works without any LLM.
POST /contextcurl -X POST http://localhost:9300/context \
-H 'Content-Type: application/json' \ -H 'X-Tenant-ID: default' \ -d '{ "turns": [ "user: Customer says they are enterprise and blocked on SLA credits.", "tool: CRM says account is Acme Corp with a 2M ARR contract.", "agent: Last week support promised to review SLA eligibility.", "tool: Billing note says renewal is due next month." ], "maxFacts": 12 }'
POST /memory/contextcurl -X POST http://localhost:9300/memory/context \
-H 'Content-Type: application/json' \ -H 'X-Tenant-ID: default' \ -d '{ "goals": [{"predicate":"eligible_for_sla","args":["acme_corp"]}], "maxFacts": 12, "sessionId": "ticket-42" }'
POST /context/diffcurl -X POST http://localhost:9300/context/diff \
-H 'Content-Type: application/json' \ -H 'X-Tenant-ID: default' \ -d '{"sessionId": "ticket-42", "maxFacts": 12}'
Returns only added and removed entries between snapshots.
POST /context/session/clearcurl -X POST http://localhost:9300/context/session/clear \
-H 'Content-Type: application/json' \ -H 'X-Tenant-ID: default' \ -d '{"sessionId":"ticket-42"}'
Python SDK
from nocturnusai import SyncNocturnusAIClient
with SyncNocturnusAIClient("http://localhost:9300") as client: ctx = client.process_turns( turns=[ "user: Customer says they are enterprise and blocked on SLA credits.", "tool: CRM says account is Acme Corp with a 2M ARR contract.", ], scope="ticket-42", session_id="ticket-42", )
diff = client.diff_context(session_id="ticket-42", max_facts=12) client.clear_context_session("ticket-42")
print(ctx.briefing_delta)
TypeScript SDK
import { NocturnusAIClient } from 'nocturnusai-sdk';
const client = new NocturnusAIClient({ baseUrl: 'http://localhost:9300', tenantId: 'default', });
const ctx = await client.processTurns({ turns: [ 'user: Customer says they are enterprise and blocked on SLA credits.', 'tool: CRM says account is Acme Corp with a 2M ARR contract.', ], scope: 'ticket-42', sessionId: 'ticket-42', });
const diff = await client.diffContext({ sessionId: 'ticket-42', maxFacts: 12 }); await client.clearContextSession('ticket-42'); console.log(ctx.briefingDelta);
MCP
{
"mcpServers": { "nocturnus": { "url": "http://localhost:9300/mcp/sse", "transport": "sse" } } }
Use the context tool each turn for a salience-ranked working set. Pair MCP with the HTTP context endpoints when you need goal-driven assembly and diffs.
When you do need backend mechanics, NocturnusAI provides them:
ttl, validFrom, and validUntilX-Database and X-Tenant-IDdocker run -d --name nocturnusai -p 9300:9300 \
--restart unless-stopped \ -v nocturnusai-data:/data \ ghcr.io/auctalis/nocturnusai:latest
curl http://localhost:9300/health # Verify it's running
docker run -d --name nocturnusai -p 9300:9300 \
--add-host=host.docker.internal:host-gateway \ -e LLM_PROVIDER=ollama \ -e LLM_MODEL=granite3.3:8b \ -e LLM_BASE_URL=http://host.docker.internal:11434/v1 \ -e EXTRACTION_ENABLED=true \ ghcr.io/auctalis/nocturnusai:latest
make up-ollama && make smoke
nocturnusai # Interactive REPL
nocturnusai -e "context 10" # Salience-ranked working set nocturnusai -e "compress" # POST /memory/compress nocturnusai -e "cleanup 0.05" # POST /memory/cleanup
Full docs: [nocturnus.ai](https://nocturnus.ai)
| Start Here | The turn-reduction workflow |
| Context Workflow | Raw turns → optimize → diff → clear |
| API Reference | REST endpoints and response shapes |
| SDKs | Python and TypeScript client methods |
| Integrations | LangChain, CrewAI, AutoGen, MCP, and more |
| Benchmark | Measured token reduction on live APIs |
| Calculations | Every number, derived |
| How It Works | The extraction → inference → delta pipeline |
git clone https://github.com/Auctalis/nocturnusai.git && cd nocturnusai
make up # Server using .env.example defaults make up-ollama # + Ollama (reuses host or starts bundled) make up-monitoring # + Prometheus + Grafana make smoke # Verify health + context endpoint
Requires JDK 17+.
./gradlew :nocturnusai-server:run # HTTP server on :9300
./gradlew :nocturnusai-cli:run # Interactive REPL (JVM) ./gradlew :nocturnusai-cli:nativeCompile # Build native binary ./gradlew test # Full test suite
See CONTRIBUTING.md. Issues labelled good first issue are good entry points.
Report vulnerabilities privately via GitHub Security Advisories. See SECURITY.md.
Business Source License 1.1 (SPDX: BUSL-1.1). Free for internal use — including internal production — inside your own organization. Offering NocturnusAI or substantial functionality as a product/hosted service to third parties requires a commercial license (licensing@nocturnus.ai). Converts to Apache 2.0 on 2030-02-19. See LICENSE and DISCLAIMER.md.
ตัดมาแค่ช่วงต้น อ่านต่อใน repo