Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Harshitk-cp/engram
/ functions
Functions
2,051 in github.com/Harshitk-cp/engram
⨍
Functions
2,051
◇
Types & classes
484
↓ 466 callers
Function
writeError
(w http.ResponseWriter, status int, msg string)
internal/api/handlers/response.go:19
↓ 169 callers
Method
Get
(ctx context.Context, userID, tenantID uuid.UUID)
internal/domain/auth.go:69
↓ 142 callers
Method
Create
(ctx context.Context, u *User)
internal/domain/auth.go:57
↓ 132 callers
Method
Query
(ctx context.Context, sql string, args ...any)
internal/store/dbtx.go:16
↓ 96 callers
Function
TenantFromContext
(ctx context.Context)
internal/api/middleware/auth.go:31
↓ 85 callers
Method
Exec
(ctx context.Context, sql string, args ...any)
internal/store/dbtx.go:15
↓ 85 callers
Function
writeJSON
(w http.ResponseWriter, status int, v any)
internal/api/handlers/response.go:13
↓ 70 callers
Method
GetByID
(ctx context.Context, id uuid.UUID)
internal/domain/auth.go:59
↓ 70 callers
Method
QueryRow
(ctx context.Context, sql string, args ...any)
internal/store/dbtx.go:17
↓ 53 callers
Method
Header
()
internal/api/inprocess.go:58
↓ 50 callers
Method
Encode
Encode creates a richly-encoded episode from raw input.
internal/service/episode.go:72
↓ 49 callers
Function
strF
(desc string)
mcp/tools.go:434
↓ 42 callers
Function
req
(path: string, opts: RequestInit = {})
console/src/api.ts:13
↓ 39 callers
Method
Info
Info handles GET /v1/embedding/info.
internal/api/handlers/embedding.go:17
↓ 38 callers
Function
strArg
strArg returns a string argument or "".
mcp/tools.go:1042
↓ 37 callers
Method
AddTool
AddTool registers an MCP tool.
mcp/server.go:113
↓ 36 callers
Function
NewClient
NewClient creates an Engram API client. agentID is the default agent used when the caller does not supply one.
mcp/client.go:25
↓ 33 callers
Function
newServer
─── Helpers ───────────────────────────────────────────────────────────────────
mcp/mcp_test.go:101
↓ 32 callers
Function
obj
─── schema helpers (keep tool defs compact) ─────────────────────────────────
mcp/tools.go:427
↓ 31 callers
Function
rawResult
(raw json.RawMessage, err error)
mcp/tools.go:459
↓ 29 callers
Function
ErrorResult
ErrorResult is a convenience constructor for an error tool result.
mcp/server.go:262
↓ 28 callers
Method
Do
Do runs fn with transaction-bound stores; all writes commit or roll back together.
internal/store/uow.go:32
↓ 28 callers
Method
WriteHeader
(code int)
internal/api/middleware/logging.go:21
↓ 27 callers
Function
newMock
(t *testing.T)
mcp/mcp_test.go:45
↓ 27 callers
Method
server
()
mcp/mcp_test.go:58
↓ 26 callers
Method
InitialConfidence
()
internal/domain/memory.go:71
↓ 25 callers
Method
Embed
(ctx context.Context, text string)
internal/domain/stores.go:220
↓ 25 callers
Function
assertText
(t *testing.T, result *mcp.CallToolResult, contains string)
mcp/mcp_test.go:137
↓ 25 callers
Function
callTool
(t *testing.T, s *mcp.Server, name string, args map[string]interface{})
mcp/mcp_test.go:109
↓ 24 callers
Method
Delete
(ctx context.Context, id uuid.UUID)
internal/domain/graph.go:185
↓ 22 callers
Function
testLogger
()
internal/service/memory_test.go:413
↓ 20 callers
Method
Handle
Handle dispatches a JSON-RPC request and returns the response. Returns nil for notifications (no ID) that require no response.
mcp/server.go:129
↓ 20 callers
Function
NewServer
(name, version string)
mcp/server.go:95
↓ 19 callers
Function
useAsync
(loader: () => Promise<T>, deps: unknown[])
console/src/hooks.ts:12
↓ 18 callers
Method
GetRaw
GetRaw performs a GET and returns the raw JSON body. Used by the broader tool surface where a typed struct adds no value over passing the structured r
mcp/client.go:223
↓ 18 callers
Method
ResolveAgent
ResolveAgent returns the given agent id or the client default if empty.
mcp/client.go:213
↓ 17 callers
Function
newMockMemoryStore
()
internal/service/memory_test.go:19
↓ 17 callers
Function
setupMemoryTest
()
internal/service/memory_test.go:418
↓ 16 callers
Method
WriteHeader
(code int)
internal/api/inprocess.go:60
↓ 15 callers
Function
ApplyLogOddsDelta
(confidence float32, logOddsDelta float64)
internal/service/confidence.go:30
↓ 15 callers
Method
PostRaw
PostRaw performs a POST with a JSON body and returns the raw JSON response.
mcp/client.go:228
↓ 15 callers
Method
Recall
(ctx context.Context, embedding []float32, agentID uuid.UUID, tenantID uuid.UUID, opts RecallOpts)
internal/domain/stores.go:100
↓ 15 callers
Function
protect
(el: React.ReactNode)
console/src/App.tsx:40
↓ 15 callers
Function
setupSchemaTest
()
internal/service/schema_test.go:290
↓ 14 callers
Function
ComputeTier
(confidence float64)
internal/domain/tier.go:18
↓ 14 callers
Function
createTestMemory
createTestMemory creates a memory with specified parameters for testing
internal/service/decay_test.go:41
↓ 14 callers
Function
newMockAgentStore
()
internal/service/agent_test.go:18
↓ 13 callers
Method
GetByAgentForDecay
(ctx context.Context, agentID uuid.UUID)
internal/domain/stores.go:127
↓ 13 callers
Function
NewDecayService
NewDecayService creates a new decay service
internal/service/decay.go:86
↓ 12 callers
Method
ApplyDecay
ApplyDecay applies decay to a single memory using the service defaults.
internal/service/decay.go:302
↓ 12 callers
Method
Enabled
Enabled reports whether Razorpay API credentials are configured.
internal/billing/razorpay.go:68
↓ 12 callers
Method
Write
(b []byte)
internal/api/inprocess.go:66
↓ 12 callers
Function
cosineSimilarity
cosineSimilarity calculates cosine similarity between two vectors.
internal/service/schema.go:527
↓ 11 callers
Method
GetByAgent
(ctx context.Context, agentID uuid.UUID)
internal/domain/graph.go:189
↓ 11 callers
Function
NewWorkingMemoryService
NewWorkingMemoryService creates a new working memory service.
internal/service/working_memory.go:49
↓ 11 callers
Method
Upsert
(ctx context.Context, p *Policy)
internal/domain/stores.go:239
↓ 11 callers
Method
complete
(ctx context.Context, messages []cerebrasMessage, temp float32)
internal/llm/cerebras.go:62
↓ 11 callers
Method
complete
(ctx context.Context, prompt string)
internal/llm/gemini.go:59
↓ 11 callers
Method
complete
(ctx context.Context, messages []anthropicMessage, maxTokens int)
internal/llm/anthropic.go:62
↓ 11 callers
Method
complete
(ctx context.Context, messages []chatMessage, temp float32)
internal/llm/openai.go:55
↓ 11 callers
Function
newDecayMockStore
()
internal/service/decay_test.go:20
↓ 11 callers
Function
setupMetacognitiveTest
()
internal/service/metacognitive_test.go:58
↓ 11 callers
Function
setupPolicyTest
()
internal/service/policy_test.go:51
↓ 10 callers
Method
GetByAgentIDAndType
(ctx context.Context, agentID uuid.UUID, memType MemoryType)
internal/domain/stores.go:241
↓ 10 callers
Function
TextResult
TextResult is a convenience constructor for a successful text tool result.
mcp/server.go:257
↓ 10 callers
Method
UpdateReinforcement
(ctx context.Context, id uuid.UUID, confidence float32, reinforcementCount int)
internal/domain/stores.go:110
↓ 10 callers
Method
UpsertPolicies
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID, policies []domain.Policy)
internal/service/policy.go:60
↓ 10 callers
Function
intArg
(args map[string]interface{}, key string, defaultVal int)
mcp/tools.go:408
↓ 10 callers
Function
setupProceduralTest
()
internal/service/procedural_test.go:120
↓ 9 callers
Method
FindSimilar
Belief system methods
internal/domain/stores.go:108
↓ 9 callers
Function
LimitsFor
LimitsFor returns the caps for a plan, falling back to the free tier for any unknown value so a malformed plan column never grants unlimited usage.
internal/domain/billing.go:45
↓ 9 callers
Function
New
New builds a Razorpay client. planIDs is keyed by plan tier name (developer/team/growth). When keyID or keySecret is empty the client reports Enabled(
internal/billing/razorpay.go:56
↓ 9 callers
Function
NewConfidenceService
(store domain.MemoryStore, logger *zap.Logger)
internal/service/confidence.go:59
↓ 9 callers
Function
assertNoError
(t *testing.T, result *mcp.CallToolResult)
mcp/mcp_test.go:155
↓ 9 callers
Function
createTestMemoryWithEmbedding
createTestMemoryWithEmbedding creates a memory with a specific embedding
internal/service/decay_test.go:59
↓ 9 callers
Method
get
(ctx context.Context, path string, result interface{})
mcp/client.go:301
↓ 9 callers
Function
newMockLLMClient
()
internal/service/memory_test.go:329
↓ 9 callers
Function
requireAgentInTenant
(w http.ResponseWriter, r *http.Request, agents domain.AgentStore, agentID, tenantID uuid.UUID)
internal/api/handlers/response.go:38
↓ 9 callers
Function
writeError
(w http.ResponseWriter, status int, msg string)
internal/api/middleware/auth.go:195
↓ 8 callers
Method
AssessConfidence
AssessConfidence evaluates how confident we should be in a memory.
internal/service/metacognitive.go:129
↓ 8 callers
Method
GetBilling
GetBilling returns the org's current plan + Razorpay references.
internal/domain/billing.go:83
↓ 8 callers
Method
IsValid
IsValid checks if the schema type is valid.
internal/domain/schema.go:28
↓ 8 callers
Function
NewLearningService
( memoryStore domain.MemoryStore, episodeStore domain.EpisodeStore, logger *zap.Logger, )
internal/service/learning.go:39
↓ 8 callers
Function
NewTunerService
(fs domain.FeedbackStore, ps domain.PolicyStore, logger *zap.Logger)
internal/service/tuner.go:45
↓ 8 callers
Method
UpdateConfidence
(ctx context.Context, id uuid.UUID, confidence float32)
internal/domain/stores.go:111
↓ 8 callers
Function
ValidMemoryType
(t string)
internal/domain/memory.go:88
↓ 8 callers
Function
newMockFeedbackStore
()
internal/service/tuner_test.go:17
↓ 8 callers
Function
newMockMemoryStoreForConfidence
()
internal/service/confidence_test.go:22
↓ 8 callers
Function
newMockPolicyStore
()
internal/service/policy_test.go:17
↓ 8 callers
Function
parseUUID
(s string)
internal/llm/provider.go:10
↓ 8 callers
Function
provenanceTag
(p domain.Provenance)
internal/llm/provider.go:14
↓ 8 callers
Function
setupEpisodeTest
()
internal/service/episode_test.go:209
↓ 8 callers
Function
useAuth
()
console/src/auth.tsx:17
↓ 7 callers
Function
AuthFromContext
(ctx context.Context)
internal/api/middleware/auth.go:38
↓ 7 callers
Method
Create
(ctx context.Context, a *domain.Agent)
internal/service/agent.go:26
↓ 7 callers
Function
EmbeddingDim
()
internal/config/config.go:141
↓ 7 callers
Function
GetTierBehavior
(tier MemoryTier)
internal/domain/tier.go:82
↓ 7 callers
Function
NewAgentService
(s domain.AgentStore)
internal/service/agent.go:17
↓ 7 callers
Function
NewRecallScorer
()
internal/service/recall.go:42
↓ 7 callers
Method
RunForAgent
RunForAgent analyzes feedback for a single agent and adjusts policies.
internal/service/tuner.go:117
next →
1–100 of 2,051, ranked by callers