Commit graph

223 commits

Author SHA1 Message Date
0652023037 feat(rag): add SQLite+FTS5 backend, fix content/usage plumbing bugs
Backend.Upsert never received the fragment's Content, so ChromaDB (and
any backend) stored the vector but silently dropped the actual text —
saved memories had nothing to retrieve later. Backend.Search now also
takes the raw query text, and a failed/missing embedding no longer
hard-fails Add/Search: it degrades to a nil vector so a lexical-capable
backend can still index/find the content (Chroma has no such fallback
and now says so explicitly instead of misbehaving).

Adds pkg/rag/backends/sqlitevec: a zero-dependency backend (pure-Go
SQLite, no external service) that does cosine similarity when a real
embedding vector is available and falls back to FTS5/BM25 full-text
search otherwise. Adds pkg/rag/embeddings.OpenAICompatible, covering
both a local llama.cpp server (`--embeddings` enabled) and real OpenAI
(or any OpenAI-shaped /embeddings endpoint) through the same client.

Also fixes token usage tracking for llama.cpp streaming: the client
never requested `stream_options.include_usage` nor parsed a usage-only
SSE event, and even when present, the agent loop's RunStream dropped
any chunk with no Delta/ReasoningDelta — silently discarding the only
chunk that carries usage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 00:05:30 -07:00
2cde90d8f7
Merge pull request #2 from VictorVargas/feat/consoel-buffer
feat: add history messages, reasoning content, and adaptive language support
2026-07-05 16:20:39 -07:00
a38f63683b feat: add history messages, reasoning content, and adaptive language support
- Add optional history parameter to Run/RunStream for conversation context
- Add Reasoning/ReasoningDelta fields to completion and stream types
- Update llama.cpp adapter to propagate reasoning content from responses
- Default persona language now adapts to the user's language dynamically
2026-07-05 16:17:37 -07:00
cd13f79bb3
Merge pull request #1 from VictorVargas/feat-llm-interface
feat(llm,agent): complete LLM client interface, agent loop, RAG memory, and tools
2026-07-03 14:30:55 -07:00
d3ac4d0ac3
Merge branch 'main' into feat-llm-interface 2026-07-03 14:30:38 -07:00
bffaecb579 docs(AGENTS): update repo status to reflect Go source code exists
- Change status from 'design/spec only' to actual implementation
- Add pkg/*/README.md as a reference in the docs table
- Update build/test section for existing codebase
- Add test coverage summary table
- Update testing conventions with current mock types
- Add ErrPersonaNotFound and ErrConfigNotFound to sentinel errors
2026-07-03 14:22:46 -07:00
2eed2033f0 test(llm,embeddings): add unit tests for mock client, types, and Ollama embedder
- Add comprehensive MockLLMClient tests (generate, stream, match variants)
- Add TypeRef JSON marshaling tests and StopReason value tests
- Add Ollama embedder tests for config defaults and embedding requests
2026-07-03 14:22:41 -07:00
1a8f1557f6 feat(llm): add ChatTemplateKwargs to CompletionRequest for provider-specific template params
- Add ChatTemplateKwargs field to llm.CompletionRequest
- Propagate kwargs through agent loop in both Run() and RunStream()
- Pass kwargs to llama.cpp client chat request
- Fix tool schema marshaling to include type/function wrapper
- Fix stream indentation logic in RunStream with responseBuilder
- Remove indirect marker from uuid dependency
2026-07-03 14:22:36 -07:00
0054ca793c docs: add AGENTS.md guide and skill definitions for AI agents 2026-06-30 23:53:34 -07:00
c25243a690 feat(tools): add Tool definitions, Registry pattern, and filesystem sandbox with path validation 2026-06-30 23:53:32 -07:00
9f33d6df93 feat(rag): add Retrieval-Augmented Memory with ChromaDB backend and embedding support 2026-06-30 23:53:30 -07:00
3f2dc5ccc0 feat(persona): add Persona definition, system prompt assembly, and AgentsMD discovery 2026-06-30 23:53:28 -07:00
4b39f52081 feat(agent): add Agent loop with iteration control, tool handling, and streaming support 2026-06-30 23:53:26 -07:00
641481022f feat(llm): add LLM client interface, types, providers (openai, llamacpp), and mock 2026-06-30 23:53:22 -07:00
ce64b68f12 feat(config): add YAML config loader with hierarchical precedence 2026-06-30 23:53:20 -07:00
2509029777 chore: add YAML config loading and UUID dependencies 2026-06-30 23:53:15 -07:00
46aec356ee docs(fix): fix go-llm-agent → rony-llm-agent 2026-06-30 14:43:00 -07:00
dc754e6df2 Merge branch 'feat-llm-interface' 2026-06-30 13:53:06 -07:00
8987266d1b docs(i18n): translate all docs to English (with .es.md as Spanish alternative) 2026-06-30 13:40:37 -07:00
3e3a42847a fix: routers in documents and referents 2026-06-30 00:41:59 -07:00
2ca15679cb chore:split documents 2026-06-28 23:22:15 -07:00
1efc90e10f chore:update documents 2026-06-28 17:25:45 -07:00
c21173a7f8 chore: initial scaffold with design docs 2026-06-28 16:03:57 -07:00