Commit graph

113 commits

Author SHA1 Message Date
cybermaggedon
dd70aade11
Implement logging strategy (#444)
* Logging strategy and convert all prints() to logging invocations
2025-07-30 23:18:38 +01:00
cybermaggedon
98022d6af4
Migrate from setup.py to pyproject.toml (#440)
* Converted setup.py to pyproject.toml

* Modern package infrastructure as recommended by py docs
2025-07-23 21:22:08 +01:00
cybermaggedon
d83e4e3d59
Update to enable knowledge extraction using the agent framework (#439)
* Implement KG extraction agent (kg-extract-agent)

* Using ReAct framework (agent-manager-react)
 
* ReAct manager had an issue when emitting JSON, which conflicts which ReAct manager's own JSON messages, so refactored ReAct manager to use traditional ReAct messages, non-JSON structure.
 
* Minor refactor to take the prompt template client out of prompt-template so it can be more readily used by other modules. kg-extract-agent uses this framework.
2025-07-21 14:31:57 +01:00
cybermaggedon
54592b5e9f
Empty configuration is returned as empty list, previously was not in response (#436) 2025-07-15 14:30:37 +01:00
cybermaggedon
9c7a070681
Feature/react call mcp (#428)
Key Features

  - MCP Tool Integration: Added core MCP tool support with ToolClientSpec and ToolClient classes
  - API Enhancement: New mcp_tool method for flow-specific tool invocation
  - CLI Tooling: New tg-invoke-mcp-tool command for testing MCP integration
  - React Agent Enhancement: Fixed and improved multi-tool invocation capabilities
  - Tool Management: Enhanced CLI for tool configuration and management

Changes

  - Added MCP tool invocation to API with flow-specific integration
  - Implemented ToolClientSpec and ToolClient for tool call handling
  - Updated agent-manager-react to invoke MCP tools with configurable types
  - Enhanced CLI with new commands and improved help text
  - Added comprehensive documentation for new CLI commands
  - Improved tool configuration management

Testing

  - Added tg-invoke-mcp-tool CLI command for isolated MCP integration testing
  - Enhanced agent capability to invoke multiple tools simultaneously
2025-07-08 16:19:19 +01:00
cybermaggedon
e56186054a
MCP client support (#427)
- MCP client service
- Tool request/response schema
- API gateway support for mcp-tool
- Message translation for tool request & response
- Make mcp-tool using configuration service for information
  about where the MCP services are.
2025-07-07 23:52:23 +01:00
cybermaggedon
fcab3aeb0e
Fix/library translators (#415)
* Fixing naming

* Fix mapping of library document list
2025-06-23 21:52:21 +01:00
cybermaggedon
a4e2f67cb1
Feature/translator classes (#414)
Pull the JSON/Pulsar message translation into a separate module, will be useful for other comms channels
2025-06-20 16:59:55 +01:00
cybermaggedon
3fa004d628
Misc fixes (#413)
- tg-load-turtle, removed cruft output 
- Fixed symbol error in triples_store_service.py
- Removed unnecessary import
2025-06-19 15:17:09 +01:00
cybermaggedon
5364b1fad5
Concurrency implemented in more services (#409) 2025-06-04 11:45:21 +01:00
cybermaggedon
e10e9d2295
Add multi-threading to consumer base-class and all LLMs (#408)
* Concurrency in consumers

* Add concurrency to consumer spec

* Add concurrency command-line option to all LLMs (default 1)
2025-06-04 10:49:56 +01:00
cybermaggedon
4ffb677488
Add unique ID to request/response subscriber names so subscribes see all responses (#399) 2025-05-27 23:11:55 +01:00
cybermaggedon
ef34d951fe
Renamed default flow from 0000 to default (#395) 2025-05-24 12:27:56 +01:00
cybermaggedon
6be0ca1990
Add optional timeout to API, 60s default (#376) 2025-05-08 19:00:17 +01:00
cybermaggedon
80ec00f212
Unsubscribe when subscriber/consumer closes (#374) 2025-05-08 12:57:33 +01:00
cybermaggedon
31b7ade44d
Feature/knowledge load (#372)
* Switch off retry in Cassandra until we can differentiate retryable errors

* Fix config getvalues

* Loading knowledge cores works
2025-05-08 00:41:45 +01:00
cybermaggedon
f7123ac57f
tg-put-kg-core command (#369) 2025-05-07 11:13:21 +01:00
cybermaggedon
8080b54328
Knowledge core CLI (#368) 2025-05-07 00:20:59 +01:00
cybermaggedon
807c19fd22
knowledge service (#367)
* Write knowledge core elements to Cassandra

* Store service works, building management service

* kg-manager
2025-05-06 23:44:10 +01:00
cybermaggedon
54e475fa3a
Sample docs loader (#365) 2025-05-06 13:43:17 +01:00
cybermaggedon
9e4eb634a4
Fix/chunking not enabled (#364)
* Enable chunking by default in producer

* Fix some issues including uploading large docs
2025-05-06 00:28:20 +01:00
cybermaggedon
844547ab5f
Feature/library cli (#363)
* Major Python client API rework, break down API & colossal class

* Complete rest of library API

* Library CLI support
2025-05-05 11:09:18 +01:00
cybermaggedon
ff28d26f4d
Feature/flow librarian (#361)
* Update librarian to new API

* Implementing new schema with document + processing objects
2025-05-04 22:26:19 +01:00
cybermaggedon
3b8b9ea866
Feature/flow api 3 (#358)
* Working mux socket

* Change API to incorporate flow

* Add Flow ID to all relevant CLIs, not completely implemented

* Change tg-processor-state to use API gateway

* Updated all CLIs

* New tg-show-flow-state command

* tg-show-flow-state shows classes too
2025-05-03 10:39:53 +01:00
cybermaggedon
a70ae9793a
Flow API - update gateway (#357)
* Altered API to incorporate Flow IDs, refactored for dynamic start/stop of flows
* Gateway: Split endpoint / dispatcher for maintainability
2025-05-02 21:11:50 +01:00
cybermaggedon
450f664b1b
Feature/flow enable api gateway (#356)
* Tweak timeouts, reduce stop time for publishers / subscribers

* More APIs working as flow endpoint
2025-04-29 23:34:41 +01:00
cybermaggedon
027b52cd7c
Fix/get multiple flows working (#355)
* Reduce log output

* Fix problems
2025-04-29 00:06:41 +01:00
cybermaggedon
5af7909122
Update LLMs to LlmService API (#353) 2025-04-25 19:57:42 +01:00
cybermaggedon
3b021720c5
Feature/flow management cli (#346)
Flow management API + various flow management commands

trustgraph-cli/scripts/tg-delete-flow-class
trustgraph-cli/scripts/tg-get-flow-class
trustgraph-cli/scripts/tg-put-flow-class
trustgraph-cli/scripts/tg-show-flow-classes
trustgraph-cli/scripts/tg-show-flows
trustgraph-cli/scripts/tg-start-flow
trustgraph-cli/scripts/tg-stop-flow
2025-04-24 18:57:33 +01:00
cybermaggedon
a9197d11ee
Feature/configure flows (#345)
- Keeps processing in different flows separate so that data can go to different stores / collections etc.
- Potentially supports different processing flows
- Tidies the processing API with common base-classes for e.g. LLMs, and automatic configuration of 'clients' to use the right queue names in a flow
2025-04-22 20:21:38 +01:00
cybermaggedon
298d09f388
Prompt and agent manager, dynamically load configuration from config-svc
- prompt-template takes config from the config-svc, dynamically reloads
  as new config appears.
- agent-react takes config from config-svc, dynamically reloads
- Fixed lack of data in config queue, needed to take the Earliest, not the
  Latest values.
- Changed text-completion and knowledge-query tool to both use 'query'
  as the argument.
- Prompt and agent no longer have command line args to supply
  configuration.
2025-04-02 16:37:08 +01:00
cybermaggedon
1d222235d3
Configuration initialisation (#335)
* - Fixed error reporting in config
- Updated tg-init-pulsar to be able to load initial config to config-svc
- Tweaked API naming and added more config calls

* Tools to dump out prompts and agent tools
2025-04-02 13:52:33 +01:00
cybermaggedon
a2c64cad4a
Added config reload handler mechanism, calls a Python method on config (#334) 2025-04-02 00:23:30 +01:00
cybermaggedon
88eae0a9f0
Fix no version/config at startup (#333) 2025-04-01 20:54:59 +01:00
cybermaggedon
fa09dc319e
Feature/config service (#332)
Configuration service provides an API to change configuration. Complete configuration is pushed down a config queue so that users have a complete copy of config object.
2025-04-01 19:47:05 +01:00
cybermaggedon
ef845d6c9b
Feature/rag parameters (#311)
* Change document-rag and graph-rag processing so that the user can
specify parameters.  Changes in Pulsar services, Pulsar message
schemas, gateway and command-line tools.  User-visible changes in
new parameters on command-line tools.

* Fix bugs, graph-rag working

* Get subgraph truncation in the right place

* Graph RAG and document RAG working and configurable

* Multi-hop path traversal GraphRAG

* Add safety valve for path_size set too high
2025-03-13 00:38:18 +00:00
cybermaggedon
f1559c5944
Feature/librarian (#310)
* Add fields to library schema

* Added list function, incomplete

* Librarian list operation
2025-03-11 16:52:59 +00:00
cybermaggedon
5575e885e5
Fix merge issues with api-key, conflicts with librarian changes (#309) 2025-02-15 12:25:26 +00:00
cybermaggedon
617eb7efd5
Feature/pulsar api key support (#308)
* Add pulsar API token check

* Added missing api_key references

---------

Co-authored-by: Tyler O <4535788+toliver38@users.noreply.github.com>
2025-02-15 11:22:48 +00:00
cybermaggedon
f7df2df266
Feature/librarian (#307)
* Bring QDrant up-to-date

* Tables for data from queue outputs

- Pass single Pulsar client to everything in gateway & librarian
- Pulsar listener-name support in gateway
- PDF and text load working in librarian

* Complete Cassandra schema

* Add librarian support to templates
2025-02-12 23:39:24 +00:00
cybermaggedon
f350abb415
Maint/asyncio (#305)
* Move to asyncio services, even though everything is largely sync
2025-02-11 23:24:46 +00:00
cybermaggedon
a0bf2362f6
Librarian (#304) 2025-02-11 16:01:03 +00:00
cybermaggedon
0e03bc05a4
Refactor rate limit handling (#280)
* - Refactored retry for rate limits into the base class
- ConsumerProducer is derived from Consumer to simplify code
- Added rate_limit_count metrics for rate limit events

* Add rate limit events to VertexAI and Google AI Studio

* Added Grafana rate limit dashboard

* Add rate limit handling to all LLMs
2025-01-27 17:04:49 +00:00
cybermaggedon
cd9a208432
Processors use shared queues, means there can be more than process on a queue to share load (#265) 2025-01-11 18:10:04 +00:00
cybermaggedon
6aa212061d
Fix/document embeddings (#247)
* Update schema for doc embeddings

* Rename embeddings-vectorize to graph-embeddings

* Added document-embeddings processor (broken, needs fixing)

* Added scripts

* Fixed DE queue schema

* Add missing DE process

* Fix doc RAG processing, put graph-rag and doc-rag in appropriate component files.
2025-01-04 21:51:28 +00:00
cybermaggedon
a458d57af2
Feature/refactor entity embeddings (#235)
* Make schema changes
* Core entity context flow in place
* extract-def outputs entity contexts
* Refactored qdrant write
* Refactoring of all vector stores in place
2024-12-30 12:53:19 +00:00
cybermaggedon
187b0e6581
Fix/websocket capacity increase (#230)
* Fix invalid variable name invocation
* Fix error responses in websockets
* Increase websocket limits to 50MB max message.  Turn on Pulsar chunking by default.
2024-12-29 18:08:12 +00:00
cybermaggedon
e3d06ab80b
Fix isinstance test on null values (#192)
Co-authored-by: Mark Adams <mark.adams@surevine.com>
2024-12-04 14:42:55 +00:00
cybermaggedon
6d200c79c5
Feature/wikipedia ddg (#185)
API-side support for Wikipedia, DBpedia and internet search functions  This incorporates a refactor of the API code to break it up, separate classes for endpoints to reduce duplication
2024-12-02 17:41:30 +00:00
cybermaggedon
212102c61c
Tweak queue names (#184) 2024-11-29 17:17:20 +00:00