Commit graph

179 commits

Author SHA1 Message Date
3b36ad2cf8
Merge pull request #5 from VictorVargas/feat/agents-md-injection
Wire AGENTS.md discovery into agent loop + add anthropic provider
2026-07-08 23:36:47 -07:00
a2de4eb812 feat(llm): add anthropic provider client, expand llama.cpp sampling config
- pkg/llm/providers/anthropic: new client implementation (was previously
  imported by rony-harness but never committed here, so a fresh clone
  wouldn't build)
- pkg/llm/providers/llamacpp: Config/Client gain the full local-model
  sampling surface (max_tokens, context_window, top_k/top_p/min_p,
  presence/repetition penalty, max_thinking_tokens) to match the
  llamacpp-local* entries added to configs/ai_providers.yaml

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 23:33:20 -07:00
0f835a0802 feat(agent): wire AGENTS.md discovery into the agent loop's system prompt
Export persona.DiscoverAgentsMD and add agent.Config.AgentsMD so project
and global AGENTS.md rules actually reach the model. Previously
buildInitialMessages always called AssembleSystemPrompt with an empty
string, so no AGENTS.md content was ever injected despite the discovery
logic already existing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 23:27:17 -07:00
eeefe07809
Merge pull request #4 from VictorVargas/feat/tools-for-model
Fix tool call tracking and streaming assembly for all providers
2026-07-08 16:17:36 -07:00
3ac9d89b98 Fix tool call tracking and streaming assembly for all providers
- agent/loop.go: Record assistant message with ToolCalls before tool results,
  and set ToolCallID on tool-result messages so follow-up requests have complete
  context (prevents models from losing track of already-attempted tools).

- llm/providers/llamacpp/client.go: Buffer fragmented tool call deltas during
  streaming, assemble them into complete calls when finish_reason arrives.
  Add ToolCalls, ToolCallID, Name fields to request building.

- llm/providers/openai/client.go: Send ToolCalls, ToolCallID, Name when
  building chat requests so messages are wire-format correct.

- llm/types.go: Add ToolCalls field to Message struct for serialization
  back into conversation history.

- agent/integration_test.go: Move integration test skip from TestMain to a
  per-test skipUnlessIntegration() so it doesn't hide other package tests.

- sandbox & tools: Add edge-case tests (relative traversal, array paths,
  non-path strings, zero-value guards, sentinel errors).
2026-07-08 16:11:57 -07:00
20092f4e52
Merge pull request #3 from VictorVargas/feat/rag-and-sessions
feat(rag): add SQLite+FTS5 backend, fix content/usage plumbing bugs
2026-07-06 00:16:07 -07:00
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