@agentskit/ink
v0.7.6
Published
Ink terminal components and hooks for AgentsKit.
Downloads
1,245
Maintainers
Readme
@agentskit/ink
Build terminal AI chat interfaces with the exact same API as @agentskit/react.
Tags: ai · agents · llm · agentskit · ai-agents · terminal · cli · ink · tui · chat-ui
Why ink
- No context switching — if you know
@agentskit/react, you already know this; same hooks, same component names, different renderer - Real terminal UX — keyboard navigation, ANSI colors, and proper TTY streaming so your CLI feels native, not like a web app in a box
- Any local or cloud model — pair with Ollama for fully offline CLI tools, or any other provider via
@agentskit/adapters - Full parity with the React package — tools, memory, and skills all work the same way; one codebase, two surfaces
Install
npm install @agentskit/ink @agentskit/adaptersQuick example
import React from 'react'
import { render } from 'ink'
import { ChatContainer, InputBar, Message, useChat } from '@agentskit/ink'
import { ollama } from '@agentskit/adapters'
function App() {
const chat = useChat({ adapter: ollama({ model: 'llama3.1' }) })
return (
<ChatContainer>
{chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
<InputBar chat={chat} />
</ChatContainer>
)
}
render(<App />)Features
useChathook — identical API to@agentskit/react- Terminal components:
ChatContainer,Message,InputBar,ToolCallView - Keyboard navigation and auto-scroll
- ANSI theming
- Default file-based memory out of the box
Ecosystem
| Package | Role |
|---------|------|
| @agentskit/react | Browser — same hooks, different renderer |
| @agentskit/cli | Interactive chat + agentskit init |
| @agentskit/adapters | Providers (e.g. ollama for local models) |
| @agentskit/core | Shared chat types and controller |
Contributors
License
MIT — see LICENSE.
